[Solved] The solution to critical section problem must ensure followi (2024)

  • Home
  • Operating Systems
  • Concurrency and Synchronization
  • Critical Section

Question

Download Solution PDF

This question was previously asked in

UPPCL AE CS 2019 Official Paper (Held on 5 Nov 2019)

Download PDF

Attempt Online

View all UPPCL Assistant Engineer Papers >

  1. Only Mutual Exclusion and Progress
  2. Only Mutual Exclusion and Bounded Waiting
  3. Mutual Exclusion, Progress, and Bounded Waiting
  4. Only Progress and Bounded Waiting

Answer (Detailed Solution Below)

Option 3 : Mutual Exclusion, Progress, and Bounded Waiting

Detailed Solution

Download Solution PDF

The correct answer is option 3.

Concept:

Any solution to the critical section problem must satisfy three requirements:

Mutual Exclusion :

If a process is executing in its critical section, then no other process is allowed to execute in the critical section.

Progress :

If no processes are running in the critical section and others are waiting outside the critical section, only those processes that aren't running in their remainder portion can decide on which processes should run in the critical section next, and the decision cannot be postponed forever.

Bounded Waiting :

After a process has made a request to access its critical section and before that request is approved, a limit on the number of times other processes are allowed to enter their critical sections must exist.

Hence the correct answer isMutual Exclusion, Progress, and Bounded Waiting.

Download Solution PDFShare on Whatsapp

Latest UPPCL Assistant Engineer Updates

Last updated on Oct 21, 2023

UPPCL Assistant Engineer 2024 Notification to be out soon.UPPCL Assistant Engineer Civil Final Result & Cut-Off Out. The Uttar Pradesh Power Corporation Limited has released the Final result of UPPCL after conducting CBT & Interview.This is with reference to Advt. No.05/VSA/2022/AE/Civil. The result was released in the form of a PDF File and the candidates can check out their roll numbers in the PDF by using Ctrl+F. Also, note that the recruitment isfor 14 vacancies of AE Civil (Advt. No. 05/VSA/2022/AE/Civil). The selection process for UPPCL AEincludes CBT and Personal Interview. The salary of the finally appointed candidates will be as per Pay Matrix Level 10.

India’s #1 Learning Platform

Start Complete Exam Preparation

Get Started for Free

Download App

Trusted by 5.3 Crore+ Students

More Critical Section Questions

Q1. If three threads are trying to share a single object at the same time which condition will arise in the scenario?

Q2. To avoid the race condition, the number of processes that may be simultaneously inside their critical section is

Q3. The solution to critical section problem must ensure following conditions:

Q4. Consider the following policies for preventing deadlock in a system with mutually exclusive resources.I. Processes should acquire all their resources at the beginning of execution. If any resource is not available, all resources acquired so far are releasedII. The resources are numbered uniquely, and processes are allowed to request for resources only in increasing resource numbersIII. The resources are numbered uniquely, and processes are allowed to request for resources only in decreasing resource numbersIV. The resources are numbered uniquely. A process is allowed to request only for a resource with resource number larger than its currently held resourcesWhich of the above policies can be used for preventing deadlock?

Q5. Mutual exclusion problem occurs

Q6. The following two functions P1 and P2 that share a variable B with an initial value of 2 execute concurrently.P1 ( ) { P2 ( ) {C = B – 1;D = 2 * B;B = 2 * C;B = D – 1;}}The number of distinct values that B can possibly take after the execution is __________.

Q7. Suppose P, Q and R are co-operating processes satisfying Mutual Exclusion condition. Then if the process Q is executing in its critical section then

Q8. To overcome difficulties in Readers-Writers problem, which of the following statement/s is/are true?1) Writers are given exclusive access to shared objects2) Readers are given exclusive access to shared objects3) Both readers and writers are given exclusive access to shared objects.Choose the correct answer from the code given below:

Q9. Consider three concurrent processes P1, P2 and P3 as shown below, which access a shared variable D that has been initialized to 100.P1P2P3::D = D + 20::::D = D - 50::::D = D + 10::The processes are executed on a uniprocessor system running a time-shared operating system. If the minimum and maximum possible values of D after the three processes have completed execution are X and Y respectively, then the value of Y - X is __________.

More Concurrency and Synchronization Questions

Q1. Which of the following statements are CORRECT?(A) A process always check state of currently executing process to enter critical schema.(B) Spin locks uses busy waiting.(C) Periodically testing a variable until some value appear is known as busy waiting.(D) Critical region is a part of program, where shared memory is kept.(E) Printer daemon, continuously checks to see if there are any file to be printed.Choose the correct answer from the options given below:

Q2. At a particular time of computation, the value of a counting semaphore is 7. Then 20 p operations and 'x' V operations were completed on this semaphore. If the final value of semaphore is 5. x will be

Q3. In design protocol of critical section problem, each process must ask permission to enter critical section in __________ code; it then executes in the critical section; once it finishes executes in the critical section it enters the__________code. The process then enters the__________code.

Q4. Match List I with List II:List IList II(A)Least frequently used(I)Memory is distributed among processors(B)Critical Section(II)Page replacement policy in cache memory(C)Loosely coupled multiprocessor system(III)Program section that once begin must complete execution before another processor access the same shared resource(D)Distributed operating system organization(IV)O/S routines are distributed among available processors.Choose the correct answer from the options given below:

Q5. A counting semaphore was initialized to 8. Then 12 P (wait) operations and 7 V (signal) operations were completed on this semaphore. The resulting value of semaphore is -

Q6. If three threads are trying to share a single object at the same time which condition will arise in the scenario?

Q7. Which of the following statements is true?

Q8. Which of the following is the solution of the priority inversion problem?

Q9. Inter-process communication

Q10. To avoid the race condition, the number of processes that may be simultaneously inside their critical section is

[Solved] The solution to critical section problem must ensure followi (2024)
Top Articles
Latest Posts
Article information

Author: Barbera Armstrong

Last Updated:

Views: 6512

Rating: 4.9 / 5 (79 voted)

Reviews: 94% of readers found this page helpful

Author information

Name: Barbera Armstrong

Birthday: 1992-09-12

Address: Suite 993 99852 Daugherty Causeway, Ritchiehaven, VT 49630

Phone: +5026838435397

Job: National Engineer

Hobby: Listening to music, Board games, Photography, Ice skating, LARPing, Kite flying, Rugby

Introduction: My name is Barbera Armstrong, I am a lovely, delightful, cooperative, funny, enchanting, vivacious, tender person who loves writing and wants to share my knowledge and understanding with you.