Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

please directly show me the answers from question g to m (8) (3 points) Check al

ID: 3699343 • Letter: P

Question

please directly show me the answers from question g to m (8) (3 points) Check all of the following with a , if any, chronization: the following with a V, if any, that are involved for syn- O multiple processes acoss the same resource O multiple threads access the same resource O deadlock O semaphores b) 8 points) Chec all of the following with a , if auy, tat are the difleace between mutex locks and semaphores O mutex is like a soft-lock O mutex allow multiple-reading operations O semaphores allow multiple-reading operations occur simultaneously O semaphores allow multiple-writing operations occur simultaneously occur simultaneously (i) (3 points) Check all of the following with a V, if any, that are disadvantages to Peterson's solution to the critical section problem: O does not work in multiprocessor systems O does not work in uniprocessor systems O too low-level for application programmers O uses busy waiting O it is too tightly woven into the solution 6) (2 points) (True or False) Threads from the same process can access critical section at the same time. (k) (2 points) (True or False) For process scheduling problem, Round-robin can run for both preemptive and nonpreemptive environment (1) (2 points) Check all of the following with a , if any, that apply when a thread tries to read from an empty channel. O it goes from the running state to the blocked state O it generates an error it goes from the running state to the ready state (m) (2 points) Check all of the following with a v', if any, that are typical problems of synchronization. O bounded buffer O first come first serve O Dining Philosophers

Explanation / Answer

Answer:

g)

Synchrinization involved in 3 above options but semaphore is also involed in that but that solves the above three difficulties.

h)Mutex lock is one type of semaphore.

Mutex is a mutual exclusion object  which is a program object that allows multiple program threads to share the same resource, such as file access, but not simultaneously.It is a lock where process must acquire before entering a critical section and it releases the lock when it exits the critical section.

Answer is :mutex allow multiple reading operations occur simultaneously as

i)disadvantages of peterson's solution to the critical section is that uses busy waiting,while a process in its critical section any other process that tries to enter its critical section must loop continuously in the entry code.

j)Yes,its true thread of same process can access to its critical section at the same time.

k) Yes its also true that Round-robin scheduling can run for both preemtive and non-preemtive process scheduling and has certain time quantum which enable the system to switch between processes

l)when thread tries to read from an empty channel it generates an error.

m)Typical problem of synchronization is bounded-buffer problem it is also known as producer-consumer problem.