0% found this document useful (0 votes)
5 views2 pages

OS Scheduling and Memory Allocation Notes

The document discusses CPU and disk scheduling algorithms, including FCFS, SJF, and various disk scheduling methods like SSTF and SCAN. It also covers memory allocation strategies such as First Fit and Best Fit, along with key time terms in CPU scheduling. An example illustrates the execution of processes using the FCFS method, detailing their arrival, completion, turnaround, and waiting times.

Uploaded by

bysaketsahum
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views2 pages

OS Scheduling and Memory Allocation Notes

The document discusses CPU and disk scheduling algorithms, including FCFS, SJF, and various disk scheduling methods like SSTF and SCAN. It also covers memory allocation strategies such as First Fit and Best Fit, along with key time terms in CPU scheduling. An example illustrates the execution of processes using the FCFS method, detailing their arrival, completion, turnaround, and waiting times.

Uploaded by

bysaketsahum
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

CPU & Disk Scheduling, Memory Allocation - OS Concepts

FCFS (First Come First Serve)

- Non-preemptive scheduling: executes processes in the order they arrive.

- Simple but may lead to high waiting time if long processes arrive first.

SJF (Shortest Job First)

- Selects process with the smallest burst time.

- Can be preemptive or non-preemptive.

- Efficient but may cause starvation of longer processes.

Disk Scheduling Algorithms

1. FCFS - Serve requests in arrival order.

2. SSTF - Choose the request closest to current head.

3. SCAN - Head moves to end then reverses (like elevator).

4. LOOK - Like SCAN but only goes to last request before reversing.

5. C-SCAN - Head moves in one direction and jumps to beginning.

6. C-LOOK - Like C-SCAN but only up to last request.

7. FSCAN - Divides queue and processes one batch at a time.

Memory Allocation Algorithms

1. First Fit:

- Allocates the first available block large enough for the process.

- Fast but may leave fragmentation.


2. Best Fit:

- Allocates the smallest sufficient block.

- Reduces leftover space but may be slower.

Time Terms in CPU Scheduling

- Arrival Time (AT): When process enters ready queue.

- Completion Time (CT): When process finishes execution.

- Turnaround Time (TAT): TAT = CT - AT

- Waiting Time (WT): WT = TAT - Burst Time (BT)

Example:

Processes: P1(AT=0, BT=5), P2(AT=1, BT=3), P3(AT=2, BT=4)

FCFS Execution: P1 (0-5), P2 (5-8), P3 (8-12)

CT: P1=5, P2=8, P3=12

TAT: P1=5, P2=7, P3=10

WT: P1=0, P2=4, P3=6

You might also like