Skip to content

Converting Synchronization Primitives in C/C++ to P #450

Answered by anupgithub
anupgithub asked this question in Q&A
Discussion options

You must be logged in to vote

Thanks Ankush! We will go through the example you mentioned.

Basically we need "dumb" synchronization examples to learn from. Take any concurreny book (c++/Java, c), converting the first 10 solved concurrent problems from it to P would be a great tutorial.

I also had the following questions:

1# What's a atomic step in P programming? What's the smallest default atomic?

Like if X is a integer, would the following be considered atomic?
X = X + 1

From example in pluscal, every step is atomic. Step is defined by labels. Following is a note from lamport.

"PlusCal is an algorithm language. Execution of an algorithm consists of a sequence of steps. An algorithm’s computational complexity is the n…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@anupgithub
Comment options

Answer selected by ankushdesai
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
2 participants