|
Computer Science 432 Operating Systems Williams College Fall 2006
|
|
Lecture 10: Synchronization Problems, Semaphore Implementations
Date: October 12, 2006
- Announcements
- CS Colloquium this week - CS Faculty discuss their research,
TCL 206, 2:30 PM
- There's Google stuff upstairs - take some
- Upcoming schedule
- Lab 3 already in
- Lab 4 due Tuesday
- Exam out Tuesday, due Thursday
- Lab 5 (bigger) out next Thursday
- Exam information
- it is a 46 hour, 45 minute take home: Tuesday 11:10 AM to
Thursday 9:55 AM
- take as much time as you wish, but expect to spend about 3-4 hours
- you may consult your own notes, the SG&G text, your graded
and ungraded labs and lecture assignments, class examples in the
/usr/cs-local/share/cs432 area, any of my online lecture
notes, and the assigned supplemental readings
- you may write your answers on paper, but I would prefer
typeset responses
- topics up to semaphore implementations are to be covered
- old exam: see below
- Lecture assignment recap - Dining Savages
- POSIX Semaphore Implementation
- SysV Semaphore Example and Implementation
- Monitors, briefly
There is no lecture assignment to submit, but you should spend some
time looking at the problems from the Spring 2005 midterm exam.
Please note that this year's exam is coming earlier in the semester,
so the deadlock material will be covered by our second exam instead.
We will take as much time as you'd like on Tuesday going over
questions from this exam, questions about past lecture assignments,
and any other things you'd like to review before the exam comes out.
- FreeBSD POSIX semaphore implementation:
- actual library calls: /usr/src/lib/libc_r/uthread/uthread_sem.c
- struct sem definition: /usr/src/lib/libc_r/uthread/pthread_private.h
- FreeBSD Pthreads implementations:
- struct pthread_mutex and struct pthread_cond
definitions: /usr/src/lib/libc_r/uthread/pthread_private.h
- spin lock in /usr/src/lib/libc_r/uthread/uthread_spinlock.c
- pthread mutex implementation: /usr/src/lib/libc_r/uthread/uthread_mutex.c
- pthread condition variable implementation: /usr/src/lib/libc_r/uthread/uthread_cond.c
- System V Semaphores:
- prodcons-sysvsemaphore example
- implementation: /usr/src/sys/kern/sysv_sem.c