0% found this document useful (0 votes)
1 views

Process Management System Exec

Uploaded by

Arun Kumar
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
1 views

Process Management System Exec

Uploaded by

Arun Kumar
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 11

Library Functions System calls

Supported by compilers Supported by operating system

Another name is Application Programming Interface (API) Another name is System Call Interface (SCI)

Writing program with APIs is called as application Writing program with SCIs is called as system
programming programming
They are slower but process calling library functions They are faster but process calling system calls execute
execute faster slower
Library functions are programmer friendly and specific to System calls are OS friendly and generic in nature
tasks For eg read()
For eg fgetc() reads only ASCII characters

Library functions execute in Users Space System call executes in Kernels Space

Library functions can be debugged using debugger. System calls cannot be debugged as executed by kernel
but you can check return value and error numbers to
avoid failure.
Process Control Block

•Process ID, its Parent ID


•Process state
•Program counter
•CPU registers
•CPU scheduling information
•Memory-management information
•List of open file descriptors
•I/O status information
•Accounting information
•And many more information….
Context switch takes some time. For process context switch is overhead, because during context switch no process
is executing. But context switch is done to give fare share of CPU to all processes. The context switch time
depends on low level hardware also.
This will internally creates a process sh and under sh another process is created which
executes the command.

You might also like