Você está na página 1de 13

IN THE NAME OF

ALLAH,
THE MOST GRACIOUS,
THE MOST MERCIFUL
ASSIGNMENT
ON
Process creation
Process termination
System calls
Submitted to:
Sir Asif Javed
Submitted by:
Sami Ullah Kaifi
Roll No:
BS(IT)-08-16
Course:
Operating System

Department of Information Technology


Institute of Computing

Bahauddin Zakariya University(Multan)


Process creation

Process Creation: To create a process


OS needs these three components
1. An executable program
2. Data
3. Context information

• All information the operating system needs to


interleave and restart a process.

􀂙When OS receives a request to create a


process, it builds the data structures and
allocates a space for this process in memory.
Process Creation: Demand for a process

􀀹 In a batch environment, request for a job activates the OS


to 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 an


application, i.e. for an application requesting to print a file,
so that the printing request can continue independently
from the application.

􀀹 A process or a server (like socket) can request a new


process for each client it handles (spawning).
Process Termination

There are many reasons for process termination:

Batch job issues halt instruction


User logs off
Process executes a service request to terminate
Error and fault conditions
Normal completion
Time limit exceeded
Memory unavailable
Bounds violation; for example: attempted access of (non-existent) 11th
element of a 10-element array
Protection error; for example: attempted write to read-only file
Arithmetic error; for example: attempted division by zero
Time overrun; for example: process waited longer than a specified
maximum for an event
I/O failure
Invalid instruction; for example: when a process tries to execute data
(text)
Privileged instruction
Data misuse
Operating system intervention; processes terminate (cascading
termination)for example: to resolve a deadlock
Parent terminates so child
Parent request
System Calls
oSystem calls provide an interface between the process an the operating
system.

oSystem calls allow user-level processes to request some services from the
operating 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 critical
nature of operations that the operating system itself does them every time
they are needed.
oFor example, for I/O a process involves a system call telling the
operating system to read or write particular area and this request is
satisfied by the operating system.

•System programs provide basic functioning to users so that they do


not 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.


Questioners
Are
Welcome

By sami ullah kaifi

Você também pode gostar