Structure of Processes - PowerPoint PPT Presentation

1 / 14
About This Presentation
Title:

Structure of Processes

Description:

Chapter 6 Structure of Processes Process State and Transition Data Structure for Process Layout of System Memory THE DESIGN OF THE UNIX OPERATING SYSTEM – PowerPoint PPT presentation

Number of Views:191
Avg rating:3.0/5.0
Slides: 15
Provided by: SteveA199
Category:

less

Transcript and Presenter's Notes

Title: Structure of Processes


1
Structure of Processes
  • Chapter 6

Process State and Transition Data Structure for
Process Layout of System Memory
THE DESIGN OF THE UNIX OPERATING SYSTEM
Maurice J. bach Prentice Hall
2
Process States and Transitions
3
Data Structures for Process
4
Data Structure for Process (contd.)
per process region table
Kernel region table
u area
main memory
Kernel process table
5
State of a Process
  • Process table entry
  • Contains general fields of processes that must be
    always be accessible to the kernel
  • U area
  • further characteristics of the process only need
    to be accessible to the running process itself

6
Process table entry
  • State field user running, kernel running etc.
  • Fields that allow the kernel to locate the
    process and u area. Requires while context switch
  • Process size kernel know how much space to
    allocate for the process.
  • User ID
  • Process ID

7
Process table entry (contd.)
  • Event descriptor.
  • Used when the process is in the "sleep" state.
  • Scheduling parameters.
  • Allow the kernel to determine the order in which
    processes move to the states "kernel running" and
    "user running
  • A signal field.
  • keeps the signals sent to a process but not yet
    handled.
  • Various timers process execution time, resource
    utilization etc.

8
U Area
  • A pointer to the process table entry
  • User IDs
  • various Timer
  • Execution time in user mode
  • Execution Time in kernel mode
  • An error field keeps error during system call
  • Return value field result of system call

9
U Area (contd.)
  • I/O parameters
  • Amount of data transfer
  • Address of source and target etc.
  • The current directory and current root
  • User file descriptor table
  • Limit fields
  • Restrict process size
  • Restrict size of the file it can write
  • The control terminal field
  • login terminal associated with the process, if
    one exists
  • An array indicates how the process wishes to
    react to signal

10
Per Process Region Table (Pregion)
  • Each pregion entry points to the kernel region
    table
  • Starting virtual (absolute) address of the region
  • Permission filed
  • read-only, read-write, read-execute

11
Kernel Region table
  • Kernel region table contains the pointer to the
    page table which keeps the physical memory address

12
Regions
13
Pages and Page Tables
Logical Page Number Physical Page
Number 0 177 1 54 2 209 3 17
14
Pages and Page Tables (contd.)
Write a Comment
User Comments (0)
About PowerShow.com