0% found this document useful (0 votes)
13 views48 pages

Understanding Process Management in OS

The document discusses processes and interprocess communication. It defines a process as a program in execution that forms the basis of computation. Processes go through various states like new, running, waiting, ready and terminated. A process control block stores information about the state and resources allocated to each process. Processes communicate through interprocess communication mechanisms like shared memory and message passing. It also discusses process scheduling, creation and termination. Client-server systems employ remote procedure calls for communication between remote processes.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
13 views48 pages

Understanding Process Management in OS

The document discusses processes and interprocess communication. It defines a process as a program in execution that forms the basis of computation. Processes go through various states like new, running, waiting, ready and terminated. A process control block stores information about the state and resources allocated to each process. Processes communicate through interprocess communication mechanisms like shared memory and message passing. It also discusses process scheduling, creation and termination. Client-server systems employ remote procedure calls for communication between remote processes.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Processes

Dr. Shruti Mishra


SCOPE
Contents

▪ Process Concept
▪ Process Scheduling
▪ Operations on Processes
▪ Interprocess Communication
▪ Examples of IPC Systems
▪ Communication in Client-Server Systems
Objectives

▪ To introduce the notion of a process -- a program in execution,


which forms the basis of all computation

▪ To describe the various features of processes, including


scheduling, creation and termination, and communication

▪ To explore interprocess communication using shared memory and


message passing

▪ To describe communication in client-server systems


Process Concept

▪ An operating system executes a variety of programs:


▪ Batch system – jobs

▪ Time-shared systems – user programs or tasks

▪ Textbook uses the terms job and process almost


interchangeably
Process in Memory
Process State
▪As a process executes, it changes state

▪ new: The process is being created

▪ running: Instructions are being executed

▪ waiting: The process is waiting for some event to occur

▪ ready: The process is waiting to be assigned to a processor

▪ terminated: The process has finished execution


Diagram of Process State
Process Control Block (PCB)
▪ Information associated with each process (also called
task control block)
▪ Process state – running, waiting, etc
▪ Program counter – location of instruction to next execute
▪ CPU registers – contents of all process-centric registers
▪ CPU scheduling information- priorities, scheduling
queue pointers
▪ Memory-management information – memory allocated
to the process
▪ Accounting information – CPU used, clock time elapsed
since start, time limits
▪ I/O status information – I/O devices allocated to process,
list of open files
CPU Switch From Process to Process
Process Scheduling
Ready Queue And Various I/O Device Queues
Representation of Process Scheduling

Queueing diagram represents queues, resources, flows


C Program Forking Separate
Process
Creating a Separate Process via Windows API
Process Termination
Execution of RPC
Pipes

Acts as a conduit allowing two processes to communicate


Issues:
◦ Is communication unidirectional or bidirectional?
◦ In the case of two-way communication, is it half or full-duplex?
◦ Must there exist a relationship (i.e., parent-child) between the communicating
processes?
◦ Can the pipes be used over a network?

Ordinary pipes – cannot be accessed from outside the process that created it.
Typically, a parent process creates a pipe and uses it to communicate with a
child process that it created.
Named pipes – can be accessed without a parent-child relationship.

You might also like