Question: Question 1 : Concurrency ( 1 0 points ) Are the following statements TRUE or FALSE? Justify your answer. [ Note: 2 marks for each

Question 1: Concurrency (10 points)
Are the following statements TRUE or FALSE? Justify your answer.
[Note: 2 marks for each question. No marks will be given without explanation.]
(a) A working solution to a concurrency problem on a multiple core system should also be applicable to a single core system; however, the reverse is not necessarily true.
(b) In the readers-writers problem, threads X and Y are allowed to simultaneously access the shared resource if and only if either X and Y are both reading or X and Y are both writing.
(c) If a thread executes a sem_wait() call on a binary semaphore s , it must eventually execute a sem_post() call on the same semaphore. Failure to do so may result in a synchronization bug.
(d) If thread X calls cond_signal() before thread Y calls cond_wait(), it allows thread Y to return from cond_wait() without blocking.
(e) If thread \( X \) calls sem_post() before thread \( Y \) calls sem_wait(), it allows thread \( Y \) to return from sem_wait() without blocking.
Question 1 : Concurrency ( 1 0 points ) Are the

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!