Silberschatz, Galvin and Gagne ©2018
Operating System Concepts
Chapter 3: Processes
2
Operating System Concepts Silberschatz, Galvin and Gagne ©2018
Chapter 3: Processes
q
Process Concept
q
Process Scheduling
q
Operations on Processes
q
Inter-Process Communication (IPC)
q
IPC in Shared-Memory Systems
q
IPC in Message-Passing Systems
q
Examples of IPC Systems
q
Communication in Client-Server Systems
3
Operating System Concepts Silberschatz, Galvin and Gagne ©2018
Objectives
q
Identify the separate components of a process and illustrate how they
are represented and scheduled in an operating system.
q
Describe how processes are created and terminated in an operating
system, including developing programs using the appropriate system
calls that perform these operations.
q
Describe and contrast inter-process communication using shared
memory and message passing.
q
Design programs that uses pipes and POSIX shared memory to
perform inter-process communication.
q
Describe client-server communication using sockets and remote
procedure calls.
q
Design kernel modules that interact with the Linux operating system.
4
Operating System Concepts Silberschatz, Galvin and Gagne ©2018
Process Concept
q
An operating system executes a variety of programs that run as
processes
q
Process a program in execution; process execution must progress
in sequential fashion
q
Multiple parts
oThe program code, also called text section
oCurrent activity including program counter, and processor registers
oStack section containing temporary data
4
Function parameters, return addresses, local variables
oData section containing global variables
oHeap section containing memory dynamically allocated during run time
5
Operating System Concepts Silberschatz, Galvin and Gagne ©2018
Process Concept (Cont.)
q
Program is passive entity stored on disk (e.g., executable file)
q
Process is active entity
oProgram becomes process when executable file loaded into memory
q
Execution of program can be started via GUI mouse clicks, command
line (CLI) entry of its name, etc.
q
One program can be several processes
oE.g., Consider multiple users executing the same program
#ps -aux