Podcast
Questions and Answers
Which of the following CPU scheduling algorithms is an example of non-preemptive scheduling?
Which of the following CPU scheduling algorithms is an example of non-preemptive scheduling?
What is the main objective of CPU scheduling?
What is the main objective of CPU scheduling?
Which of the following is not a type of CPU scheduling algorithm?
Which of the following is not a type of CPU scheduling algorithm?
What is the difference between preemptive and non-preemptive scheduling?
What is the difference between preemptive and non-preemptive scheduling?
Signup and view all the answers
What happens when a process switches from the running to the waiting state?
What happens when a process switches from the running to the waiting state?
Signup and view all the answers
What is the term for the time taken by a process to complete its execution from its arrival time?
What is the term for the time taken by a process to complete its execution from its arrival time?
Signup and view all the answers
What is the primary goal of the operating system in terms of CPU utilization?
What is the primary goal of the operating system in terms of CPU utilization?
Signup and view all the answers
Which CPU scheduling algorithm is characterized by the convoy effect?
Which CPU scheduling algorithm is characterized by the convoy effect?
Signup and view all the answers
What is the formula to calculate the waiting time of a process?
What is the formula to calculate the waiting time of a process?
Signup and view all the answers
What is the term for programs that can be present in the memory at the same time?
What is the term for programs that can be present in the memory at the same time?
Signup and view all the answers
What is the characteristic of the Shortest Job First scheduling algorithm?
What is the characteristic of the Shortest Job First scheduling algorithm?
Signup and view all the answers
Study Notes
Process Management
- Process execution involves three states: running, waiting, and ready
- Burst Time / Execution Time: time required to complete execution (running time)
- Arrival Time: when a process enters the ready state
- Finish Time: when a process completes and exits the system
Multiprogramming
- Multiprogramming: multiple programs can be present in memory at the same time
- Jobs: programs without user interaction
- User: program with user interaction
- Process: a reference used for both jobs and users
CPU Burst Cycle
- CPU/IO Burst Cycle: characterizes process execution, alternating between CPU and I/O activity
- CPU Utilization: the main task of the OS is to keep the CPU busy as possible
- Throughput: the number of processes that finish their execution per unit of time
Performance Metrics
- Waiting Time: the amount of time a process needs to wait in the ready queue
- Response Time: the amount of time from submitting a request to the first response
- Turnaround Time: the time taken to execute a specific process; Time taken to complete after arrival
- Completion Time: time taken for execution to complete starting from arrival time
- Calculations:
- Turnaround Time = Completion Time - Arrival Time
- Waiting Time = Turnaround Time - Burst Time
CPU Scheduling Algorithms
- First Come First Serve (FCFS): the easiest and most simple CPU scheduling algorithm
- Shortest Job First (SJF): the process having the smallest time is chosen for execution
- Other algorithms:
- Shortest Remaining Time First (SRTF)
- Round Robin Scheduling (RR)
- Priority Scheduling (Prio)
- Preemptive Priority Scheduling (P-Prio)
- Multi-level Queue Scheduling (MLQ)
Preemptive vs Non-Preemptive Scheduling
- Preemptive Scheduling: tasks are assigned with priorities
- Non-Preemptive Scheduling: CPU is allocated to a specific process which will release the CPU either by switching context or terminating
- Differences:
- Preemptive: a process switches from the running to the waiting state
- Non-Preemptive: a process switches from the running state to the ready state
Studying That Suits You
Use AI to generate personalized quizzes and flashcards to suit your learning preferences.
Description
Test your knowledge of CPU scheduling algorithms, including First Come First Serve, Shortest Job First, Round Robin, Priority Scheduling, and more. Learn how to determine which process will own the CPU for execution and how tasks are assigned with priorities.