Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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
Topic is Operating Systems.
QUESTION 1 The problems associated with concurrent threads of execution are CA. not present in distributed systems. GB. unique on systems where execution threads are overlapped and interleaved. oc. similar on a uni-processor system and on a multiprocessor system. UD. present only if concurrent threads communicate directly with each other. Hint: a distributed system e... cluster has concurrency problems if participants share data: concurrency, probiens in hardware CPU registers and cache oberency) are taken care of in hardware with a single processor, tasks are Interleaved on multiprocessor, tasks are overlapped - the execution traces reflect the difference concurrency problems are the same whether on a uniprocessor, multiprocessor or a distributed sytem even f processes do not communicate they still must compete for Shared hardware enources QUESTION 2 Assume processes P1 and P2 are competing for resource R. Starvation in the strictest definition of the term) OA. occurs if Pl is not granted as much access to R as Pl desires. OB. Occurs i Pl is indefinitely denied access to R and cannot proceed. oc. could be prevented it access to R is controlled by a strong semaphore. OD. could be prevented if access to R is controlled by a priority queue. Hint in the Stalling text.strong semaphore is so that could prevent starvation - a weak Bentaphore can synchronite but does not prevent starvations a priority quee may still lead to starvation if a high priority process continuously preempts a low priority process: starvation in the steletest sanse means NO access to a resource that the process needs to proceed - it is not always the case that limited access to a resource cente in starvation. QUESTIONS In Syst message queues OA. the receiver can be setup to block until a message is in the queue. OB. messages by default are picked up by the receiver in TIPO order. Oc. nsgrevid, msg, size, 0, IPC_NOMAIT) biocks until a mag arrives. OD. msgsnd blocks it the queue is fuil. C Hint: SysV nogsnd will block 1 the guese is full - in this sense henge que ce a producer/consumer bounded buffer problem: mage blocks by default if the questy - 1EC_NOMAIT does not block: message 200000 can be completely asynchronous without causing problem except in the case of a full que QUESTION The Producer-Consumer problem CA. requires synchronization and mutual exclusion mechanisms. B. generally assumes a bounded buffer. OC. can have multiple producers and multiple consumers. OD. involves a consumable resource. Hint: in the claskie -c problem there are generally multiple producer and one consumer but can involve multiple consumers and multiple producers as long as there is mutual exclusion on the buffer for products as well as consumers; it the resource were not consumable P-C would simply be a problem of mutual exclusion without any synchronization with an unbounded butter the only blocking occurs with the consumer on an empty befter but since an unbounded butter is never implemented the solutions always assume a bounded buffer. QUESTIONS For a System V semaphore the OA. 1 operation does not bloek. OB. O operation blocks until sem value is greater than 0. OC. O operation assigns O to sen_value. OD. -1 Operation blocks until sen_value is greater than or equal to 1. Hint: theoretically increment operations never black - 1 you try to increment past the size of sem value toon leipnir it is an unsigned short - 32,767 - an error is returned; sya se values are never allowed to drop below teror if an decement operation needs to occur the procesa blocks until the sen value is large enough to perform the decrementa a operation means block until non value is di Some questions could have multiple correct answers.
Choose all correct answers.
a point for each correct answer selected.
a half-point off for each incorrect answer selected.
Choose all correct answers.
a point for each correct answer selected.
a half-point off for each incorrect answer selected.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started