Processs Management
Processs Management
management
Operating system
Topics covered
• Processes
• PCB
• Context switching
• Process States
• Schedulers
• CPU and IO Bound
• Operation on Processes
• Spawning and Cascading
Processes
• A process can be thought of as a program in execution.
• A process will need certain resources—such as CPU time, memory, files, and I/O devices
— to accomplish its task.
• A program by itself is not a process.
• A program is a passive entity, such as a file containing a list of instructions stored on disk
(often called an executable file). In contrast, a process is an active entity, with a program
counter specifying the next instruction to execute and a set of associated resources.
Process • A process generally also includes the
process stack, which contains temporary
• CPU bound process execution depends only on the CPU. other components of
computer system are rarely used.
• Weather prediction, Artificial intelligence Applications are CPU-bound usually
require tons of calculations.
• Graphics operations are also CPU-bound. because calculations have to be
made to render graphics.
I/O bound
• The processes in most systems can execute concurrently, and they may be
created and deleted dynamically.
• Thus, these systems must provide a mechanism for process creation and
termination.
Process Creation
When a process creates a new process, two possibilities for execution exist:
1. The parent continues to execute concurrently with its children.
2. The parent waits until some or all of its children have terminated.
There are also two address-space possibilities for the new process:
1. The child process is a duplicate of the parent process (it has the same
program and data as the parent).
2. The child process has a new program loaded into it.
Process Termination
• A process terminates when it finishes executing its final statement and asks
the operating system to delete it by using the exit() system call.
• At that point, the process may return a status value (typically an integer) to
its parent process (via the wait() system call).
• All the resources of the process—including physical and virtual memory,
open files, and I/O buffers—are deallocated by the operating system.
Cont..