Michael uses an Operating system which always give him problems of “resource hogging” by devices he is using on his PC and also by programs he launch. i. As an OS specialist, explain the reason(s) for the cause of these problems. Explain the mechanism(s) that can be used to resolve these issues above in (i) b)
) Michael uses an
devices he is using on his PC and also by programs he launch.
i. As an OS specialist, explain the reason(s) for the cause of these problems.
Explain the
b)
α) The diagram below is the process table of a process manager of X OS. Use it to answer
questions below
ii. Using the Priority process scheduler, and given that P3 is the only job issued by the CEO of
the company using the X OS, whereas the rest of the jobs are all issued by the secretary which
process will be run third? (Explain briefly)
iii. Which scheduler will pre-empt processes based on a given allocated time slot. (Explain
briefly)
iv. Using the Shortest Job First process scheduler, which process will be run third? (Explain
briefly)
v. Explain briefly one virtual memory manager which can be used to manage the processes and
how they will be managed by that virtual memory manager.
β)
Examine the table and diagram below, and answer questions (i) to (v)
Process(P) Estimated Run Time
P1 15
P2 10
P3 5
5s 5s 5s 5s 5s 5s
P1 P2 P3 X Y P3
i. Based on the diagram, which type of process scheduler is being demonstrated.
ii. Which process will be executing at position X? (Explain briefly/Show briefly how
you arrived at your answer)
iii. Which process will be executing at position Y? (Explain briefly/Show briefly how
you arrived at your answer)
iv. Which process will finish executing first? (Explain briefly/Show briefly how you
arrived at your answer)
v. How many clock cycles will the last process to finish executing, go through? (Explain
briefly/Show briefly how you arrived at your answer)
Process(P) Estimated Run Time
P1 5
P2 10
P3 11
P4 7
P5 30
The number assigned to each process is based on their order of arrival.
i. Using the FCFS process scheduler, which process will be run third?(Explain briefly)
Reason for resource hogging:
Resource hogging is the situation where the Operating system is unable to provide proper allocation of resources to processes. A proper prioritization of process is needed so that no single process is hogging all other resources all the time causing other processes unable to execute. This is the responsibility of OS kernel.
Starvation is a situation that occurs in concurrent computing when a process is prevented from using the needed resources to process its work.
Errors in mutual exclusion or a scheduling algorithm may cause starvation. It may be caused by resource leaks also, and can be intentionally caused by a denial-of-service attack: like a fork bomb.
Mechanism to resolve resource hogging:
CPU scheduling is the most important concept of operating system. It allows a process to utilize the CPU resource at the time when the execution of another process is on hold or in waiting state because of unavailability of any resource such as I/O, thereby making full use of CPU. The main purpose of CPU scheduling is making the system more efficient, fast and error free.
When the CPU is in idle state, the OS has to choose a process from the processes present in the ready queue waiting to be executed. The short-term scheduler does the selection process. It is also called CPU scheduler.
It chooses from the processes that are ready for execution. It assigns the CPU to the most appropriate process.
Step by step
Solved in 3 steps