On 2018-03-08 08:10, Henry Baker wrote:
I'm curious as to the origin of the exch/swap instruction in computer instruction sets.
Does anyone know the first computer having such an instruction?
I'm not interested in the modern "compare-and-swap" type of instruction, which seems to have originated with Maurice Herlihy, but the original, non-conditional type.
I don't think Maurice originated the instruction; I am pretty sure some versions of it predated him by decades (IBM 370). He was just the one who pointed out and proved that it was universal (in the context of non-blocking synchronization), as was the pair LL SC. But I have no answer to your main question, sorry.
Yes, early computer scientists (before they were called that!) loved these instructions because they allowed for clever algorithms like a stackless GC algorithm.
_______________________________________________ math-fun mailing list math-fun@mailman.xmission.com https://mailman.xmission.com/cgi-bin/mailman/listinfo/math-fun