You are on page 1of 3

IT1816

PROCESSES
When a user gives command to a software there will be a process. We define process as of the following:
• A program in execution.
• An instance of a program being executed.
• An entity that is assigned and executed on a processor.
• A unit of activity that is characterized by the execution of sequence of instruction, state and associated
set of system resources.
• Process = User’s instruction + set of data + needed resources.

In each process being executed there are certain elements of process that we need
to consider and these are:
• Identifier - A unique identifier associated with this process, to distinguish
it from all other processes.
• State – E.g. RUNNING STATE – currently executing
• Priority – as per process, degree of process is shown.
• Program Counter – address of the next instruction is to be executed
• Memory Counter – points to the program code and data associated with
a given process.
• Context data – data that is to be included in the process.
• I/O Status Information – list of included I/O requests and devices.
• Accounting Information – information of the proc. clock, time limits and
other monitoring information.

Process Control Block


• Process Control Block is a representation of information list that it is stored
in a data structure.
• These Process Control Block contains sufficient information for the User
developer and OS to identify specific processes and it is one of a key tool
in handling processes in all software and systems.
• During in a process there are certain states which a certain process control
block can be indicated.

Here are the Process State Models which is encountered in an OS:

• Two-state Process Model



o When the OS creates a new process, it creates a process control block for the process and
enters that process into the system in the Not Running state.
o The process exists, is known to the OS, and is waiting for an opportunity to execute.
o From time to time, the currently running process will be interrupted and the dispatcher portion
of the OS will select some other process to run.
o The former process moves from the Running state to the Not Running state, and one of the
other processes moves to the Running state.

01 Handout 1 *Property of STI


 student.feedback@sti.edu Page 1 of 3
IT1816

• Five-state Model

o Running: The process that is currently being executed.


o Ready: A process that is prepared to execute when given the opportunity.
o Blocked/Waiting: A process that cannot execute until some event occurs, such as the
completion of an I/O operation.
o New: A process that has just been created but has not yet been admitted to the pool of
executable processes by the OS.
o Exit: A process that has been released from the pool of executable processes by the OS, either
because it halted or because it aborted for some reason.

• Suspended Process

o The process is not immediately available for execution.


o The process may or may not be waiting on an event. If it is, this blocked condition is independent
of the suspend condition, and occurrence of the blocking event does not enable the process to
be executed immediately.
o The process was placed in a suspended state by an agent: either itself, a parent process, or
the OS, for the purpose of preventing its execution.
o The process may not be removed from this state until the agent explicitly orders the removal.

Process Description

• The OS controls events within the computer system. It schedules and dispatches processes for
execution by the processor, allocates resources to processes, and responds to requests by user
processes for basic services. The OS manages the use of system resources by processes.

01 Handout 1 *Property of STI


 student.feedback@sti.edu Page 2 of 3
IT1816

Process Control Data Structures.

• From the process elements going through its description, we need to verify processes by using
indicators and information. Those indicators and information can be seen through different data
structures present in a particular resources and involved processes.
• These are the following:
o Memory Tables - Used to keep track of the main memory and the virtual memory.
o I/O Tables - Used to manage I/O devices and its channels (“Bus”).
o File Tables - Information about the data file, size, location in the secondary storage and their
attributes.
o Process Tables - Listed processes that is currently in queue.
• From these Data structures we might be able to throw processes that will not be in conflict with our
preceding instruction for processing.

Process Control

• Modes of Execution
• In each process that we might encounter, we need to understand that there are some specific
processes that require certain privileges in order to protect the Hardware and the Operating System
from impending malfunction. There are two modes of execution that we need to consider:
o User Mode – the less privileged mode.
o Privileged Mode – the fully privilege mode. In this mode certain elements of
warning must be considered. (system, control or kernel mode)
• Using modes is necessary to protect the OS and the key OS tables like control structures and
process control blocks from interference from the user.

• Process Creation
o In every process there are things that we need to consider in creating them:
 Assign a unique process identifier to the new process. - i.e. Unique name for
each process on the table.
 Allocate space for the process. - Looking at existing free block for a particular
process.
 Initialize the process control block. - Initialization of the process and updating of
states.
 Set the appropriate linkages. - The OS maintains the processes in the lists.
 Create or expand other data structures. - i.e. A file for each process with
information
• Process Switching
o There are instances that an executing process might be block, suspended or paused. Just
like for an instance of Interrupts and Priority. From this we can state that the OS needs to
provide regaining control if an event occurred:
 Clock Interrupts - Used in a process with an allowable amount of time. Time-
Slicing.
 I/O Interrupts - Used in waiting for the availability of each I/O device for another
process. i.e. Printer device – one process at a given time.
 Memory fault - Missing references of process address from the Virtual memory to
the main memory.
References:
• Stallings, W. (2015). Operating systems: Internals and design principles, 8th edition. USA:
Pearson Education, Inc.
• Tanenbaum, A. and Bos, H. (2015). Modern operating systems. USA: Pearson Education, Inc.
• McHoes, A. and Flynn, I. (2014). Understanding operating systems, 7th edition. USA: Cengage
Learning.

01 Handout 1 *Property of STI


 student.feedback@sti.edu Page 3 of 3

You might also like