Computer Science 330
Operating Systems
Spring 2012, Siena College
Lecture 11: Semaphore Implementations; Monitors
Date: Thursday, February 23, 2012
Agenda
- Announcements
- Remember to get your simulators and case studies wrapped up
- If you have turned in labs up to 3 and/or project 1, you
should have gotten a grade a few days ago - let me know if not
- Lecture assignment 10 recap
- Semaphore and mutex implementations
- Monitors
No New Lecture Assignment
You will have plenty to do in lab coming up.
Examples
- POSIX semaphores: /usr/src/lib/libc_r/uthread/uthread_sem.c
and
/usr/src/lib/libc_r/uthread/pthread_private.h.
- pthreads mutexes and condition variables: pthread_private.h,
uthread_mutex.c, and uthread_cond.c in the directory
/usr/src/lib/libc_r/uthread/.
- pthreads spinlock:
/usr/src/lib/libc_r/uthread/uthread_spinlock.c and
/usr/src/lib/libc_r/arch/i386/_atomic_lock.S.