一起答
单选

桌上有一个空盒,盒内只允许放一个水果。爸爸专向盒内放苹果,妈妈专向盒内放桔子,儿子等着吃盒中的水果(苹果或桔子)。若盒内已有水果,放者必须等待,若盒内没有水果,吃者必须等待。用PV操作来协调3人的关系。请回答下列问题:

 ①应设置的信号量及其初值为SP和1。

 ②在3组工作流程的虚线位置填上适当的PV操作,实现3人正确的活动。

 爸:              准备

 P(SP)

 向盒内放苹果

(15)

 妈:              准备

(16)

 向盒内放桔子

(17)

 儿:

(18)拿盒中的水果(苹果或桔子)

(19)

 吃水果(苹果或桔子)

  • A.P(SP)
  • B.P(SG)
  • C.V(SG)
  • D.V(SP)
参考答案
查看试卷详情
相关试题
  1. (102)

    • A.great
    • B.huge
    • C.mainframe
    • D.large
  2. (103)

    • A.form
    • B.constitutes
    • C.compose
    • D.components
  3. (100)

    • A.with
    • B.on
    • C.in
    • D.upon
  4. (101)

    • A.palling
    • B.pulling
    • C.polling
    • D.isolate
  5. Inside the computer, the operation system(of another software module called a data communication(71))must decide which program will get control next. Each program remember, is associated(72).  a particular front -end port. If a program's data have not yet reached its front - end buffer, there is no point giving that program control. Thus the data communication monitor sends its own(73)signal to the front -end devices next port is polled. Note that the(74)computer speed. The computer never has to wait for a terminal or a communication line. Instead, it is the expressive front - end processor that waits for the slower system(75)to respond.

    • A.memory
    • B.control
    • C.monitor
    • D.charge
  6. (97)

    • A.proceeding
    • B.procedures
    • C.progress
    • D.systems
  7. (98)

    • A.space
    • B.timely
    • C.spatial
    • D.environment
  8. (95)

    • A.documents
    • B.data
    • C.documentation
    • D.media
  9. (96)

    • A.out
    • B.in
    • C.of
    • D.with
  10. Software engineering is the science and art of specifying, designing, implementing, and(66)with economy, timeliness and elegance, programs,(67)and operating procedures whereby computers  can be made useful to humanity.

    This definition implicitly sets(68)the basic goal of software engineering research and development:  The basic goal of software engineering is to facilitate specification, design, implementation and evolution  of programs, documentation and operating(69)which are useful to humanity in an economic,(70)and elegant manner(using the appropriate science and art).

    • A.envelopment
    • B.enveloping
    • C.evolvement
    • D.evolving