Docsity

Operating system pdf 2, Study notes of Operating Systems

Toggle sidebar
bg1
Note 2: Process Management & CPU Scheduling
Comprehensive Docsity Study Reference Material
1. Process Concept & Process Control Block (PCB)
A process is a program in execution. Each process is represented in the operating system by a Process Control Block
(PCB), which contains: Process State, Program Counter, CPU Registers, Memory Management Information, and I/O
Status Information.
2. Process States & Transitions
• New: The process is being created.
• Ready: The process is waiting to be assigned to a processor.
• Running: Instructions are being executed.
• Waiting: The process is waiting for an event or I/O completion.
• Terminated: The process has finished execution.
3. CPU Scheduling Metrics
• Arrival Time (AT): Time when the process enters the ready queue.
• Burst Time (BT): Time required by the process for CPU execution.
• Turnaround Time (TAT): Completion Time - Arrival Time.
• Waiting Time (WT): Turnaround Time - Burst Time.
4. Scheduling Algorithms
A. First-Come, First-Served (FCFS): Non-preemptive allocation based on arrival order. Suffers from the convoy
effect.
B. Shortest-Job-First (SJF): Allocates CPU based on shortest burst time. Preemptive SJF is known as
Shortest-Remaining-Time-First (SRTF).
C. Round Robin (RR): Uses a small unit of time called time quantum to cyclically schedule processes.
D. Priority Scheduling: Allocates CPU based on pre-assigned priority. Starvation is solved using aging (gradually
increasing priority over time).
1. Process Concept & Process Control Block (PCB)
A process is a program in execution. Each process is represented in the operating system by a Process Control Block
(PCB), which contains: Process State, Program Counter, CPU Registers, Memory Management Information, and I/O
Status Information.
2. Process States & Transitions
• New: The process is being created.
• Ready: The process is waiting to be assigned to a processor.
• Running: Instructions are being executed.
• Waiting: The process is waiting for an event or I/O completion.
• Terminated: The process has finished execution.
pf2

Partial preview of the text

Download Operating system pdf 2 and more Study notes Operating Systems in PDF only on Docsity!

Note 2: Process Management & CPU Scheduling

Comprehensive Docsity Study Reference Material

1. Process Concept & Process Control Block (PCB)

A process is a program in execution. Each process is represented in the operating system by a Process Control Block (PCB), which contains: Process State, Program Counter, CPU Registers, Memory Management Information, and I/O Status Information.

2. Process States & Transitions

  • New: The process is being created.
  • Ready: The process is waiting to be assigned to a processor.
  • Running: Instructions are being executed.
  • Waiting: The process is waiting for an event or I/O completion.
  • Terminated: The process has finished execution.

3. CPU Scheduling Metrics

  • Arrival Time (AT): Time when the process enters the ready queue.
  • Burst Time (BT): Time required by the process for CPU execution.
  • Turnaround Time (TAT): Completion Time - Arrival Time.
  • Waiting Time (WT): Turnaround Time - Burst Time.

4. Scheduling Algorithms

A. First-Come, First-Served (FCFS): Non-preemptive allocation based on arrival order. Suffers from the convoy effect. B. Shortest-Job-First (SJF): Allocates CPU based on shortest burst time. Preemptive SJF is known as Shortest-Remaining-Time-First (SRTF). C. Round Robin (RR): Uses a small unit of time called time quantum to cyclically schedule processes. D. Priority Scheduling: Allocates CPU based on pre-assigned priority. Starvation is solved using aging (gradually increasing priority over time).

1. Process Concept & Process Control Block (PCB)

A process is a program in execution. Each process is represented in the operating system by a Process Control Block (PCB), which contains: Process State, Program Counter, CPU Registers, Memory Management Information, and I/O Status Information.

2. Process States & Transitions

  • New: The process is being created.
  • Ready: The process is waiting to be assigned to a processor.
  • Running: Instructions are being executed.
  • Waiting: The process is waiting for an event or I/O completion.
  • Terminated: The process has finished execution.

3. CPU Scheduling Metrics

  • Arrival Time (AT): Time when the process enters the ready queue.
  • Burst Time (BT): Time required by the process for CPU execution.
  • Turnaround Time (TAT): Completion Time - Arrival Time.
  • Waiting Time (WT): Turnaround Time - Burst Time.

4. Scheduling Algorithms

A. First-Come, First-Served (FCFS): Non-preemptive allocation based on arrival order. Suffers from the convoy effect. B. Shortest-Job-First (SJF): Allocates CPU based on shortest burst time. Preemptive SJF is known as Shortest-Remaining-Time-First (SRTF). C. Round Robin (RR): Uses a small unit of time called time quantum to cyclically schedule processes. D. Priority Scheduling: Allocates CPU based on pre-assigned priority. Starvation is solved using aging (gradually increasing priority over time).

1. Process Concept & Process Control Block (PCB)

A process is a program in execution. Each process is represented in the operating system by a Process Control Block (PCB), which contains: Process State, Program Counter, CPU Registers, Memory Management Information, and I/O Status Information.

2. Process States & Transitions

  • New: The process is being created.
  • Ready: The process is waiting to be assigned to a processor.
  • Running: Instructions are being executed.
  • Waiting: The process is waiting for an event or I/O completion.
  • Terminated: The process has finished execution.

3. CPU Scheduling Metrics

  • Arrival Time (AT): Time when the process enters the ready queue.
  • Burst Time (BT): Time required by the process for CPU execution.
  • Turnaround Time (TAT): Completion Time - Arrival Time.
  • Waiting Time (WT): Turnaround Time - Burst Time.

4. Scheduling Algorithms

A. First-Come, First-Served (FCFS): Non-preemptive allocation based on arrival order. Suffers from the convoy effect. B. Shortest-Job-First (SJF): Allocates CPU based on shortest burst time. Preemptive SJF is known as Shortest-Remaining-Time-First (SRTF). C. Round Robin (RR): Uses a small unit of time called time quantum to cyclically schedule processes. D. Priority Scheduling: Allocates CPU based on pre-assigned priority. Starvation is solved using aging (gradually increasing priority over time).