Process Management PDF

Summary

This document discusses processes, threads, and scheduling in operating systems. It outlines the concepts of process management, including different states of a process, and various types of schedulers. It also explains the principles of inter-process communication (IPC) models and the producer-consumer problem.

Full Transcript

Program is a passive entity Process is an active entity Program becomes process when executable file loaded into memory. A process includes:  program counter  stack  data section Stack provides static memory allocation, i.e., it is used to s...

Program is a passive entity Process is an active entity Program becomes process when executable file loaded into memory. A process includes:  program counter  stack  data section Stack provides static memory allocation, i.e., it is used to store the temporary variables(Function parameters, return addresses, local variables). Heap provides dynamic memory allocation.  The program code, also called text section  Data section containing global variables Schedulers Long-term scheduler (or job scheduler) – selects which processes should be brought into the ready queue Short-term scheduler (or CPU scheduler) – selects which process should be executed next and allocates CPU  Sometimes the only scheduler in a system Operating System Concepts Essentials – 8th Edition 3.9 Silberschatz, Galvin and Gagne ©2011 Schedulers (Cont.) Short-term scheduler is invoked very frequently (milliseconds)  (must be fast) Long-term scheduler is invoked very infrequently (seconds, minutes)  (may be slow) The long-term scheduler controls the degree of multiprogramming Processes can be described as either:  I/O-bound process – spends more time doing I/O than computations, many short CPU bursts  CPU-bound process – spends more time doing computations; few very long CPU bursts Operating System Concepts Essentials – 8th Edition 3.10 Silberschatz, Galvin and Gagne ©2011 Addition of Medium Term Scheduling Operating System Concepts Essentials – 8th Edition 3.11 Silberschatz, Galvin and Gagne ©2011 Producer-Consumer Process Producer-Consumer Process Producer-Consumer Process

Use Quizgecko on...
Browser
Browser