Beruflich Dokumente
Kultur Dokumente
New - The process is in the stage of being created. Ready - The process has all the resources available that it needs to run, but the CPU is not currently working on this process's instructions. Running - The CPU is working on this process's instructions. Waiting - The process cannot run at the moment, because it is waiting for some resource to become available or for some event to occur. For example the process may be waiting for keyboard input, disk access request, inter-process messages, a timer to go off, or a child process to finish. Terminated - The process has completed.
Types of Scheduling
Long-term scheduling The decision to add to the pool of processes to be executed Medium-term scheduling The decision to add to the number of processes that are partially or fully in main memory Short-term scheduling The decision as to which available process will be executed by the processor I/O scheduling The decision as to which processs pending I/O request shall be handled by an available I/O device
Turnaround Time (TAT) is the residence time Tr , or total time that the item spends in the system (waiting time plus service time). A more useful figure is the normalized turnaround time, which is the ratio of turnaround time to service time. Nonpreemptive: In this case, once a process is in the Running state, it continues to execute until (a) it terminates or (b) it blocks itself to wait for I/O or to request some OS service. Preemptive: The currently running process may be interrupted and moved to the Ready state by the OS. The decision to preempt may be performed when a new process arrives; when an interrupt occurs that places a blocked process in the Ready state; or periodically, based on a clock interrupt. Priority based scheduling requires preemption.
What is the average waiting time in the above example in case of FCFS? FIRST-COME-FIRST-SERVED The simplest scheduling policy is first-come-first served (FCFS), also known as first-in-first-out (FIFO) or a strict queueing scheme. As each process becomes ready, it joins the ready queue. When the currently running process ceases to execute, the process that has been in the ready queue the longest is selected for running. FCFS performs much better for long processes than short ones.
Priority Inversion
Priority inversion is a problematic scenario in scheduling when a higher priority task is indirectly preempted by a lower priority task effectively "inverting" the relative priorities of the two tasks.
References: 1 http://www.embedded.com/electronics-blogs/beginner-scorner/4023947/Introduction-to-Priority-Inversion http://research.microsoft.com/enus/um/people/mbj/mars_pathfinder/authoritative_account.html 2 http://en.wikipedia.org/wiki/Executable_and_Linkable_Format 3 Operating Systems Internals and Design Principles: Seventh Edition, William Stallings Chapter 9 Uniprocessor Scheduling https://www.cs.drexel.edu/~wmm24/cs370/resources/Scheduler.pdf