See discussions, stats, and author profiles for this publication at: [Link]
net/publication/312190196
What is a Process ?
Article · January 2017
CITATIONS READS
0 5,341
1 author:
Ayman Hasan
Technische Universität Berlin
6 PUBLICATIONS 0 CITATIONS
SEE PROFILE
All content following this page was uploaded by Ayman Hasan on 10 January 2017.
The user has requested enhancement of the downloaded file.
What is a process ?
Background
befor defining the term process, it is useful to summarize some of the
concepts :
1. A computer platform consists of a collection of hardware resources,
such as the processor , main memoy, I/O modules, timers , disk drives,and
so on
.2. Computer applications are developed to perform some task .
Typically,they accept input from the outside world , perform some
processing , and gernerate output .
3. It is inefficient for applications to be written directly for a given
hardware [Link] principal reasons for this are as follows :
a. Numerous applications can be be developed for the same platform. Thus
, it makes sense to develop common routines for accessing the computer´s
resouces .
b. The processor itself provides only limited support for
multiprogramming , software is needed to mange the sharing of the
processor and the other resources by multiple applications at the same time
c. When multiple applications are active at the same time, it is necessary to
protect the date , I/O use , and other resource use of each application from
the others.
4. The OS was develped to provide a convenient,feature-rich,secure,and
consistent interface for applications [Link] OS is layer of software
between the applications and the computer hardware the supports
applications and utlities.
5. We can think of the OS as providing a uniform abstract representation of
resources than can be requested and sucessed by applications .
Resusources include main memory , newwork interfaces,file systems, and
so on . Once the OS has created these resource abstractions for
applications to use , it must also mange their use . For example , an OS
may permit resource sharing and resource protection.
Now that we have the concepts of the applications ,systems software, and
resources , we are in a postion to discuss how the OS can , in an orderly
fashion ,mange the execution of applications so that
• Resources are made avilable to multiple applications.
• The physical processor is switched among multiple applications so
all will appear to be progressing .
• The processor and I/O devices can be used efficiently .
The approach taken by all modern operating systems is to rely on a
model in which the execution of an application corresponds the
existence of one or more processes.
Processes and process Control Blocks
recall from Chapter 2 the we suggested several definitions of the term
process, including
• A program in execuation
• An instance of a program running on a computer
• The entity that can be assigened to and executed on a processor
• A unit of activity characterized by the execuation of a sequence of
insturctions , a current state , and an associated set of system
resources
we can also think of a process as an entity that consists of a number of
elements. Two essential elements of a process are program code (which
may be shared with other processes that are exeuating the same program )
and a set of data associated with that code . Let us suppose that processor
begins to excute this program code , and we refer to this executing entity
as a process At any given point in time , while the program is executing ,
this process can be uniquely characterized by number of elements ,
including the following :
identifier: A unique identifier associated with his process to distinguish it
from all other processes .
State: if the process is currently executing , it is the running state .
Priority: priority level relative to other processes .
Program conuter: the adress of the text insturaction in the program to be
executed .
Memory pointers: include pointers to the program code and date
associated with this process, plus any memory blocks shared with other
processes.
Context date: These are date that are present in registers in the processor
while the process is executing .
I/O status information: includes outstanding I/O requests , I/O devices
(E.G disk drives ) assigend to this process , a List of files in use by the
process , and so on .
Accounting information: may include the amount of processor time and
clock time used , time limits , accounts numbers , and so on .
The information in the preceding list is stored in a date structure , typically
called a process control block that is created and managed by the OS .
The significant point about the process control block is that it countains
sufficient information so that it is possible to interrupt a runnuing process
and later resume execution as if the interruption had not occurred . The
process control block is the key tool that enables the OS to support
multiple process and to provide for multiprocessing . When a process is
interrupted , the current values of the program counter and the processor
registers (context date ) are saved in the approprite fielde of the
corresponding porcess control block , and the state of the process is
changed so some other value such as blockes or ready . The OS is now free
to put some other process in the running state . The program conuter and
context date for this process are loaded into the processor registers and this
process now begins to execute . Thus we can say that a process consists of
program code and associated data plus a process control block . For a
single-processor computer , at any given time , at most one process is
executing and that process is in the running state .
ayman hasan 10.01.2017
View publication stats