152 views
3 3 votes

For a correct mechanism controlling entry into a critical section, consider the following requirements:

  1. Two processes must not execute simultaneously inside their critical sections.
     
  2. If the critical section is free, an eligible process should be allowed to enter.
     
  3. A process waiting to enter its critical section should not wait indefinitely.
     
  4. A process that cannot enter its critical section must immediately relinquish the CPU.
     

Which statements are fundamental requirements of a correct critical-section solution?

  1. I and IV only
     
  2. II and III only
     
  3. I, II and III only
     
  4. I, III and IV only

1 Answer

0 0 votes

Statement I: True

This is mutual exclusion.

At most one process can execute in the critical section at a time.

 

Statement II: True

This corresponds to progress.

If nobody is in the critical section and some process wants to enter, selection should not be postponed indefinitely.

 

Statement III: True

This corresponds to bounded waiting.

Once a process requests entry, there must be some finite bound on how long it can be postponed.

 

Statement IV: False

A process that cannot enter need not necessarily give up the CPU.

For example, some valid synchronization techniques use busy waiting or spinning.

Therefore immediate relinquishing of the CPU is not a fundamental correctness requirement.

Answer:
Position:
Show:

Related questions

8 8 votes
2 2 answers
248
248 views
GO Classes asked Aug 29
248 views
Six students share $3$ knives and $3$ forks.To eat, every student always performs the following operations in this order:Acquire one knife. Acquire one fork. Eat. Release...
1 1 vote
1 1 answer
153
153 views
GO Classes asked Aug 29
153 views
Suppose several processes have opened and are sharing the same file $F$.Which statement is correct?All processes may open $F$ only in read mode. The system-wide open-file...
4 4 votes
1 1 answer
175
175 views
GO Classes asked Aug 29
175 views
In a system, the sizes of most programs are less than or equal to half of the current page size.The system is short of physical memory and is already operating near its p...
3 3 votes
1 1 answer
166
166 views
GO Classes asked Aug 29
166 views
Three processes enter the ready queue as follows. A larger priority value means higher priority.$$\begin{array}{|c|c|c|c|}\hline\text{Process} & \text{Arrival Time} & \te...