The book "Garbage collection: algorithms for automatic dynamic memory management" by Jones and Lins starts describing on page 197 a concurrent garbage collection algorithm by Leslie Lamport and concludes on page 198 with : "This colour change is done in a single instruction by an ingenious reinterpretation of colour values by incrementing the value of a base colour modulo 3: interested readers should consult [Lamport, 1976] for more details."
Ok ; if it's ingenious , I want to read it. The reference is
Leslie Lamport
Garbage Collection with Multiple Processes: an Exercise in Parallelism
Proceedings of the 1976 International Conference on Parallel Processing,
T. Feng, ed., 50-54.
I did a bit of googling , arrived at http://lamport.azurewebsites.net/pubs/pubs.html and it says "No electronic version available". The entry on the page for the above paper references "On-the-fly Garbage Collection: an Exercise in Cooperation" and I have downloaded that but ideally I would also like to see the above paper. ...
On 2022-09-20 09:29, Spiros Bousbouras wrote:
The book "Garbage collection: algorithms for automatic dynamic memory management" by Jones and Lins starts describing on page 197 a concurrent garbage collection algorithm by Leslie Lamport and concludes on page 198 with
: "This colour change is done in a single instruction by an ingenious reinterpretation of colour values by incrementing the value of a base colour
modulo 3: interested readers should consult [Lamport, 1976] for more details."
Ok ; if it's ingenious , I want to read it. The reference is
Leslie Lamport
Garbage Collection with Multiple Processes: an Exercise in Parallelism
Proceedings of the 1976 International Conference on Parallel Processing,
T. Feng, ed., 50-54.
I did a bit of googling , arrived at http://lamport.azurewebsites.net/pubs/pubs.html and it says "No electronic version available". The entry on the page for the above paper references "On-the-fly Garbage Collection: an Exercise in Cooperation" and I have downloaded that but ideally I would also like to see the above paper. ...
Looks nothing more than what I'm doing in my various tools to convert legacy languages source to html to colour nested parentheses, in essence:
colour[0] = 'red'
colour[1] = 'blue'
colour[2] = 'green'
cur_col = 0
and for the next colour: cur_col = (cur_col + 1) mod 3
Sources available @ <https://prino.neocities.org/zOS/zOS-Tools.html>
[Sounds right. Keep in mind that this paper is from almost 50 years
ago, and the comments on the web site said it was trivial, written for
a conference where you needed to submit a paper to go, then he went
and decided it wasn't worth it. -John]
and for the next colour: cur_col = (cur_col + 1) mod 3
Sources available @ <https://prino.neocities.org/zOS/zOS-Tools.html>
If it were nothing more than that , the book would not have called it ingenious. Obviously it will have to fit with the rest of the algorithm without breaking the invariants which guarantee correctness. It also
says "a single instruction". I don't think that
cur_col = (cur_col + 1) mod 3
can be implemented in a single instruction in common hardware.
[Hm, you're right, x+1 mod 3 is not a likely instruction. -John]
Leslie Lamport
Garbage Collection with Multiple Processes: an Exercise in Parallelism
Proceedings of the 1976 International Conference on Parallel Processing,
T. Feng, ed., 50-54.
On Friday, September 23, 2022 at 11:33:30 AM UTC-7, Spiros Bousbouras wrote:
and for the next colour: cur_col = (cur_col + 1) mod 3
Sources available @ <https://prino.neocities.org/zOS/zOS-Tools.html>
If it were nothing more than that , the book would not have called it
ingenious. Obviously it will have to fit with the rest of the algorithm
without breaking the invariants which guarantee correctness. It also
says "a single instruction". I don't think that
cur_col = (cur_col + 1) mod 3
can be implemented in a single instruction in common hardware.
(snip)
[Hm, you're right, x+1 mod 3 is not a likely instruction. -John]
Maybe not common hardware today, but 50 years ago?
It would seem more likely on a machine with a word size a
multiple of 3, with 36 bit words not so rare 50 years ago.
The PDP-10 byte addressing instructions allow bytes
between 1 and 36 bits. I never learned all the tricks with them,
but if you use 12 bit bytes, the bit offset will cycle 0, 12, 24.
That is, you can sequentially address thirds of
the 36 bit words.
I did do PDP-10 assembly programming, but not quite enough
to learn all the tricks.
[I did a lot of PDP-8 and PDP-10 programming and I am pretty sure
there was no way to do x+1 mod 3 in a single instruction, not even
with tricky IDIVI with an indexed immediate operand. -John]
It also
says "a single instruction". I don't think that
cur_col = (cur_col + 1) mod 3
can be implemented in a single instruction in common hardware.
It would seem more likely on a machine with a word size a
multiple of 3, with 36 bit words not so rare 50 years ago.
What about
int a[] = {1, 2, 0};
cur_col = a[cur_col];
That would qualify as a single indexed load, provided cur_col
started out with a value between 0 and 2.
[Duh, of course that will work on any word addressed machine. -John]
But not if index registers are different from other registers, like
(if I remember) they are on the 7090.
[Yes, the 704 series had separate index registers. It occurs to me that another way to do this is to use the rotate instructions the 70x and PDP-6/10 had. Since the word is 36 bits, you rotate by 12 each time and you'll have three bit patterns. -John]
| Sysop: | Keyop |
|---|---|
| Location: | Huddersfield, West Yorkshire, UK |
| Users: | 715 |
| Nodes: | 16 (2 / 14) |
| Uptime: | 11:06:43 |
| Calls: | 12,100 |
| Files: | 15,003 |
| Messages: | 6,517,992 |