From 5697ac77987e8e74ba6ab549e712bc3ab97f7bca Mon Sep 17 00:00:00 2001 From: CyC2018 <1029579233@qq.com> Date: Tue, 27 Feb 2018 13:24:26 +0800 Subject: [PATCH] auto commit --- notes/计算机操作系统.md | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/notes/计算机操作系统.md b/notes/计算机操作系统.md index 9a3dddf0..c9bcf230 100644 --- a/notes/计算机操作系统.md +++ b/notes/计算机操作系统.md @@ -258,10 +258,10 @@ shortest remaining time next ### 3. ź -**źSamaphore**һͱԶִ down up Ҳdz P V +**źSamaphore** һͱԶִ down up Ҳdz P V -- **down** : ź 0 ִ - 1 ź 0˯ߣȴź 0 -- **up**źִ + 1 һ˯ߵḶ̌ý down +- **down** : ź 0 ִ -1 ź 0˯ߣȴź 0 +- **up**źִ +1 һ˯ߵḶ̌ý down down up ҪƳԭɷָִͨЩʱжϡ @@ -287,7 +287,7 @@ void P2() { ʹһ mutex ٽԴзʣempty ¼ջfull ¼ -ע⣬ִ down ûٽȶٽȻִ down ߶ٽִ down(empty) empty = 0ʱ˯ߡߴʱܽٽΪ߶ٽˣҲ޷ִ up(empty) ôߺ߾ͻһֱȴȥ +ע⣬ִ down ûٽΪȶٽȻִ down ôܻ߶ٽִ down(empty) empty = 0ʱ˯ߡߴʱܽٽΪ߶ٽˣҲ޷ִ up(empty) ôߺ߾ͻһֱȴȥ ```c #define N 100 @@ -325,7 +325,7 @@ void consumer() { c Բֹ֧̣ܳʾʹ Pascal ̡ܳʾеĹܳṩ insert() remove() ͻ˴ͨ-⡣ -```html +```pascal monitor ProducerConsumer integer i; condition c; @@ -342,13 +342,13 @@ monitor ProducerConsumer end monitor; ``` -ܳһҪԣһʱֻһʹù̡ܳ޷ִеʱһֱռụ̀ܳ뽫Զʹù̡ܳ +ܳһҪԣһʱֻһʹù̡ܳ޷ִеʱһֱռụ̀ܳԶʹù̡ܳ ܳ **** ԼصIJ**wait()** **signal()** ʵִͬ wait() ᵼµýѹܳóһ̳Сsignal() ڻѱĽ̡ **ʹùܳʵ-** -```html +```pascal monitor ProducerConsumer condition full, empty; integer count := 0; @@ -729,11 +729,6 @@ CSCAN # ο - Tanenbaum A S, Bos H. Modern operating systems[M]. Prentice Hall Press, 2014. - - , ܷ, С. ϵͳ[M]. ӿƼѧ, 2001. - - Bryant, R. E., & OHallaron, D. R. (2004). ϵͳ. - -- [Сˢʼ](http://wdxtub.com/interview/index.html) - - [̼ļͨŷʽ](http://blog.csdn.net/yufaw/article/details/7409596)