Ch03-OS9e
Ch03-OS9e
Process
Description and
Control
Ninth Edition, Global Edition
By William Stallings
Program code
which may be shared with other processes that are
executing the same program
A set of data associated with
that code
when the processor begins to execute the program code,
we refer to this executing entity as a process
Identifier
Program
State Priority
counter
Accountin
I/O status
Memory Context g
informatio
pointers data informatio
n
n
Copyright © 2018 Pearson Education, Ltd. All Rights Reserved.
Process
Control Block
Contains the process elements
(Table is located on
page 111
in the textbook)
Copyright © 2018 Pearson Education, Ltd. All Rights Reserved.
Five-State Process
Model
Typical
Elements
of a
Process
Control
Block
(page 1 of 2)
(Table is located
on page 125 in the
textbook)
(page 2 of 2)
(Table is located
on page 125 in the
textbook)
Copyright © 2018 Pearson Education, Ltd. All Rights Reserved.
Process
Identification
Memory tables may be
Each process is assigned a organized to provide a map of
unique numeric identifier main memory with an
Otherwise there must be indication of which process is
a mapping that allows assigned to each region
the OS to locate the Similar references will appear
in I/O and file tables
appropriate tables based
on the process identifier When processes communicate
with one another, the process
Many of the tables identifier informs the OS of the
controlled by the OS may destination of a particular
use process identifiers to communication
cross-reference process When processes are allowed
tables
to create other processes,
identifiers indicate the parent
and descendents of each
Copyright © 2018 Pearson Education, Ltd. All Rights Reserved. process
Processor State
Information
• User- • Contains
visible condition codes
Consist
s of the
registers plus other
• Control Progra status
content information
s of m
process
and status • EFLAGS register
or status word is an example
register registers of a PSW used
(PSW) by any OS
s • Stack running on an
pointers x86 processor
x86
EFLAGS
Register
Bits
Less-privileged More-privileged
mode mode
User programs Also referred to as
typically execute control mode or
in this mode kernel mode
Kernel of the
operating system
Typical
Functions
of an
Operating
System
Kernel
6) The process is said to be operating in a _________ fashion if each process in the queue is
given
a certain amount of time, in turn, to execute and then returned to the queue, unless
blocked.
7) A process in the _________ state is in main memory and available for execution.
8) _________ tables are used to keep track of both main (real) and secondary (virtual)
memory.
9) The process control block information can be grouped into three general categories:
process
identification, __________ and process control information.
10) A __________ is the maximum amount of time that a process can execute before being
interrupted.
17)An error or exception condition generated within the currently running process
is __________.