OS 題庫6

1.25
mutal exclusion
progress: 只有離開critical section的process才能決定誰進入
bounded waiting

1.26
Preemptive 或 nonpreemptive kernels
為什麼這會是solution呢

1.27
wait()即是semaphore--
signal()即是semaphore++

1.28
first reader-writers只要在writer獲得permission to use the shared database時讓reader等待
second one則是要讓writer ready時馬上就可以有使用權,所以writer等待時應該不能有reader加入

1.29
跳過

1.30
Software transactional memory(STM)是透過在transaction blocks中加入instrumentation code來完成
Hardware transactional memory(HTM)則是透過硬體,using cache hierarchies和cache coherency protocols來解決conflict。

1.31
跳過

1.32
跳過

1.33
跳過

1.34
跳過

1.35
semaphore一次只能讓一個process存取shared data,reader-writer lock的好處是一次可以有多個reader。如果process很好分辨其是否只有reading,而且有多個reader,那reader-writer lock比ˇ較適合。

1.36
跳過



留言