Multiple Choice Questions 5
Question1
Concurrency plays a major part in which of the following specific contexts:
选择一个答案
a. Multiple applications |
b. All of the above √ |
c. Structured applications |
d. O/S structure |
Question2
In order to implement mutual exclusion on a critical resource for competing processes, only one program at a time should be allowed
选择一个答案
a. In the critical section of the program √ |
b. None of the above |
c. To Exhibit cooperation |
d. To perform message passing |
Question3
The following requirement must be met by any facility or capability that is to provide support for mutual exclusion:
选择一个答案
a. All of the above √ |
b. Only one process at a time can be allowed into a critical code section |
c. A process remains in its critical code section for a finite time only |
d. No assumptions can be made about relative process speeds |
Question4
Processes that are designed to be able to pass execution control back and forth between themselves are referred to as
选择一个答案
a. None of the above |
b. Threads |
c. Coroutines √ |
d. Busy waiting processes |
Question5
Processes that are designed to be able to pass execution control back and forth between themselves are referred to as
选择一个答案
a. Coroutines √ |
b. Threads |
c. None of the above |
d. Busy waiting processes |
Question6
In a uniprocessor system, mutual exclusion can be guaranteed by
选择一个答案
a. Interleaving processes |
b. Disabling interrupts √ |
c. Overlapping processes |
d. All of the above |
Question7
A semaphore that does not specify the order in which processes are removed from the queue is called a
选择一个答案
a. Binary semaphore |
b. Weak semaphore √ |
c. None of the above |
d. Strong semaphore |
Question8
The finite circular buffer is used to implement which of the following basic queuing strategies
选择一个答案
a. LIFO |
b. FILO |
c. FIFO √ |
d. None of the above |
Question9
A chief characteristic of a monitor is:
选择一个答案
a. A maximum of two processes may be executing in a monitor at a time |
b. All of the above |
c. Local data variables of the monitor are accessible by any procedure requesting use of the monitor |
d. A process enters the monitor by invoking one of its procedures √ |
Question10
In synchronization involving message passing, the sender of a message can be
选择一个答案
a. Only blocking |
b. All of the above |
c. Only non-blocking |
d. Either blocking or non-blocking √ |
Question11
In a system employing message passing, when a message is sent to a shared temporary data structure, this general approach is known as
选择一个答案
a. Direct addressing |
b. Blocking |
c. Indirect addressing √ |
d. None of the above |
Question12
In a system employing message passing, the typical message is divided into two primary sections
选择一个答案
a. None of the above √ |
b. Body and mailbox |
c. Destination ID and Source ID |
d. Header and mailbox |
Question13
The Reader/Writer problem requires that certain conditions be satisfied, such as:
选择一个答案
a. Any number of readers may simultaneously read from the file √ |
b. None of the above |
c. Readers may read from the file while writers are writing to it |
d. Multiple writers may write to the file simultaneouslyAny number of readers may simultaneously read from the file |
Question14
A reason why the Producer/Consumer problem cannot be considered a special case of the Reader/Writer problem with a single writer (the producer) and a single reader (the consumer) is:
选择一个答案
a. None of the above |
b. The Producer/Consumer problem doesn’t deal with concurrency issues |
c. The producer and consumer must be both reader and writer √ |
d. The consumer must perform writes while the reader performs reads |
Question15
Examples of solutions to the concurrency problem that do not involve busy waiting are the following:
选择一个答案
a. None of the above √ |
b. Semaphores and monitors |
c. Producers and consumers |
d. Message passing and caching |
Question16
A basic echo procedure (that echoes a typed character to the screen) running on a multiprocessor system can produce erroneous output if
选择一个答案
a. Two processes deadlock while in the echo code |
b. Access to the echo procedure is unsynchronized √ |
c. None of the above |
d. Access to the echo procedure is synchronized |