|
Types of Processes in UNIX
|
bet | 4/6 | Sana | 01.02.2024 | Hajmi | 0,7 Mb. | | #150097 |
Bog'liq UnixTypes of Processes in UNIX
Mainly 3 types
- User process
- Daemon process
- Kernel process
- Daemon process
- Performs the function in a system wide basis. The function can be of any auxiliary kind but they are vital in controlling the computational environment of the system.
- Example Print spooling, Network Management.
- Once created Daemon process can exist throughout the life time of the Operating System.
System calls in UNIX - Fork(): -This system call create new process.
- Exec(): -This system call used after a fork to replace the process memory space with a new program.
- Wait():-This system call moves a process off the ready queue until the
termination of the child.
Interesting signals in UNIX - SIGCHLD
- SIGFPE
- SIGILL
- SIGINT
- SIGKILL
- SIGSEGV
- SIGSYS
- SIGXCPU
- SIGXFSZ
Child process died or suspended Arithmetic fault
Illegal instruction
tty interrupt (Control C) Kill process Segmentation fault Invalid System call Exceeds CPU limit Exceeds file size limit
Memory - Primary memory is a precious resource that frequently cannot contain all active processes in the system
- The memory management system decides which processes should reside (at least partially) in main memory
- It monitors the amount of available primary memory and may periodically write processes to a secondary device called the swap device to provide more space in primary memory
- At a later time, the kernel reads the data from swap device back to main memory
UNIX Memory Management Policies - Swapping
- Easy to implement
- Less system overhead
- Demand Paging
Swapping - The swap device is a block device in a configurable section of a disk
- Kernel allocates contiguous space on the swap device without fragmentation
- It maintains free space of the swap device in an in-core table, called map
- The kernel treats each unit of the swap map as group of disk blocks
- As kernel allocates and frees resources, it updates the map accordingly
|
| |