ADVANCE
OPERATING SYSTEM
Darakhshan Nayab
MSC(IT)
MS(Computer Science)
Dept.of Computer Science
Content
■ System Call
■ API
■ How System Call Works?
■ Why do you need System Calls in OS?
■ Types
System Call
■ System Call provides an Interface between user program & Operating
system.
■ In computing, a system call is the programmatic way in which a computer
program requests a service from the kernel of the operating system it is
executed on.
■ A system call is a way for programs to interact with the operating system.
API
■ Application Program Interface(API) provides an interface
between a process and operating system to allow user-level
processes to request services of the operating system.
System calls are the only entry points into the kernel
system. All programs needing resources must use system
calls.
How System Call Works?
Step 1) The processes executed in the user mode till the time a
system call interrupts it.
Step 2) After that, the system call is executed in the kernel-
mode on a priority basis.
Step 3) Once system call execution is over, control returns to the
user mode.,
Step 4) The execution of user processes resumed in Kernel
mode.
Why do you need System Calls
in OS?
■ Reading and writing from files demand system calls.
■ If a file system wants to create or delete files, system calls are
required.
■ System calls are used for the creation and management of new
processes.
■ Network connections need system calls for sending and
receiving packets.
■ Access to hardware devices like scanner, printer, need a system
call.
Types
■ Process Control
■ File Management
■ Device Management
■ Information Maintenance
■ Communications
System call

System call

  • 1.
  • 2.
    Content ■ System Call ■API ■ How System Call Works? ■ Why do you need System Calls in OS? ■ Types
  • 3.
    System Call ■ SystemCall provides an Interface between user program & Operating system. ■ In computing, a system call is the programmatic way in which a computer program requests a service from the kernel of the operating system it is executed on. ■ A system call is a way for programs to interact with the operating system.
  • 4.
    API ■ Application ProgramInterface(API) provides an interface between a process and operating system to allow user-level processes to request services of the operating system. System calls are the only entry points into the kernel system. All programs needing resources must use system calls.
  • 5.
    How System CallWorks? Step 1) The processes executed in the user mode till the time a system call interrupts it. Step 2) After that, the system call is executed in the kernel- mode on a priority basis. Step 3) Once system call execution is over, control returns to the user mode., Step 4) The execution of user processes resumed in Kernel mode.
  • 7.
    Why do youneed System Calls in OS? ■ Reading and writing from files demand system calls. ■ If a file system wants to create or delete files, system calls are required. ■ System calls are used for the creation and management of new processes. ■ Network connections need system calls for sending and receiving packets. ■ Access to hardware devices like scanner, printer, need a system call.
  • 8.
    Types ■ Process Control ■File Management ■ Device Management ■ Information Maintenance ■ Communications