You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
sicp-all-tasks/sicp/3_002e47

17 lines
428 B

Exercise 3.47: A semaphore (of size
n
) is a
generalization of a mutex. Like a mutex, a semaphore supports acquire and
release operations, but it is more general in that up to
n
processes can
acquire it concurrently. Additional processes that attempt to acquire the
semaphore must wait for release operations. Give implementations of semaphores
in terms of mutexes
in terms of atomic test-and-set! operations.