Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please answer these questions below with explanation: 1) How can the scheduler minimize average user response time? 2) How do hardware devices request service from

Please answer these questions below with explanation:

1) How can the scheduler minimize average user response time?

2) How do hardware devices request service from the operating system, and how is this implemented?

3a) Using the code below, state one goal that is NOT satisfied and provide an execution sequence that violates the goal.

3b) Using the code below, select one goal that IS satisfied and give a brief explanation that justifies why the goal is met for all possible execution sequences. Assume a common variable: lock = false; and assume the existence of an atomic (non-interruptible) test_and_set function that returns the value of its Boolean argument and sets the argument to true.

//Process 1

while (true) {

while(test_and_set(lock));

Critical section;

lock = false;

Noncritical section;

}

//Process 2

while (true) {

while(test_and_set(lock));

Critical section;

lock = false;

Noncritical section;

}

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions