1) Classify each of the following statements as true or false: a. An application
ID: 3824847 • Letter: 1
Question
1) Classify each of the following statements as true or false: a. An application can contain a race condition only if the computer system servicing the application contains more than one CPU. b. Control synchronization is needed when processes generate and analyze of Figure 1.6(b) share the variable sample. c. A process may be starved of entry to a critical section if the critical section implementation does not satisfy the bounded wait condition. d. A process may be starved of entry to a critical section if the critical section implementation does not satisfy the progress condition. e. A busy wait is unavoidable unless a system call is made to block a process. f. Indefinite busy waits are possible in an OS using priority-based scheduling, but not possible in an OS using round-robin scheduling. g. Algorithm 6.1 can be used to implement a single-buffer producers–consumers system if processP1 is a producer andP2 is a consumer.
2) 2 A semaphore is initialized to 1. Twelve wait operations and seven signal operations are performed on it. What is the number of processes waiting on this semaphore? a. 12, b. 7, c. 4, d. 5
3)A program contains a single loop that executes 50 times. The loop includes a computation that lasts 50 ms followed by an I/O operation that consumes 200 ms. Ten independent executions of this program are started at the same time. The scheduling overhead of the kernel is 3 ms. Compute the response time of the first process in the first and subsequent iterations if a. The time slice is 50 ms. b. The time slice is 20 ms
subject: Operation system internals
Explanation / Answer
1) Classify each of the following statements as true or false:
a. An application can contain a race condition only if the computer system servicing the application contains more than one CPU.
False, Race condition can be among different process because of multi processing on a single cpu machine.
b. Control synchronization is needed when processes generate and analyze of Figure 1.6(b) share the variable sample.
True, variable sharing needs synchronization (unless both process are just doing read, please note figure is not provided here)
c. A process may be starved of entry to a critical section if the critical section implementation does not satisfy the bounded wait condition.
True, if the wait is not bounded then some process may be waiting for ever to get entry to critical section.
d. A process may be starved of entry to a critical section if the critical section implementation does not satisfy the progress condition.
True, if one of the process stop other process to enter in ciritical section then those process can starve
e. A busy wait is unavoidable unless a system call is made to block a process.
False
f. Indefinite busy waits are possible in an OS using priority-based scheduling, but not possible in an OS using round-robin scheduling.
True, in RR every process get cpu periodically, while in PQ if process of higher priority keep on coming then process might not get cpu cycle/resurce (please note this is considering that OS is not incresing priority based on time spend in waiting queue)
g. Algorithm 6.1 can be used to implement a single-buffer producers–consumers system if processP1 is a producer andP2 is a consumer.
Algorithm 6.1 is not provided so can't comment here.
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.