jserv/xv6-x86_64

Implement POSIX semaphores

jserv opened this issue · 0 comments

jserv commented

POSIX semaphores allow processes and threads to synchronize their actions.

A semaphore is an integer whose value is never allowed to fall below zero. Two operations can be performed on semaphores: increment the semaphore value by one (sem_post); and decrement the semaphore value by one (sem_wait). If the value of a semaphore is currently zero, then a sem_wait operation will block until the value becomes greater than zero.

POSIX semaphores come in two forms: named semaphores and unnamed semaphores.

Initial implementation: https://github.com/MrHohn/cs518hw2/commits/sp15-hw2