Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Concurrent Updates 1.5.2 Clarification Suggestion #5

Open
jsbosch opened this issue Aug 6, 2017 · 0 comments
Open

Concurrent Updates 1.5.2 Clarification Suggestion #5

jsbosch opened this issue Aug 6, 2017 · 0 comments

Comments

@jsbosch
Copy link

jsbosch commented Aug 6, 2017

Hi -

First off, thanks for making this fun book available!

In section 1.5.2 Concurrent updates, the thread of execution at machine level is shown with two steps:

1. temp = count
2. count = temp + 1

This is true for CISC processors that can operate directly on memory, but RISC processors I've worked with would break it down into three instructions, which together are called a read-modify-write operation.

So, Thread A would be

1. temp = count
2. temp = temp + 1
3. count = temp

which gives one more opportunity for another thread to slice in.

Cheers,

Jeff B.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant