SlideShare a Scribd company logo
1 of 10
SYSTEM CALL
It provides the interface between a process and
the operating system.
A system call is just a mechanism.
User programme receives operating system
services through the set of system calls.
It controls processes.
System calls’ process
 First the programme executes the system call instructions.
 The hardware saves the current instructiion and PSW register
in the i and iPSW register.
 0 value is loaded into PSW register by hardware. It keeps the
machine in system mode with interrupt disabled.
 The hardware loads the i register from the system call
interrupt vector location. This completes the execution of the
system call instruction by the hardware.
 Instruction execution continues at the beginning of the
system call interrupt handler.
 The process that executed the system call instruction
continues at the instruction after the system call.
DIAGRAM
Library functions
Executable programme
System calls
kernel
hardware
• A system call is made using the system call
machine language instruction. System calls
can be grouped into five major categories.
1. File management
2. Interprocess communication
3. Process management
4. I/O device management
5. Information maintenance
TYPES OF SYSTEM CALL
FILE MANAGEMENT
Create Create a new file and open it
Delete Delete a file
Open Open a file to read or write
Close Close a file(no longer using it)
Read Read a byte from an open file
Write Write a byte to an open file
Stat Get information about a file
Unlink Remove a file from a directory
INTERPROCESS COMMUNICATION
Create a message queue Create a queue to hold message
Send message Send a message to a message queue
Receive message Receive a message from a message queue
Close connection Terminates the communication
I/O DEVICE SYSTEM CALLS
Request
device
To ensure exclusive use of device
Release device Release the device after finished with the device
Read, write Same as file system call
Stat Get information about an I/O device
Read Read a byte from an open file
Write Write a byte to an open file
Stat Get information about a file
Unlink Remove a file from a directory
INFORMATION MAINTENANCE
Get time and date
Set time and date
Set process, file or device attributes
Get process, file or device attributes
Get system data
Set system data
Categories Windows UNIX
Process control CreateProcess()
ExitProcess()
WaitForSingleObject()
fork()
exit()
wait()
File manipulation CreateFile()
ReadFile()
WriteFile()
CloseHandle()
Open()
Read()
write()
close()
Device manipulation SetConsoleMode()
ReadConsole()
WriteConsole()
Ioctl()
read()
write()
Information maintanence GetCurrentProcessID()
SetTimer()
Sleep()
getpid()
alarm()
sleep()
Communication CreatePipe()
CreateFileMapping()
MapViewOfFile()
pipe()
shm_open()
mmap()
Protection SetFileSecurity()
InitlializeSecurityDescriptor()
SetSecurityDescriptorGroup()
chmod()
umask()
chown()

More Related Content

What's hot (12)

Understanding operating systems 5th ed ch11
Understanding operating systems 5th ed ch11Understanding operating systems 5th ed ch11
Understanding operating systems 5th ed ch11
 
App A
App AApp A
App A
 
Os security issues
Os security issuesOs security issues
Os security issues
 
Operating system security (a brief)
Operating system security (a brief)Operating system security (a brief)
Operating system security (a brief)
 
Operating system and security
Operating system and securityOperating system and security
Operating system and security
 
How to Recover Files
How to Recover FilesHow to Recover Files
How to Recover Files
 
Ch2
Ch2Ch2
Ch2
 
Chapter 14 - Protection
Chapter 14 - ProtectionChapter 14 - Protection
Chapter 14 - Protection
 
Understanding operating systems 5th ed ch05
Understanding operating systems 5th ed ch05Understanding operating systems 5th ed ch05
Understanding operating systems 5th ed ch05
 
Do journaling filesystems guarantee against corruption after a power failure (1)
Do journaling filesystems guarantee against corruption after a power failure (1)Do journaling filesystems guarantee against corruption after a power failure (1)
Do journaling filesystems guarantee against corruption after a power failure (1)
 
Ppt linux
Ppt linuxPpt linux
Ppt linux
 
Goals of protection
Goals of protectionGoals of protection
Goals of protection
 

Similar to System call

16. Computer Systems Basic Software 2
16. Computer Systems   Basic Software 216. Computer Systems   Basic Software 2
16. Computer Systems Basic Software 2
New Era University
 
Structure of operating system
Structure of operating systemStructure of operating system
Structure of operating system
Rafi Dar
 
OS - Ch2
OS - Ch2OS - Ch2
OS - Ch2
sphs
 
Chapter 2 - Operating System Structures
Chapter 2 - Operating System StructuresChapter 2 - Operating System Structures
Chapter 2 - Operating System Structures
Wayne Jones Jnr
 

Similar to System call (20)

System call
System callSystem call
System call
 
2_System Calls.pptx
2_System Calls.pptx2_System Calls.pptx
2_System Calls.pptx
 
Operating system
Operating systemOperating system
Operating system
 
Lecture_02_Operating System Structures Operating Systems
Lecture_02_Operating System Structures Operating SystemsLecture_02_Operating System Structures Operating Systems
Lecture_02_Operating System Structures Operating Systems
 
System calls
System callsSystem calls
System calls
 
System calls
System callsSystem calls
System calls
 
16. Computer Systems Basic Software 2
16. Computer Systems   Basic Software 216. Computer Systems   Basic Software 2
16. Computer Systems Basic Software 2
 
Structure of operating system
Structure of operating systemStructure of operating system
Structure of operating system
 
System calls
System callsSystem calls
System calls
 
ch3 - operating system structures.ppt
ch3 - operating system structures.pptch3 - operating system structures.ppt
ch3 - operating system structures.ppt
 
CH02.pdf
CH02.pdfCH02.pdf
CH02.pdf
 
Operating System 2
Operating System 2Operating System 2
Operating System 2
 
SystemCallsAndInvocationMethods_Mayin074.pptx
SystemCallsAndInvocationMethods_Mayin074.pptxSystemCallsAndInvocationMethods_Mayin074.pptx
SystemCallsAndInvocationMethods_Mayin074.pptx
 
OPERATING SYSTEM SERVICES, OPERATING SYSTEM STRUCTURES
OPERATING SYSTEM SERVICES, OPERATING SYSTEM STRUCTURESOPERATING SYSTEM SERVICES, OPERATING SYSTEM STRUCTURES
OPERATING SYSTEM SERVICES, OPERATING SYSTEM STRUCTURES
 
UNIT II.pptx
UNIT II.pptxUNIT II.pptx
UNIT II.pptx
 
operating system structure
operating system structureoperating system structure
operating system structure
 
OS UNIT 1 PPT.pptx
OS UNIT 1 PPT.pptxOS UNIT 1 PPT.pptx
OS UNIT 1 PPT.pptx
 
1.7 system calls
1.7 system calls1.7 system calls
1.7 system calls
 
OS - Ch2
OS - Ch2OS - Ch2
OS - Ch2
 
Chapter 2 - Operating System Structures
Chapter 2 - Operating System StructuresChapter 2 - Operating System Structures
Chapter 2 - Operating System Structures
 

More from RakshiyaRamya (9)

System architecture
System architectureSystem architecture
System architecture
 
System program
System programSystem program
System program
 
System design
System designSystem design
System design
 
System structure
System structureSystem structure
System structure
 
System service
System serviceSystem service
System service
 
Computer system organisation
Computer system organisationComputer system organisation
Computer system organisation
 
Operating system structure
Operating system structureOperating system structure
Operating system structure
 
Operating system
Operating systemOperating system
Operating system
 
Capability maturity model
Capability maturity modelCapability maturity model
Capability maturity model
 

Recently uploaded

Seal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxSeal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptx
negromaestrong
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global Impact
PECB
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
QucHHunhnh
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
ciinovamais
 

Recently uploaded (20)

Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
 
General Principles of Intellectual Property: Concepts of Intellectual Proper...
General Principles of Intellectual Property: Concepts of Intellectual  Proper...General Principles of Intellectual Property: Concepts of Intellectual  Proper...
General Principles of Intellectual Property: Concepts of Intellectual Proper...
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
Seal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxSeal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptx
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and Mode
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global Impact
 
Role Of Transgenic Animal In Target Validation-1.pptx
Role Of Transgenic Animal In Target Validation-1.pptxRole Of Transgenic Animal In Target Validation-1.pptx
Role Of Transgenic Animal In Target Validation-1.pptx
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
 
Food Chain and Food Web (Ecosystem) EVS, B. Pharmacy 1st Year, Sem-II
Food Chain and Food Web (Ecosystem) EVS, B. Pharmacy 1st Year, Sem-IIFood Chain and Food Web (Ecosystem) EVS, B. Pharmacy 1st Year, Sem-II
Food Chain and Food Web (Ecosystem) EVS, B. Pharmacy 1st Year, Sem-II
 
ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701
 
Asian American Pacific Islander Month DDSD 2024.pptx
Asian American Pacific Islander Month DDSD 2024.pptxAsian American Pacific Islander Month DDSD 2024.pptx
Asian American Pacific Islander Month DDSD 2024.pptx
 
Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SD
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.ppt
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdf
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docx
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
 
Unit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxUnit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptx
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 

System call

  • 2. It provides the interface between a process and the operating system. A system call is just a mechanism. User programme receives operating system services through the set of system calls. It controls processes.
  • 3. System calls’ process  First the programme executes the system call instructions.  The hardware saves the current instructiion and PSW register in the i and iPSW register.  0 value is loaded into PSW register by hardware. It keeps the machine in system mode with interrupt disabled.  The hardware loads the i register from the system call interrupt vector location. This completes the execution of the system call instruction by the hardware.  Instruction execution continues at the beginning of the system call interrupt handler.  The process that executed the system call instruction continues at the instruction after the system call.
  • 5. • A system call is made using the system call machine language instruction. System calls can be grouped into five major categories. 1. File management 2. Interprocess communication 3. Process management 4. I/O device management 5. Information maintenance TYPES OF SYSTEM CALL
  • 6. FILE MANAGEMENT Create Create a new file and open it Delete Delete a file Open Open a file to read or write Close Close a file(no longer using it) Read Read a byte from an open file Write Write a byte to an open file Stat Get information about a file Unlink Remove a file from a directory
  • 7. INTERPROCESS COMMUNICATION Create a message queue Create a queue to hold message Send message Send a message to a message queue Receive message Receive a message from a message queue Close connection Terminates the communication
  • 8. I/O DEVICE SYSTEM CALLS Request device To ensure exclusive use of device Release device Release the device after finished with the device Read, write Same as file system call Stat Get information about an I/O device Read Read a byte from an open file Write Write a byte to an open file Stat Get information about a file Unlink Remove a file from a directory
  • 9. INFORMATION MAINTENANCE Get time and date Set time and date Set process, file or device attributes Get process, file or device attributes Get system data Set system data
  • 10. Categories Windows UNIX Process control CreateProcess() ExitProcess() WaitForSingleObject() fork() exit() wait() File manipulation CreateFile() ReadFile() WriteFile() CloseHandle() Open() Read() write() close() Device manipulation SetConsoleMode() ReadConsole() WriteConsole() Ioctl() read() write() Information maintanence GetCurrentProcessID() SetTimer() Sleep() getpid() alarm() sleep() Communication CreatePipe() CreateFileMapping() MapViewOfFile() pipe() shm_open() mmap() Protection SetFileSecurity() InitlializeSecurityDescriptor() SetSecurityDescriptorGroup() chmod() umask() chown()