Rickvian aldi / 1601253441 / 02PCT Review question
1. What are the three possible levels of concurrency in programs? -Instruction level, Statement level, and Unit level
2. Describe the logical architecture of an SIMD computer. -Computers that have multiple processors that execute the same instruction simultaneously
3. Describe the logical architecture of an MIMD computer. -Computers that have multiple processors that operate independently but whose operations can be synchronized
4. What level of program concurrency is best supported by SIMD computers? -Instruction concurrency level
5. What level of program concurrency is best supported by MIMD computers? -Unit concurrency level.
6. Describe the logical architecture of a vector processor. -Vector processors have groups of registers that store the operands of a vector operation in which the same instruction is executed on the whole group of operands simultaneously
7. What is the difference between physical and logical concurrency? -Physical concurrency – Multiple independent processors (multiple threads of control) Logical concurrency – The appearance of physical concurrency is presented by time-sharing one processor (software can be designed as if there were multiple threads of control)
8. What is a thread of control in a program? -A thread of control in a program is the sequence of program points reached as control flows through the program
12. What is a heavyweight task? What is a lightweight task? -Heavyweight tasks execute in their own address space. Lightweight tasks all run in the same address space – more efficient
1. Explain clearly why competition synchronization is not a problem in a programming environment that supports coroutines but not concurrency. answer: Competition synchronization is not necessary when no actual concurrency takes place simply because there can be no concurrent contention for shared resources. Two nonconcurrent processes cannot arrive at a resource at the same time.
2. What is the best action a system can take when deadlock is detected? When deadlock occurs, assuming that only two program units are causing the deadlock, one of the involved program units should be gracefully terminated, thereby allowed the other to continue.
3. Busy waiting is a method whereby a task waits for a given event by continuously checking for that event to occur. What is the main problem with this approach? The main problem with busy waiting is that machine cycles are wasted in the process.
4. In the producer-consumer example of Section 13.3, suppose that we incorrectly replaced the release(access) in the consumer process with wait(access). What would be the result of this error on execution of the system? Deadlock would occur if the release(access) were replaced by a wait(access) in the consumer process, because instead of relinquishing access control, the consumer would wait for control that it already had.