L-1.5: Process States in Operating System| Schedulers(Long term,Short term,Medium term)
Summary
TLDRIn this video from Gate Smashers, the concept of process states or the process life cycle is explained. It covers the primary states (new, ready, running, terminated, wait/block) and additional states (suspend wait/block, suspend ready). The video details how processes move through these states, the role of schedulers (long-term, short-term, medium-term), and concepts like multi-programming and multi-tasking. The explanation includes practical examples and mentions how to view processes in Windows and UNIX/Linux. This comprehensive guide is useful for competitive and university exams.
Takeaways
- π The video discusses the process states or life cycle, which is crucial for understanding how processes operate in systems like laptops, PCs, and mobiles.
- π The primary states of a process are New, Ready, Running, Wait/Block, and Terminated. These are essential stages a process goes through from start to end.
- π» The 'New' state refers to a process that has been created but not yet executed, typically stored in secondary memory.
- π When a process is 'Ready', it has been brought into RAM and is waiting to be executed by the CPU.
- πββοΈ The 'Running' state is when a process is actively being executed by the CPU, and it is in this state that the process performs its tasks.
- π The 'Wait/Block' state occurs when a process is waiting for an I/O request, such as reading from secondary memory, and is temporarily halted.
- π The 'Terminated' state signifies the end of a process's life cycle, where it has completed its execution and resources are deallocated.
- π The Long-term Scheduler is responsible for bringing processes into the Ready state, contributing to the concept of multi-programming.
- π The Short-term Scheduler picks processes from the Ready state and sends them to the Running state, managing the execution of processes on the CPU.
- π The Medium-term Scheduler handles processes that need to be swapped out of RAM to secondary memory due to limited resources or high priority processes needing execution.
- π The concepts of multi-tasking and pre-emptive scheduling are important for understanding how multiple processes are managed and prioritized in a system.
Q & A
What is the purpose of the process life cycle model?
-The process life cycle model is created to explain the various states a process goes through from its start to its end, helping users understand how a process evolves and changes its status during execution.
What are the primary states of a process according to the script?
-The primary states of a process are New, Ready, Running, Waiting/Block, and Terminated. These states are mandatory and present by default in the process life cycle.
What is the 'New' state in the context of process states?
-The 'New' state refers to the initial stage of a process's life cycle when it is created but not yet executed. It is stored in secondary memory and is in a stable state.
What is the role of the long-term scheduler in process management?
-The long-term scheduler is responsible for bringing processes from the secondary memory into the ready state in RAM, facilitating multiprogramming by managing how many processes are in the ready queue.
How does the script describe the 'Ready' state of a process?
-In the 'Ready' state, a process has been loaded into RAM and is waiting in the ready queue to be executed by the CPU. It is in an active state, ready to be scheduled for execution.
What is the significance of the 'Running' state in a process's life cycle?
-The 'Running' state signifies that the process is currently being executed by the CPU. It is in this state that the process performs its designated tasks and operations.
What does the script mean by 'Terminated' state?
-The 'Terminated' state indicates that a process has completed its execution. In this state, the process releases its allocated resources and exits the CPU's execution cycle.
What is the concept of multiprogramming as explained in the script?
-Multiprogramming is the concept of bringing as many processes as possible into the ready queue, allowing for efficient use of the CPU and memory resources, and enabling the system to handle multiple tasks concurrently.
What is the difference between non-preemptive and preemptive scheduling as described in the script?
-Non-preemptive scheduling means a process runs to completion without interruption, whereas preemptive scheduling allows for a process to be interrupted during its execution due to factors like higher priority processes or time quantum expiration.
What is the role of the short-term scheduler in process management?
-The short-term scheduler is responsible for selecting a process from the ready queue and dispatching it to the running state. It plays a crucial role in process execution and task switching.
What does the script imply by the 'Wait/Block' state?
-The 'Wait/Block' state is when a process is waiting for an I/O operation to complete, such as reading from secondary memory. During this state, the process is paused and will return to the ready state once the I/O request is fulfilled.
What are the additional states mentioned in the script, and what are they used for?
-The additional states mentioned are Suspend Wait/Block and Suspend Ready. These states are used when the respective queues for waiting processes or ready processes are full, and the process needs to be temporarily moved to secondary memory until space becomes available.
What is the function of the medium-term scheduler as per the script?
-The medium-term scheduler handles processes when the system's RAM or queues are full. It decides which processes to swap out to secondary memory based on certain scheduling algorithms, making space for new or high-priority processes.
Outlines
This section is available to paid users only. Please upgrade to access this part.
Upgrade NowMindmap
This section is available to paid users only. Please upgrade to access this part.
Upgrade NowKeywords
This section is available to paid users only. Please upgrade to access this part.
Upgrade NowHighlights
This section is available to paid users only. Please upgrade to access this part.
Upgrade NowTranscripts
This section is available to paid users only. Please upgrade to access this part.
Upgrade Now5.0 / 5 (0 votes)