Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/arslanbilal/process-scheduling-algorithms
Process Scheduling Algorithms animation in WPF
https://github.com/arslanbilal/process-scheduling-algorithms
algorithm fcfs priority process-scheduling round-robin sjf
Last synced: 3 days ago
JSON representation
Process Scheduling Algorithms animation in WPF
- Host: GitHub
- URL: https://github.com/arslanbilal/process-scheduling-algorithms
- Owner: arslanbilal
- License: mit
- Created: 2014-12-03T10:35:49.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2017-03-31T20:53:57.000Z (over 7 years ago)
- Last Synced: 2023-08-19T09:34:08.497Z (about 1 year ago)
- Topics: algorithm, fcfs, priority, process-scheduling, round-robin, sjf
- Language: C#
- Homepage:
- Size: 1.1 MB
- Stars: 6
- Watchers: 4
- Forks: 6
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
This Project is a Operating System Process scheduling and managing. It will be a WPF program that shows process scheduling.
Process-Scheduling-Algorithms
=============================* [First-Come First-Serve(FCFS)](#First-Come-First-Serve(FCFS))
* [Shortest Job First(SJF)](#Shorhest-Job-First(SJF))
* [Priority](#Priority)
* [Round-Robin](#Round-Robin)
### First-Come First-Serve(FCFS)
1) Policy: Process that requests the CPU FIRST is allocated the CPU FIRST.2) FCFS is a non-preemptive algorithm.
3) Implementation - using FIFO queues. Incoming process is added to the tail of the queue. Process selected for execution is taken from head of queue.
4) Performance metric - Average waiting time in queue.
### Shortest Job First(SJF)
1) Associate with each process the length of its next CPU burst.2) Use these lengths to schedule the process with the shortest time.
3) Two Schemes:
##### Scheme 1: Non-preemptive
* Once CPU is given to the process it cannot be preempted until it completes its CPU burst.##### Scheme 2: Preemptive
* If a new CPU process arrives with CPU burst length less than remaining time of current executing process, preempt.
* Also called Shortest-Remaining-Time-First (SRTF)..
### Priority
1) A priority value (integer) is associated with each process. Can be based on:
* Cost to user
* Importance to user
* Aging
* %CPU time used in last X hours.2) CPU is allocated to process with the highest priority.
* Preemptive
* Nonpreemptive3) SJN is a priority scheme where the priority is the predicted next CPU burst time.
4) Problem:
* Starvation!! - Low priority processes may never execute.5) Solution:
* Aging - as time progresses increase the priority of the process.
### Round-Robin
1) Each process gets a small unit of CPU time:
* Time quantum usually 10-100 milliseconds.
* After this time has elapsed, the process is preempted and added to the end of the ready queue.
* n processes, time quantum = q:
1. Each process gets 1/n CPU time in chunks of at most q time units at a time.
2. No process waits more than (n-1)q time units.
3.Performance:
* Time slice q too large – response time poor
* Time slice (infinity)? - reduces to FIFO behavior
* Time slice q too small - Overhead of context switch is too expensive. Throughput poor