进程P1、P2、P3、P4、P5的前趋图如下。

若用PV操作控制进程并发执行的过程,则需要相应于进程执行过程设置5个信号量S1、S2、S3、S4和S5,且信号量初值都等于零。下图中a处应填写( )b和c、d和e处应分别填写( )f、g和h应分别填写(请作答此空)。

- A.P(S3)V(S4)、V(S5)和P(S5)
- B.V(S3)V(S4)、P(S5)和V(S5)
- C.P(S3)P(S4)、V(S5)和P(S5)
- D.V(S3)P(S4)、P(S5)和V(S5)
正确答案及解析
正确答案
解析
根据前驱图,P1进程运行结束需要利用V操作分别通知P2和P3进程,所以用V (SI)操作通知P2进程,用V (S2)操作通知P3进程。根据前驱图,P2进程开始运行前必须等待P1进程的通知,需要用P (S1)操作测试PI进程是否运行完,P2进程运行结束而要利用V (S3)操作通知P4进程。同理根据前驱图P3进程开始运行前必须等待P1进程的通知,需要用P(S2)操作测试P1进程是否运行完,P3进程运行到结束需要利用V (S4)操作通知P4进程。根据前驱图,P4进程开始运行前必须等待P2和P3进程的通知,需要用P (S3)和P (S4)操作分别测试P2和P3进程是否运行完,故空f应填写P (S3) P (S4) 0 P4进程运行结束需利用V (S5)操作通知P5进程,故空g应填写V(S5) o根据前驱图,P5进程开始运行前必须等待P4进程的通知,需要用P (S5)操作测试P4进程是否运行故空(17)填写P (S5)。
包含此试题的试卷
你可能感兴趣的试题
The Internet of( 1)(IoT) describes physical objects that are embedded with Sensor,processing abilities,softwares,and other technologies that connect with other devices and systems over the ( 2) or other communication and exchange data networks .Over the past few years, IoT has become one of the most important technologies of the ( 3 ) centuryWe can connect objects to the Internet via embedded devices. By means of( 4) computing, the cloud, big data, and mobile technologies, physical things can share and collect data with minimal human intervention. Traditional fields of embedded systems,wireless ( 5) networks (WSNs),control systems,automation, independently and collectively enable IoT.回答5处
-
- A.sensor
- B.searching
- C.service
- D.source
- 查看答案
The Internet of( 1)(IoT) describes physical objects that are embedded with Sensor,processing abilities,softwares,and other technologies that connect with other devices and systems over the ( 2) or other communication and exchange data networks .Over the past few years, IoT has become one of the most important technologies of the ( 3 ) centuryWe can connect objects to the Internet via embedded devices. By means of( 4) computing, the cloud, big data, and mobile technologies, physical things can share and collect data with minimal human intervention. Traditional fields of embedded systems,wireless ( 5) networks (WSNs),control systems,automation, independently and collectively enable IoT.回答4处
-
- A.low-level
- B.low-cost
- C.high-cost
- D.high-performance
- 查看答案
The Internet of( 1)(IoT) describes physical objects that are embedded with Sensor,processing abilities,softwares,and other technologies that connect with other devices and systems over the ( 2) or other communication and exchange data networks .Over the past few years, IoT has become one of the most important technologies of the ( 3 ) centuryWe can connect objects to the Internet via embedded devices. By means of( 4) computing, the cloud, big data, and mobile technologies, physical things can share and collect data with minimal human intervention. Traditional fields of embedded systems,wireless ( 5) networks (WSNs),control systems,automation, independently and collectively enable IoT.回答3处
-
- A.19th
- B.20th
- C.21th
- D.22th
- 查看答案
The Internet of( 1)(IoT) describes physical objects that are embedded with Sensor,processing abilities,softwares,and other technologies that connect with other devices and systems over the ( 2) or other communication and exchange data networks .Over the past few years, IoT has become one of the most important technologies of the ( 3 ) centuryWe can connect objects to the Internet via embedded devices. By means of( 4) computing, the cloud, big data, and mobile technologies, physical things can share and collect data with minimal human intervention. Traditional fields of embedded systems,wireless ( 5) networks (WSNs),control systems,automation, independently and collectively enable IoT.回答2处
-
- A.path
- B.Internet
- C.route
- D.switch
- 查看答案
The Internet of( 1)(IoT) describes physical objects that are embedded with Sensor,processing abilities,softwares,and other technologies that connect with other devices and systems over the ( 2) or other communication and exchange data networks .Over the past few years, IoT has become one of the most important technologies of the ( 3 ) centuryWe can connect objects to the Internet via embedded devices. By means of( 4) computing, the cloud, big data, and mobile technologies, physical things can share and collect data with minimal human intervention. Traditional fields of embedded systems,wireless ( 5) networks (WSNs),control systems,automation, independently and collectively enable IoT.回答1处
-
- A.this
- B.thing
- C.think
- D.things
- 查看答案