SYSTEM CALLS in Operating System

You might also like

Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 11

SYSTEM CALLS in

operating system
KANUPRIYA
190301120078
BTECH. CSE 4 TH SEM
CUTM, BBSR
Introduction
USER PROGRAM

System
System Calls provide the Interface between a process/user calls

program and the Operating System. KERNAL

It is a programmatic way in which a computer program


requests service from kernel. With the help of system call
we will access O.S. resources. HARDWARE
RESOURCES
SYSTEM CALL
HARDWARE
PROGRAM
RESOURCES

RESOURCES

• Due to security reasons user application are not given access to


hardware resources . Request is made through system calls only.
Process
control

File
Protection management

Types of
system
calls
Communicati Device
on management

Information
maintenance
Process control
System call which deals with processors. Functions:

• Create process, terminate process

• End, abort

• Load, execute

• Wait for time

• Allocate and free memory

Windows Linux
• CreateProcess() • fork()
• exit() • exit()
• waitforsingleobject() • wait()
File management
System calls responsible for file processing. Functions:
• Create file, delete file
• Open , close file
• Read, write, reposition
• Get and set file attributes

Windows Linux
• CreateFile() • open()
• ReadFile() • read()
• WriteFile() • write()
• CloseHandle() • close
Device management
A process may need several resources to execute main memory disk drive access to file, I/O devices.
If these resources are free then it will be allocated to process or else process will have to wait until
resources are available. Functions:

• Request device, release device

• Read, write, reposition

• Logically attach or detach devices

Windows Linux
• SetConsoleMode() • ioctl()
• ReadConsole() • read()
• WriteConsole() • write(
Information maintenance
It handles information, it transfers between user and os. Functions:
• Get time or date, set time or date
• Get system data, get system data
• Get and set process, file, or device attributes

Windows Linux
• GetCurrentProcessID() • getpid()
• SetTimer() • alarm()
• Sleep() • sleep()
Communication
These are useful for inter process communication. Functions:
• Create, delete communication connection
• Send, receive messages if message passing model to host name or process name from
client to server
• Transfer status information

Windows Linux
• CreatePipe() • pipe()
• CreateFileMapping() • shmget()
• MapViewOfFile() • mmap()
Protection
Functions:
• Control access to resources
• Get and set permissions
• Allow and deny user access

Windows Linux
• SetFileSecurity() • chmod()
• InitializeSecurityDescriptor() • umask()
• SetSecurityDescriptor() • chown()
THANK YOU

You might also like