Question: 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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!