WHAT IS SCHEDULING?????Scheduling is a set ofpolicies andmechanisms to controlthe order of work to beperformed by thesystem.
SCHEDULER AND DISPATCHERSCHEDULER: DISPATCHER:The part of an operating system The operating system componentwhich assigns resources to which moves one task at a timeprocesses, or tasks. from a ready queue to the run state. The dispatcher is also referred to as the short term scheduler.
Fairness: A scheduler makes sure that each process getsits fair share of the CPU and no process can sufferindefinite postponement.Response time: The length of time it takes to react toa given stimulus or event.Efficiency: A level of performance that describes aprocess that uses the lowest amount of inputs to createthe greatest amount of outputs.
Turnaround: The process of completing or the timeneeded to complete a task, esp. one involving receivingsomething, processing it, and sending it.Throughput: The amount of material or itemspassing through a system or process.Policy Enforcement: The scheduler has to makesure that systems policy is enforced. For example, ifthe local policy is safety then the safety controlprocesses must be able to run whenever they want to.
Process States New Terminated Ready Running Waiting Swapping
Continued…. New: A file is loaded from storage to memory. Ready: Process has been loaded into main memory and is awaiting execution on a CPU. Running: A process moves into the running state when it is chosen for execution. Swapping: Moving the process from main memory to virtual memory. Terminated: Either from the "running" state by completing its execution or by explicitly being killed.
SCHEDULING LEVELSLONG TERM SCHEDULER:The part of an operating system whichplaces new tasks into the ready state.SHORT TERM SCHEDULER:The short-term scheduler, decides which ofthe ready in-memory processes are to beexecuted next.It makes decisions more frequently thanlong term scheduler
PREEMPTIVE & NONPREEMPTIVE SCHEDULINGPREEMPTIVE SCHEDULING:Operating system act of interrupting arunning task, removing it from the runstate, and placing it in the ready state.Modern operating systems are typicallypreemptive. In this type of scheduling thepriority of a process is gradually reducedwhile it is running.NON PREEMPTIVE SCHEDULING:When process gets into CPU, it keeps it untilit goes into Wait or terminates. It allows atask to remain in the run state until itvoluntarily blocks or completes.
Priority Shortest Priority Remaining Aging Time Scheduling Algorithms Fair FIFOShare Round SJF Robin
Priority…… Processes scheduling in which the scheduler selects tasks to run based on their priority. A danger of priority scheduling is starvation, in which processes with lower priorities are not given the opportunity to run.
Types of PrioritiesA priority which is notautomatically adjusted by thesystem. It can be changed by aUser or Super user.A priority which is adjustedautomatically by the systemaccording to task behavior andsystem loading. It improvesresponse time and eliminateindefinite postponent.
Shortest Remaining Time: A scheduling policy which schedules tasks in ascending order of estimated remaining processing time.FIFO (First In First Out): A scheduling policy which schedules tasks in the same order in which they enter the ready state.Round Robin: A scheduling policy which scheduleses tasks in a fixed circular order. It is used for time sharing users.
Priority Aging: A process which dynamically raises the priority of a task according to the time it has been waiting in the ready queue.SJF (Shortest Job First): A scheduling policy which schedules tasks in ascending order of estimated processing time.Fair Share: A scheduling policy which assigns tasks to groups, and allocates a percentage of CPU time to each group.
Real Time SchedulingA system which must respond in realtime to changing conditions. Realtime systems are used forcontrolling industrial processes, cars,robots, and other time criticalapplications. They have fixed sets oftasks. Reliability is also an importantgoal for real time systems.