The document discusses key concepts related to operating system processes including:
1) A process includes a program counter, stack, data section and can be in one of several states like running, ready, waiting, or terminated.
2) A process control block contains information about a process like its state, registers, and scheduling information.
3) There are different scheduling queues like the ready queue for processes in memory and devices queues for processes waiting for I/O.
4) Schedulers like long-term and short-term schedulers manage moving processes between queues and allocating the CPU.
1 of 4
Downloaded 12 times
More Related Content
Process concept
1. Process Concept<br />Process Scheduling<br />Operations on Processes<br />Cooperating Processes<br />Interprocess Communication<br />Communication in Client-Server Systems<br />Process Concept<br />An operating system executes a variety of programs:<br />Batch system ¨C jobs<br />Time-shared systems ¨C user programs or tasks<br />Textbook uses the terms job and process almost interchangeably<br />Process ¨C a program in execution; process execution must progress in sequential fashion<br />A process includes:<br />program counter <br />stack<br />data section<br />Process State<br />As a process executes, it changes state <br />new: The process is being created<br />running: Instructions are being executed<br />waiting: The process is waiting for some event to occur<br />ready: The process is waiting to be assigned to a process<br />314325262255terminated: The process has finished execution<br />Process Control Block (PCB)<br />Information associated with each process<br />Process state<br />Program counter<br />CPU registers<br />CPU scheduling information<br />Memory-management information<br />Accounting information<br />I/O status informationCPU Switch From Process to Process<br />16192540005227647640005<br />Process Scheduling Queues<br />Job queue ¨C set of all processes in the system<br />Ready queue ¨C set of all processes residing in main memory, ready and waiting to execute<br />Device queues ¨C set of processes waiting for an I/O device<br />Process migration between the various queues<br />Ready Queue And Various I/O Device Queues<br />Representation of Process Scheduling<br />Schedulers<br />Long-term scheduler (or job scheduler) ¨C selects which processes should be brought into the ready queue<br />Short-term scheduler (or CPU scheduler) ¨C selects which process should be executed next and allocates CPU<br />Addition of Medium Term Scheduling<br />371475-114300<br />Schedulers (Cont.)<br />Short-term scheduler is invoked very frequently (milliseconds) (must be fast)<br />Long-term scheduler is invoked very infrequently (seconds, minutes) (may be slow)<br />The long-term scheduler controls the degree of multiprogramming<br />Processes can be described as either:<br />I/O-bound process ¨C spends more time doing I/O than computations, many short CPU bursts<br />CPU-bound process ¨C spends more time doing computations; few very long CPU bursts<br />Context Switch<br />When CPU switches to another process, the system must save the state of the old process and load the saved state for the new process<br />Context-switch time is overhead; the system does no useful work while switching<br />Time dependent on hardware support<br />Process Creation<br />Parent process create children processes, which, in turn create other processes, forming a tree of processes<br />Resource sharing<br />Parent and children share all resources<br />Children share subset of parent¡¯s resources<br />Parent and child share no resources<br />Execution<br />Parent and children execute concurrently<br />Parent waits until children terminate<br />Process Creation (Cont.)<br />Address space<br />Child duplicate of parent<br />Child has a program loaded into it<br />UNIX examples<br />fork system call creates new process<br />exec system call used after a fork to replace the process¡¯ memory space with a new program<br />