궁선이 2018. 4. 6. 04:03

1. Process
- Process is a program in excution
- Program is a passive entity, but process is active entity
- Consists of at least three part, called region or segment : Text, Data, Stack
- Every process has an unique identifier calles pid
- The process table entry and U-area contains contains control and status information about process
- process accesses kernel facilities via System Calls

2. Attributes of a process
- State
- Identification : pid
- Values of the registers, including the program counter
- User Identity : under whose name the process is excuting
- Information used by the kernel to establish the schedule of the processes
- Information concerning the address space of the process
- Information concerning the inputs/outputs carried out by the process
- Compatibility information summarizing resources used by the process

3. Process States
- Ready
- Stopped
- Executing
- Suspended
- Zombie

4. Process Identity
- PID : The unique identifier for the process
- Credentials : Each process must have an associated user ID and one or more group IDs

5. Process Environment
- The process's environment is inherited from its parent, and is composed of two null-terminated vectors. Argument vector and Environment vector.
- The environment-variable mechanism provides a customization of the operating system that can be set on a per-process basis, rather than being configured for the system as a whole.

6. Process Context
- The state of a running program at any one point in time.
- The scheduling context is the most important part of the process context; it is the information that the scheduler needs to suspend and restart the process.
- The kernel maintains accounting information about the resources currently being consumed by each process, and the total resources consumed by the process in its
- The file table is an array of pointers to kernel file structures. When making file I/O system calls, processes refer to files by their index into this table.
- The signal-handler table defines the routine in the process's address space to be called when specific signals arrive.
- The virtual-memory context of a process describes the full contents of its private address space

7. Process scheduling
- Time sharing algorithm : for fair preemptive scheduling between multiple processes.
- Real time algorithm : for tasks where absolute priorities are more important than fairness. For example FIFO, Round-Robin
- A process's scheduling class defines which algorithm to apply.