Question

Q4. Describe the requirements that a solution to the critical section problem must have.

Q4. Describe the requirements that a solution to the critical section problem must have.

0 0
Add a comment Improve this question Transcribed image text
Answer #1

1) Mutual exclusion ;: if one process is in the the (shared region) no other process shouldn't access the critical section (shared region)

2) Progress : entering into critical section of one process shouldn't depends on other process which is not in critical section.... If P1 doesn't need critical section then it shouldn't stop P2 to execute the critical section

3) Bounded waiting : limit on the number of times a process get into critical section after other process made a request to enter into critical section....

These requirements can be soolved by hardware solutions and software solutions..

Add a comment
Know the answer?
Add Answer to:
Q4. Describe the requirements that a solution to the critical section problem must have.
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • What are the three requirements for a solution to the critical-section problem? Consider the following solution...

    What are the three requirements for a solution to the critical-section problem? Consider the following solution to the dining-philosophers' problem. // Global variables. Shared among threads int state [5]; semaphore mutex; I/ Initially set to 1 semaphore s [5] I Initially s[i] is set to 0 for all i Initially statei]-THINKING for all i void philosopher (int i) f int left(int i) f // Philosopher to the left of i // % is the mod operator. while(TRUE) thinkO take.forks ()...

  • Following is the hardware TestAndSet solution for critical-section problem. Can this solution sat...

    Following is the hardware TestAndSet solution for critical-section problem. Can this solution satisfy bounded waiting? Explain your answer. Shared boolean variable: lock (initialized to false) Solution: while (true) { while(TestAndSet(&lock)) ; /*do nothing //critical section lock = FALSE; //remainder section }

  • The following code fragment is a 2-process "solution" to the critical section problem try ] =...

    The following code fragment is a 2-process "solution" to the critical section problem try [i] = true ; while (incs[j]) no-op; while (turn=j and try[j]) no-op; incs [i] = true ; critical section try [i] = false; incs [i] = false; turn = j ; Does the above "solution" meet all 3 conditions of critical sections? Please explain your answer.

  • a. Given the solution for the critical section problem for two processes (the code shown is...

    a. Given the solution for the critical section problem for two processes (the code shown is for processes Pi), show why it does not satisfy the mutual exclusion requirement. Here, lock is a shared variable initialized to FALSE. (Hint: Indicate one scenario where the mutual exclusion requirement is violated.): do { while (lock); lock=TRUE Critical section lock=FALSE; Remainder section } b. What happens if lock is initialized to TRUE in the code above?

  • a)Given the following solution for the critical section problem for two processes (the code shown is for processes Pi),...

    a)Given the following solution for the critical section problem for two processes (the code shown is for processes Pi), show why it does not satisfy the mutual exclusion requirement. Here,lock is a shared variable initialized to FALSE. (Hint: Indicate one scenario where the mutual exclusion requirement is violated.) do {            lock = FALSE;           while (lock);           lock = TRUE         Critical section           /Empty section                   Remainder section } (b)Does this satisfy the progress requirement? Justify your answer

  • Question #7 Generally, both P and V operation must be implemented as a critical section. Are...

    Question #7 Generally, both P and V operation must be implemented as a critical section. Are there any cases when any of these two operations can safely be implemented as a non-critical section? If yes, demonstrate through an example when/how this can be done without creating any violations. If no, explain why these operations must always be implemented as critical sections. Question #8 What is the potential problem of multiprogramming? Chestis the potential prob

  • Prove that mutual exclusion is satisfied by the following algorithm for the critical section problem: (image...

    Prove that mutual exclusion is satisfied by the following algorithm for the critical section problem: (image attached) Note that the if statement is atomic. By "if statement is atomic" it means that lines p2 and q2 are either executed in their entirety once execution begins. No interleaving is possible for example, between the "if" test and the assignment of wantp/wantq.   You must prove the appropriate program invariant with the help of induction. It's okay to prove lemmas through program invariant-induction...

  • Describe the environment in which you will operate and the critical operational factors that you must...

    Describe the environment in which you will operate and the critical operational factors that you must consider and how they will affect your company. (Moving our container home company to Canada)

  • Job postings often state that the successful applicant must have superior critical thinking and problem-solving skills....

    Job postings often state that the successful applicant must have superior critical thinking and problem-solving skills. Yet employers tell college administrators that graduates, both from undergraduate and graduate programs, often lack these skills. 1. How would you define critical thinking? 2. Why are employers making these comments? Are they justified? Your response should be at least 250 words. Please use your own words and be sure to reference your sources.

  • Section 6.2 Solution of IVP Section 6.2 Solution of I.V.P: Problem 4 Problem 4 User Settings...

    Section 6.2 Solution of IVP Section 6.2 Solution of I.V.P: Problem 4 Problem 4 User Settings Previous Problem Problem List Next Problem Grades (1 point) Use the Laplace transform to solve the following initial value problem: Problems C y" +by' = 0 y(0) = 2, y'(0) = 1 a. Using Y for the Laplace transform of y(t), i.e., Y = C{y(t)}, find the equation you get by taking the Laplace transform of the differential equation b. Now solve for Y(8)...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT