5.12 在生产者一消费者问题中,如果缺少了V(full)或V(empty),对执行结果会有何影响?
5.12 在生产者一消费者问题中,如果缺少了V(full)或V(empty),对执行结果会有何影响?
参考答案和解析
A
相关考题:
对于有界缓冲区数量为n的生产者-消费者问题来说,应设置互斥信号量mutex、资源信号量full和empty,它们的初值分别应为()。 A.0、1、nB.1、n、0C.n、1、0D.1、0、n
在有N个缓冲区的生产者消费者的问题中,下列叙述中哪些是错误的?producer() { int item; while(TRUE) { item = produce_item(); P(empty); P(mutex); insert_item(item); V(mutex) V(full); } } consumer() { int item; while(TRUE) { P(full); P(mutex); item = remove_item(); V(mutex); V(mutex); consume_item(item); } }A.信号量empty的初值为NB.信号量full的初值为0C.信号量mutex的初值为0D.P(full)和P(mutex)两条语句可以颠倒顺序E.V(mutex)和V(mutex)两条语句可以颠倒顺序
单选题You need to recommend a backup strategy for Hyper-V. What should you recommend?()ATake a snapshot of each VM, and then run a full backup of the Hyper-V hosts by using Windows Server Backup.BShut down the VMs,and then run a full backup of the Hyper-V hosts by using Windows Server Backup. Restart the VMs when the backup is complete.CFrom each VM,run a full backup by using Windows Server Backup, and then run a full backup of the Hyper-V hosts by using Windows Server Backup.DFrom each VM,run a full backup by using Windows Server Backup. Shut down the VMs, and then run a full backup of the Hyper-V hosts by using Windows Server Backup. Restart the VMs when the backup is complete.
问答题如果气泡逸出的很快,或几个气泡一齐出,对实验结果有何影响?