Talk:Lamport's bakery algorithm
![]() | Computing Start‑class | |||||||||
|
![]() | Computer science Start‑class Mid‑importance | ||||||||||||||||
|
It's, of course, of no theoretical import ... but might it seem a bit more natural to computer scientists to index the array from [0..N-1]? This follows more closely how many programming languages work.
I agree so that we maintain consistency. JWHPryor 15:45, 22 December 2006 (UTC)JWHPryor
I think the "critical section" and "non-critical section" should be moved out of the article as they apply to all concurrency articles. There should just be a link. JWHPryor 15:45, 22 December 2006 (UTC)JWHPryor
- I disagree. It's handy to have a quick summary to refresh your memory in addition to a link to the main section for further details. 67.6.222.36 (talk) 22:52, 24 June 2011 (UTC)
The "pseudocode" isn't pseudocode at all: it's full of semicolons, brackets, and language-specifics. Pseudocode should read like English. 86.150.130.12 22:59, 3 January 2007 (UTC)
- I disagree. "Pseudocode" says what it's not, not what it is. The point is that it uses common conventions that most people will understand. Brackets are quite common for arrays. Semi's help to delineate instructions. If you remove all the "shorthand" symbols to make it read more like Engish, then it gets too wordy and starts to get ambiguous. 67.6.222.36 (talk) 22:52, 24 June 2011 (UTC)
The following is incorrect: "It is possible that more than one thread will get the same number when they request it; this cannot be avoided." With an atomic increment instruction each thread is guaranteed a unique ticket.--C0d1f1ed (talk) 06:15, 21 April 2008 (UTC)
- They mean when no such primitives are available. If you have various "atomic" operations, this whole thing is unnecessary. I agree though that variations of this idea can be present in "lock free code" that avoids expensive instructions but still uses them when necessary. Długosz (talk) 18:51, 23 September 2009 (UTC)
- True. This is an algorithm for when atomic operations are no available. 67.6.222.36 (talk) 22:52, 24 June 2011 (UTC)