![]() |
![]() |
|
02152 Concurrent Systems Fall 2008 |
Monday, September 22 |
Home | Plan | Material |
<-prev | next-> |
8.15- 9.50 |
Spinlocks in Linux Introduction to Semaphores
Bounded buffers
|
Today |
Introduction to semaphores: [Andrews 4.1-4.2]. Semaphore invariant: [Basic 3.6].
|
Coming |
Programming with semaphores: [Andrews 4.3-4.5].
|
Exercises | 1. Do Exercise Andrews Ex. 4.14 (be careful about the ordering)
|
Mini-labs | Try out CP Mini Lab 3
|
The source files for the traditional Linux Spin-locks discussed at the lecture can be found here (kernel version 2.6.22.6):
Lock types:
include/asm-i386/spinlock_types.h
Lock code:
include/asm-i386/spinlock.h
See especially __raw_spin_lock(), and ___raw_spin_unlock().
If you want to study the the new, fair (ticket-based) spin-locks yourself, you can find them here (kernel version 2.6.26.5):
Lock types:
include/asm-x86/spinlock_types.h
Lock code:
include/asm-x86/spinlock.h
A discussion of the idea can be found in this Linux Weekly News article.
Hans Henrik Løvengreen, Sep 22, 2008 |