no more recursive locks

wakeup1() assumes you hold proc_table_lock
sleep(chan, lock) provides atomic sleep-and-release to wait for condition
ugly code in swtch/scheduler to implement new sleep
fix lots of bugs in pipes, wait, and exit
fix bugs if timer interrupt goes off in schedule()
console locks per line, not per byte
This commit is contained in:
rtm 2006-07-15 12:03:57 +00:00
parent d9872ffa95
commit 46bbd72f3e
15 changed files with 231 additions and 104 deletions

23
Notes
View file

@ -126,3 +126,26 @@ nasty hack to allow locks before first process,
race between release and sleep in sys_wait()
race between sys_exit waking up parent and setting state=ZOMBIE
race in pipe code when full/empty
lock order
per-pipe lock
proc_table_lock fd_table_lock kalloc_lock
console_lock
condition variable + mutex that protects it
proc * (for wait()), proc_table_lock
pipe structure, pipe lock
systematic way to test sleep races?
print something at the start of sleep?
do you have to be holding the mutex in order to call wakeup()?
should lock around printf, not putc
device interrupts don't clear FL_IF
so a recursive timer interrupt is possible
the sleep/swtch/schedule code that holds over a lock is ugly