Please enable JavaScript.
Coggle requires JavaScript to display documents.
Chapter 3 Process Management (Concepts (Process control block (Process…
Chapter 3
Process Management
Concepts
The process
It's a program in execution
Includes the current activity and the contents of the processor registers
Process State
New
Running
Waiting
Ready
Terminated
Process control block
Process state
Program counter
CPU registers
CPU scheduling information
Memory management information
Accounting information
I/O status information
Threads
A thread of instructions being executed
Process Scheduling
Scheduling Queues
Job queues
Ready queues
Device queues
Schedulers
Select processes from this pool and loads them into memory for execution
Context switch
Switching the CPU to another process requires performing a state save of the current process and a state restore of a different process.
Operation on Process
Process creation
A process may create several new processes. Each of these new processes may in turn create other processes, forming a tree of processes.
Most OS identify processes according to a unique process identifier.
Process Termination
A process terminates when it finishes executing its final statement and asks the OS to delete it by using the exit() system call.
A process can cause the termination of another process via an appropriate system call (TerminateProcess() in Windows)
Interprocess Communication
Reasons
Information sharing
Computation speedup
Modularity
Convenience
Shared Memory System
Multiple processes can access a space in memory to communicate with other process
Message Passing Systems
A process can send direct messages to another process
send(message)
recive()
Communication in Client-Server Systems
Sockets
A pair of processes communicating over a network employs a pair of sockets
Uses a client-server architecture
Remove a procedure calls
Each message is addressed to an RPC daemon listening to a port on the remote system, and each contains an identifier specifying the function to execute and the parameters
Pipes
Ordinary pipes
The producer writes to one end of the pipe and the consumer reads from the other end
Named pipes
Communication can be bidirectional
Several processes can use it for communication
Daniela Porras Quirós
2015071255