operating system process by sami-kaifi
TRANSCRIPT
-
8/7/2019 operating system process by sami-kaifi
1/13
IN THE NAME OF
ALLAH,THE MOST GRACIOUS,THE MOST MERCIFUL
-
8/7/2019 operating system process by sami-kaifi
2/13
ASSIGNMENTON
Process creationProcess terminationSystem calls
-
8/7/2019 operating system process by sami-kaifi
3/13
Submitted to:
Sir Asif JavedSubmitted by:
Sami Ullah KaifiRoll No:
BS(IT)-08-16
Course:Operating System
Department of Information TechnologyInstitute of Computing
Bahauddin Zakariya University(Multan)
-
8/7/2019 operating system process by sami-kaifi
4/13
Process creation
Process Creation: To create a processOS needs these three components
1. An executable program2. Data3. Context information
All information the operating system needs tointerleave and restart a process.
When OS receives a request to create aprocess, it builds the data structures andallocates a space for this process in memory.
-
8/7/2019 operating system process by sami-kaifi
5/13
Process Creation: Demand for a process
In a batch environment, request for a job activates the OSto create a process.
In an interactive environment, when a user logs on the
system, a new process is initiated.
Operating system can also create a process on behalf of anapplication, i.e. for an application requesting to print a file,so that the printing request can continue independentlyfrom the application.
A process or a server (like socket) can request a newprocess for each client it handles (spawning).
-
8/7/2019 operating system process by sami-kaifi
6/13
There are many reasons for process termination:
Batch job issues halt instruction
User logs offProcess executes a service request to terminateError and fault conditionsNormal completionTime limit exceededMemory unavailableBounds violation; for example: attempted access of (non-existent) 11thelement of a 10-element arrayProtection error; for example: attempted write to read-only file
Process Termination
-
8/7/2019 operating system process by sami-kaifi
7/13
-
8/7/2019 operating system process by sami-kaifi
8/13
Arithmetic error; for example: attempted division by zeroTime overrun; for example: process waited longer than a specifiedmaximum for an eventI/O failureInvalid instruction; for example: when a process tries to execute data(text)
Privileged instructionData misuseOperating system intervention; processes terminate (cascadingtermination)for example: to resolve a deadlockParent terminates so childParent request
-
8/7/2019 operating system process by sami-kaifi
9/13
oSystem calls provide an interface between the process an the operatingsystem.
oSystem calls allow user-level processes to request some services from theoperating system which process itself is not allowed to do.
oIn handling the trap, the operating system will enter in the kernel mode,where it has access to privileged instructions, and can perform the desired
service on the behalf of user-level process. It is because of the criticalnature of operations that the operating system itself does them every timethey are needed.
System Calls
-
8/7/2019 operating system process by sami-kaifi
10/13
-
8/7/2019 operating system process by sami-kaifi
11/13
-
8/7/2019 operating system process by sami-kaifi
12/13
oFor example, for I/O a process involves a system call telling theoperating system to read or write particular area and this request issatisfied by the operating system.
System programs provide basic functioning to users so that they donot need to write their own environment for program development(editors, compilers) and program execution (shells).
In some sense, they are bundles of useful system calls.
-
8/7/2019 operating system process by sami-kaifi
13/13
QuestionersAre
Welcome
The End
By sami ullah kaifi