Processes Two - Operating Systems - Lecture Slides, Slides of Computer Science

These are the Lecture Slides of Operating Systems which includes File-System Structure, Defining, Logical File, Physical Device, Secondary, System Organized, File Control Block, Structure Consisting, Typical File Control Block etc.Key important points are: Processes Two, Process States, Using Fork, Process Model, Two-State Process Model, Using Two Queues, Multiple Blocked Queues, Suspended Processes, Memory to Disk, Suspend Queue

Typology: Slides

2012/2013

Uploaded on 03/28/2013

ekana
ekana 🇮🇳

4

(44)

370 documents

1 / 23

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Operating Systems
Lecture 06:
Processes (cont)
1
Docsity.com
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17

Partial preview of the text

Download Processes Two - Operating Systems - Lecture Slides and more Slides Computer Science in PDF only on Docsity!

Operating Systems

Lecture 06:

Processes (cont)

Today

  • Announcements:
    • Project 1 finally posted. Due Oct 20 at midnight.
  • Processes (Chapter 3):
    • Process states
    • Using fork

Two-State Process Model

Queue for the 5-state model?

Multiple Blocked Queues

Suspended Processes

  • Problem: all processes in memory might be waiting for I/O (CPU much faster than I/O). - What to do?
  • Swapping
    • involves moving part of all of a process from main memory to disk
    • when none of the processes in main memory is in Ready, OS swaps one of the blocked processes out on to disk into a suspend queue

Two Suspend States

OS

Control

Tables

Process Tables

  • Must be maintained to manage processes
  • There must be some reference to memory,

I/O, and files, directly or indirectly

  • The tables themselves must be accessible by

the OS and therefore are subject to memory

management

Memory Tables

  • Used to keep track of both main (real) and secondary (virtual) memory
  • Processes are maintained on secondary memory using some sort of virtual memory or simple swapping mechanism

Must include:

allocation of main memory to processes allocation of secondary memory to processes protection attributes of blocks of main or virtual memory information needed to manage virtual memory

File Tables

  • Information may be maintained and used by a file management system - in which case the OS has little or no knowledge of files
  • In other operating systems, much of the detail of file management is managed by the OS itself
  • existence of files
  • location on secondary memory
  • current status
  • other attributes

These tables provide information about:

UNIX Process State Transition

Diagram

Process Creation in Unix

  • Process creation is by means of the system call fork( ).
  • This causes the OS, in Kernel Mode, to:
    1. Allocate a slot in the process table for the new process.
    2. Assign a unique process ID to the child process.
    3. Copy of process image of the parent, with the exception of any shared memory.
    4. Increment the counters for any files owned by the parent, to reflect that an additional process now also owns those files.
    5. Assign the child process to the Ready to Run state.
    6. Returns the ID number of the child to the parent process, and a 0 value to the child process.

After Creation

  • After creating the process the Kernel can do

one of the following, as part of the dispatcher routine:

  • Stay in the parent process.
  • Transfer control to the child process
  • Transfer control to another process.