1 / 12

SCRIBE SUBMISSION (11CS10015)

SCRIBE SUBMISSION (11CS10015). made by -Harsh Ranjan , lecture Date – 23rd January 2014 TOPICS COVERED - Understanding the creation of PCB Dispatcher. Scheduler, its frequency of executions and its types. Medium Term Scheduler. Creation Of PCB. DISPATCHER.

arista
Download Presentation

SCRIBE SUBMISSION (11CS10015)

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. SCRIBE SUBMISSION (11CS10015) made by -Harsh Ranjan , lecture Date – 23rd January 2014 TOPICS COVERED - Understanding the creation of PCB Dispatcher. Scheduler, its frequency of executions and its types. Medium Term Scheduler.

  2. CreationOf PCB

  3. DISPATCHER Dispatcher module gives control of the CPU to the process selected by the short-term scheduler; this involves:  switching context  switching to user mode  jumping to the proper location in the user program to restart that program Dispatch latency – Time taken for the dispatcher to stop one process and start another running is the Dispatcher latency.

  4. ISR for Context Switch Current <- PCB of current process Context_switch() { switch to kernel mode Disable interrupt ; Insert (ready_queue, current) ; Enable Interrupt ; next=CPU_Scheduler(ready_queue); Dispatcher (next) ; }

  5. ISR for Context Switch(contd..) Dispatcher(next) { Save_PCB (current) ; switch to user mode ; Load_PCB (next) ; //update PC }

  6. Disable / Enable Input : Ready queue is a shared resource. We must avoid interrupts while updating the ready queue to avoid inconsistency. Hence the positions of the disable/enable interrupts instructions. This one is one of the ways of doing this. Disabling/ blocking the interrupt is not good idea so its span is kept as small as possible. Note : All ISRs are loaded in memory at the time of booting.

  7. SCHEDULERS The task of the scheduler is to select a process from a set. This can be done in the following ways : • Long-term scheduler (or job scheduler) – selects which processes should be brought into the ready queue • Short-term scheduler (or CPU scheduler) – selects which process should be executed next and allocates CPU, is sometimes the only scheduler in a system.

  8. Frequency Of Execution: • Short-term scheduler is invoked very frequently (milliseconds), so it must be fast. – After a I/O request/ Interrupt • Long-term scheduler is invoked very infrequently (seconds, minutes), so it can be slow. – The long-term scheduler controls the degree of multiprogramming

  9. Processes can be described as either:  I/O-bound process : spends more time doing I/O than computations, many short CPU bursts Con : Ready queue empty  CPU-bound process : spends more time doing computations; few very long CPU bursts Con : Devices unused Long term scheduler ensures good process mix of I/O and CPU bound processes, so sometimes we only use the long term scheduler in the system.

  10. Medium Term Scheduler When some process arrives in the job queue with high probability, the mid-term scheduler swaps a process(s) from ready queue with this new process.

  11. THE END BY-Harsh Ranjan(11CS10015)

More Related