Question: Topic is Operating Systems. Some questions could have multiple correct answers. Choose all correct answers. a point for each correct answer selected. a half-point off
Choose all correct answers.
a point for each correct answer selected.
a half-point off for each incorrect answer selected.
QUESTION 21 Processes that pass execution control back and forth between themselves but do not have separate threads of execution are (1 answer) A. threads. OB. coroutines. oc. busy waiting processes. OD. there is no such thing. Hint: coroutines are implemented in python QUESTION 22 A pthread mutex is similar to a binary semaphore with the key difference being that the thread that locks a mutex must be the thread to unlock it. OA. True OB. False Hint: If a thread attempts to unlock a mutex that it has not locked or a mutex which is unlocked, undefined behavior results. QUESTION 23 Semaphores can impact code readability. To overcome this Java uses OA. message passing. OB. monitors. Hint: message passing cannot always replace a semaphore. QUESTION 24 If two processes Pl and P2 are directly aware of each other OA. then p1 and P2 can cooperate by sending signals. OB. either process could starve on a consumable or on a reusable resource. c. the two could deadlock with each other on a consumable resource. OD. the two could deadlock with each other on a renewable resource. Hints: D is true since deadlock can occur on a resource managed by the kernel thardware falls into this category: direct commu ion means communication by D signals are direct communication); if signals are not synchronized one or both of the processes could deadlock waiting indefinitely for a missed signal or one that never comes; renewable resources include CPU, memory, 1/0 devices - all stuff scheduled by the kernel (no awareness is required for this form of deadlock): semaphores are also rousable (only indirect awareness is required for this form of communication). Tho processes that are directly aware deadlock ONLY on consumable resources as a consequences of direct awareness - they could still deadlock while sharing a renewable resource but this is not due to direct communication. QUESTION 25 In an effective implementation of mutual exclusion OA. a critical section of code is entered by one process at a time. B. deadlock and starvation are either avoided, prevented, or recovered from. oc. the speed of the processor is considered. OD. processor utilized is optimized. mack Hint: processor speed and utilization is unrelated to mutual exclusion algorithms
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
