发布时间 : 星期三 文章计算机操作系统习题及答案(4)更新完毕开始阅读82a86f6d85868762caaedd3383c4bb4cf6ecb7e6
cobegin hunter( ); peasant( ); zoo( ); restaurant( ); coend } hunter( ) { while (true) {
P(cage); place a tiger; V(tiger); } } peasant( ) { while (true) {
P(cage); place a pig; V(pig); } } zoo( ) { while (true) {
P(tiger); take a tiger; V(cage); } }
restaurant( ) { while (true) {
P(pig); take a pig; V(cage); }
}