Question

In: Computer Science

Give an example of a Multi-Level Queue with Feedback system. Be sure to fully describe all...

  1. Give an example of a Multi-Level Queue with Feedback system. Be sure to fully describe all relevant aspects of the system.
  2. Aging is used to solve what problem in process scheduling? Explain how it solves it.
  3. What are Hardware Threads? In what way do they impact the Operating System?
  4. Regarding Mutex Locks and Semaphores:
    1. A process wishes to unlock a Mutex Lock entitled “EXCLUDE”. What command does it need to issue?
    2. A process requests use of a resource controlled by a Semaphore entitled “PRINTERS”. What command does it need to issue to indicate this?
  1. Which of the methods used to map user threads to kernel threads can exploit a multiprocessor environment? Justify your answer.
  2. Given the following set of processes, arrival times, and burst times:
    1. Draw a Gantt Chart for Scheduling the processes using Preemptive SJF
    2. Show the calculations for determining average wait time
      (set up the equation; you don’t need to do the math)

Process

Arrival Time

Burst Time

P1

0

7

P2

1

4

P3

2

11

P4

3

8

  1. Given the set of processes, arrival times, and burst times in Question 6:
    1. Draw a Gantt Chart for Scheduling the processes using Non-Preemptive SJF
    2. Show the calculations for determining average wait time
      (set up the equation; you don’t need to do the math)
  1. Consider the following graph. Now, Process 1 wishes to request an instance of Resource 2. Will this request cause a deadlock situation? Why or why not? (You may assume there is only one instance of each Resource).
  1. Two processes need to share large amounts of data. Which method or communication is best suited for them? Under what circumstances might you modify that response?
  2. Consider the following processes in a contemporary automobile:
    • Speed Measurement (S): T=8; D=20; P=20
    • ABS Control (A): T=15; D=45; P=45
    • Fuel Injection (F): T=45; D=80; P=80

Use the Rate Monotonic Scheduling Algorithm to schedule these processes:

  1. Draw the Gantt Chart showing each process’ iterations.
  2. Show if any process fails to meet its deadline within a 3-iteration cycle.

Solutions

Expert Solution

Example of Multi-level queue with feedback system:

Let us consider a framework which has a CPU bound cycle, which requires the burst season of 40 seconds.The staggered Feed Back Queue booking calculation is utilized and the queue time quantum '2' seconds and in each level it is augmented by '5' seconds.Then how frequently the cycle will be hindered and on which queue the cycle will end the execution?

Following arrangements –

Cycle P needs 40 Seconds for complete execution.

At Queue 1 it is executed for 2 seconds and afterward hindered and moved to queue 2.

At Queue 2 it is executed for 7 seconds and afterward hindered and moved to queue 3.

At Queue 3 it is executed for 12 seconds and afterward hindered and moved to queue 4.

At Queue 4 it is executed for 17 seconds and afterward hindered and moved to queue 5.

At Queue 5 it executes for 2 seconds and afterward it finishes.

So that, the cycle is intruded on multiple times and finishes on queue 5.

Aging: It is utilized to guarantee that jobs with lower need will inevitably finish their execution. This method can be utilized to decrease starvation of low priority jobs. There are numerous approaches to execute aging, yet all have a similar rule that the need of a cycle should increment as it holds up in the prepared line.

on the off chance that priority range from 127(low) to 0(high), we could expand the priority of a holding up measure by 1 Every 15 minutes. In the end even a cycle with an underlying priority of 127 would take close to 32 hours for priority 127 cycle to age to a priority-0 cycle.

Hardware Thread: It is a physical CPU or center. Thus, a 4 center CPU can truly uphold 4 hardware threads on the double - the CPU truly is completing 4 things simultaneously. One hardware thread can run numerous product threads. ... As to hardware threads, the OS attempts to plan threads to centers, if there are adequate centers.

Regarding Mutex Locks and Semaphores:

a.) Command to unlock a mutex lock entitiled "EXCLUDE" is given as -
pthread_mutex_unlock(&EXCLUDE);

b.) Command to indicate request use of resource controlled by semaphore named "PRINTERS" is given by -
wait(PRINTERS);
/*
this command will decrement value of semaphore PRINTERS by 1 if it's value is greater than 0, otherwise it
waits until PRINTERS > 0 */

Gantt Chart for Scheduling the processes using Preemptive SJF:

Gantt Chart for Scheduling the processes using Non-Preemptive SJF:


Related Solutions

Give an example of a Multi-Level Queue with Feedback system. Be sure to fully describe all...
Give an example of a Multi-Level Queue with Feedback system. Be sure to fully describe all relevant aspects of the system. Aging is used to solve what problem in process scheduling? Explain how it solves it. What are Hardware Threads? In what way do they impact the Operating System? Regarding Mutex Locks and Semaphores: A process wishes to unlock a Mutex Lock entitled “EXCLUDE”. What command does it need to issue? A process requests use of a resource controlled by...
1. The Endocrine System a. Give an example of the negative feedback relationship between the hypothalamus,...
1. The Endocrine System a. Give an example of the negative feedback relationship between the hypothalamus, anterior pituitary, and other endocrine glands b. What are leptin, ghrelin, and growth factors? Where and how do these substances act?
Chose a homeostatic system and describe how it works. Be sure to explain how negative feedback...
Chose a homeostatic system and describe how it works. Be sure to explain how negative feedback is needed for the system to work. What would happen if the negative feedback loop were not working properly?
DRAW the negative feedback involved with thermoregulation. Be sure to explain all parts of the feedback...
DRAW the negative feedback involved with thermoregulation. Be sure to explain all parts of the feedback loop as well as why it is considered negative instead of positive.
1. Give an example of negative feedback system in the body and how it works. 2.What...
1. Give an example of negative feedback system in the body and how it works. 2.What name is given to all chemical reactions that occur within body cells? 3. Why is it necessary to be in a pressured cabin when flying at 30,000 feet ? 4.What process allows us to adjust to either extreme heat or cold? 5. When we begin to get dehydrated , we usually get thirsty, which causes us to drink? Is this a negative or positive...
Give two examples of a negative feedback loop and one example of a positive feedback loop...
Give two examples of a negative feedback loop and one example of a positive feedback loop within normal physiologic function. Describe each homeostatic mechanism using detailed descriptions. For each example predict the result at an organismal level if normal function was impaired at the molecular level.
Diagram and give a specific example of short-loop and long-loop negative feedback in endocrine regulation. Describe...
Diagram and give a specific example of short-loop and long-loop negative feedback in endocrine regulation. Describe the differences in levels of each hormone in the pathway in response to a Primary hypersecretion defect, and to both types of Secondary hypersecretion defects (hypothalamic and pituitary).
Describe one example of positive feedback and one of negative feedback, in other systems that have...
Describe one example of positive feedback and one of negative feedback, in other systems that have many interacting parts – such as economic, social, political systems.
Discuss the breakdown of the Nervous system. Make sure to fully breakdown the autonomic nervous system.
Discuss the breakdown of the Nervous system. Make sure to fully breakdown the autonomic nervous system.
Explain how the release of FSH is regulated by negative feedback. Be sure to include all...
Explain how the release of FSH is regulated by negative feedback. Be sure to include all the hormones that are involved and how they affect the release of FSH.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT