Process Concept - Operating Systems, Distributed Computation - Lecture Slides, Slides of Operating Systems

During the course of work of the Operating Systems, Distributed Computation, we learn the core of the programming. The main points disucss in these lecture slides are:Process Concept, Process Scheduling, Operations on Processes, Cooperating Processes, Interprocess Communication, Communication in Client-Server Systems, Program Counter, Process Control Block, Scheduling Queues

Typology: Slides

2012/2013

Uploaded on 04/24/2013

banamala
banamala 🇮🇳

4.4

(19)

114 documents

1 / 43

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
PROCESSES
Process Concept
Process Scheduling
Operations on Processes
Cooperating Processes
Interprocess Communication
Communication in Client-Server Systems
Docsity.com
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17
pf18
pf19
pf1a
pf1b
pf1c
pf1d
pf1e
pf1f
pf20
pf21
pf22
pf23
pf24
pf25
pf26
pf27
pf28
pf29
pf2a
pf2b

Partial preview of the text

Download Process Concept - Operating Systems, Distributed Computation - Lecture Slides and more Slides Operating Systems in PDF only on Docsity!

PROCESSES

Process Concept Process Scheduling Operations on Processes Cooperating Processes Interprocess Communication Communication in Client-Server Systems

Process Concept

  • An OS executes a variety of programs:
    • Batch system – jobs
    • Time-shared systems – user programs or tasks
  • Terms job and process interchangeably.
  • Process : a program in execution;
  • A process includes:
    • Program counter
    • Stack
    • Data section
    • Code (“text”)
    • Registers
    • Heap

Diagram of Process State

Process Control Block (PCB)

  • Information associated with each process.
  • Process state
  • Program counter
  • CPU registers
  • CPU scheduling information
  • Memory-management information
  • Accounting information
  • I/O status information

PCB in Linux

struct task_struct {

pid_t pid; /* process identifier / long state; / state of the process / unsigned int time_slice; / scheduling info / struct task_struct * parent; / parent process / struct list_head children; / this process’s children */ struct files_struct files; / list of open files */ struct mm_struct mm; / address space of the process */

};

CPU Switch From Process to Process

Ready & Various I/O Device Queues

Process Scheduling

Addition of Medium Term Scheduling

Schedulers (Cont.)

  • Short-term scheduler is invoked frequently (~100 ms)  (must be fast).
  • Long-term scheduler is invoked infrequently (seconds, minutes)  (may be slow).

Context Switch

  • When CPU switches to another process:
    • must save the state of the old process
    • load the saved state for the new process.
  • Context-switch time is overhead ; the system does no useful work while switching.
  • Time dependent on hardware support.

Process Creation

  • Parent process create children processes, which, in turn create other processes, forming a tree of processes.
  • Resource sharing options
    • Parent and children share all resources.
    • Children share subset of parent’s resources.
    • Parent and child share no resources.
  • Execution options
    • Parent and children execute concurrently.
    • Parent waits until children terminate. Docsity.com

Processes Tree on UNIX

Process Termination

  • Process executes last statement and asks to end (exit). - Output data from child to parent (via wait). - Process’ resources are deallocated by operating system.