Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
SlideShare a Scribd company logo
Presentation On:

SYSTEM CALLS
Reference Book :

Operating System Organisation With Special
Reference To UNIX
By Satyapriya Bhattacharjee
Presented by;
Bernard Senam Parkoo
MSc. II, DOS In Computer Science
Presentation Outline
• What are System Calls
• Scenario of System Calls
• How a System Call Occurs
• Methods of Passing Parameters to the OS
• Categories of System Calls
What are System Calls
• System Calls provide the Interface between a
process and the Operating System.
• These calls are generally available as Assembly
language instruction.
• System Calls can also be made directly through
HLL programs for certain systems.

• UNIX System calls can be invoked directly from a
C or C++ program.
Scenario of System Calls
An Example of how system calls are used.
• Consider a simple program to copy data from one
file to another file .
• The first input of the program will be the name of
both files.
• These names can be specified depending on the
design of Operation System
• Once the file names are obtained, the program
opens an input file and create an output file
• Each of this operations require other System calls
and may encounter possible error conditions.
How System Calls Occur.
System Calls occur in different ways depending on the
computer in use:
• More information is required than just the identify of the
desired System call.
• The exact type and amount of information varies
according to the operation system and call
• For instance to get an input we need to specify the file of
device to use as source and the address and length of
memory buffer into which the input should be read.
Methods of Passing Parameters to
Operating System
Three methods are used in passing parameters to the
operation system.
• The simplest is approach is to pass parameter
through registers.
• The second is by storing parameters in blocks and
passing the address through registers.
• Finally parameter can be pushed into stack by the
program and popped of by the Operating System.
Categories of System Calls
System calls can be grouped into five major
categories as follows.
•
•
•
•
•

Process control
File management.
Device management
Information Maintenance and
Communication.
Process control
Some system calls under process control are:

•
•
•
•
•
•

End, abort
Load, execute
Create process, terminate process
Get process, terminate process
Wait for time
Allocate and free memory
File management.
Some system calls under file management are:
•
•
•
•

Create file, delete file
Open , close
Read, write, reposition.
Get file attributes, set fil attributes
Device management
Some system calls under device management are:
•
•
•
•

Request Device, release device
Read, write, reposition.
Get device attributes and set device attributes
Logically attach or detach devices
Information Maintenance
Some system calls under information maintenance
are:
•
•
•
•
•
•

Get time or date, Set time of date
Logically attach or detach devices
Information maintenance
Get system data, Set Systems data
Get process, file of device attributes
Set process, file or device attributes
Communication
•
•
•
•

Create, delete communication connection.
Send, receive messages
Transfer status information
Attach or detach remote devices.
The End

More Related Content

What's hot

Paging and segmentation
Paging and segmentationPaging and segmentation
Paging and segmentation
Piyush Rochwani
 
CPU Scheduling Algorithms
CPU Scheduling AlgorithmsCPU Scheduling Algorithms
CPU Scheduling Algorithms
Shubhashish Punj
 
Threads (operating System)
Threads (operating System)Threads (operating System)
Threads (operating System)
Prakhar Maurya
 
Operating systems system structures
Operating systems   system structuresOperating systems   system structures
Operating systems system structures
Mukesh Chinta
 
Memory Management in OS
Memory Management in OSMemory Management in OS
Memory Management in OS
Kumar Pritam
 
File handling in Python
File handling in PythonFile handling in Python
File handling in Python
Megha V
 
Introduction to Compiler design
Introduction to Compiler design Introduction to Compiler design
Introduction to Compiler design
Dr. C.V. Suresh Babu
 
Directory structure
Directory structureDirectory structure
Directory structure
sangrampatil81
 
Process synchronization in Operating Systems
Process synchronization in Operating SystemsProcess synchronization in Operating Systems
Process synchronization in Operating Systems
Ritu Ranjan Shrivastwa
 
Page replacement algorithms
Page replacement algorithmsPage replacement algorithms
Page replacement algorithms
Piyush Rochwani
 
Operating Systems - "Chapter 5 Process Synchronization"
Operating Systems - "Chapter 5 Process Synchronization"Operating Systems - "Chapter 5 Process Synchronization"
Operating Systems - "Chapter 5 Process Synchronization"
Ra'Fat Al-Msie'deen
 
Segmentation in Operating Systems.
Segmentation in Operating Systems.Segmentation in Operating Systems.
Segmentation in Operating Systems.
Muhammad SiRaj Munir
 
Memory Management in OS
Memory Management in OSMemory Management in OS
Memory Management in OS
vampugani
 
Semaphore
SemaphoreSemaphore
Semaphore
Arafat Hossan
 
Inter Process Communication
Inter Process CommunicationInter Process Communication
Inter Process Communication
Adeel Rasheed
 
Deadlock ppt
Deadlock ppt Deadlock ppt
Deadlock ppt
Sweetestangel Kochar
 
INTER PROCESS COMMUNICATION (IPC).pptx
INTER PROCESS COMMUNICATION (IPC).pptxINTER PROCESS COMMUNICATION (IPC).pptx
INTER PROCESS COMMUNICATION (IPC).pptx
LECO9
 
Osi reference model
Osi reference modelOsi reference model
Osi reference model
vasanthimuniasamy
 
process control block
process control blockprocess control block
process control block
Vikas SHRIVASTAVA
 
Memory management
Memory managementMemory management
Memory management
Rajni Sirohi
 

What's hot (20)

Paging and segmentation
Paging and segmentationPaging and segmentation
Paging and segmentation
 
CPU Scheduling Algorithms
CPU Scheduling AlgorithmsCPU Scheduling Algorithms
CPU Scheduling Algorithms
 
Threads (operating System)
Threads (operating System)Threads (operating System)
Threads (operating System)
 
Operating systems system structures
Operating systems   system structuresOperating systems   system structures
Operating systems system structures
 
Memory Management in OS
Memory Management in OSMemory Management in OS
Memory Management in OS
 
File handling in Python
File handling in PythonFile handling in Python
File handling in Python
 
Introduction to Compiler design
Introduction to Compiler design Introduction to Compiler design
Introduction to Compiler design
 
Directory structure
Directory structureDirectory structure
Directory structure
 
Process synchronization in Operating Systems
Process synchronization in Operating SystemsProcess synchronization in Operating Systems
Process synchronization in Operating Systems
 
Page replacement algorithms
Page replacement algorithmsPage replacement algorithms
Page replacement algorithms
 
Operating Systems - "Chapter 5 Process Synchronization"
Operating Systems - "Chapter 5 Process Synchronization"Operating Systems - "Chapter 5 Process Synchronization"
Operating Systems - "Chapter 5 Process Synchronization"
 
Segmentation in Operating Systems.
Segmentation in Operating Systems.Segmentation in Operating Systems.
Segmentation in Operating Systems.
 
Memory Management in OS
Memory Management in OSMemory Management in OS
Memory Management in OS
 
Semaphore
SemaphoreSemaphore
Semaphore
 
Inter Process Communication
Inter Process CommunicationInter Process Communication
Inter Process Communication
 
Deadlock ppt
Deadlock ppt Deadlock ppt
Deadlock ppt
 
INTER PROCESS COMMUNICATION (IPC).pptx
INTER PROCESS COMMUNICATION (IPC).pptxINTER PROCESS COMMUNICATION (IPC).pptx
INTER PROCESS COMMUNICATION (IPC).pptx
 
Osi reference model
Osi reference modelOsi reference model
Osi reference model
 
process control block
process control blockprocess control block
process control block
 
Memory management
Memory managementMemory management
Memory management
 

Similar to System calls

System call
System callSystem call
System call
shahadat hossain
 
Operating system 11 system calls
Operating system 11 system callsOperating system 11 system calls
Operating system 11 system calls
Vaibhav Khanna
 
Ch2 operating-system structures
Ch2   operating-system structuresCh2   operating-system structures
Ch2 operating-system structures
Welly Dian Astika
 
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
ArnoyKhan
 
CS403: Operating System : Lec 5 System calls.pptx
CS403: Operating System : Lec 5 System calls.pptxCS403: Operating System : Lec 5 System calls.pptx
CS403: Operating System : Lec 5 System calls.pptx
Asst.prof M.Gokilavani
 
OS Services, System call, Virtual Machine
OS Services, System call, Virtual MachineOS Services, System call, Virtual Machine
OS Services, System call, Virtual Machine
Divya S
 
Operating System 2
Operating System 2Operating System 2
Operating System 2
tech2click
 
CH02.pdf
CH02.pdfCH02.pdf
CH02.pdf
ImranKhan880955
 
OPERATING SYSTEM SERVICES, OPERATING SYSTEM STRUCTURES
OPERATING SYSTEM SERVICES, OPERATING SYSTEM STRUCTURESOPERATING SYSTEM SERVICES, OPERATING SYSTEM STRUCTURES
OPERATING SYSTEM SERVICES, OPERATING SYSTEM STRUCTURES
priyasoundar
 
2_System Calls.pptx
2_System Calls.pptx2_System Calls.pptx
2_System Calls.pptx
ssuser2adefd1
 
System Calls.pptx
System Calls.pptxSystem Calls.pptx
System Calls.pptx
laakshit7
 
Ch2
Ch2Ch2
chapter2.pptx
chapter2.pptxchapter2.pptx
chapter2.pptx
PardhisCreation
 
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
 
System calls
System callsSystem calls
System calls
SangeethaSasi1
 
Services and system calls
Services and system callsServices and system calls
Services and system calls
sangrampatil81
 
Os unit 1(cont)
Os unit 1(cont)Os unit 1(cont)
Operating System Structure Part-I.pdf
Operating System Structure Part-I.pdfOperating System Structure Part-I.pdf
Operating System Structure Part-I.pdf
Harika Pudugosula
 
SystemCallsAndInvocationMethods_Mayin074.pptx
SystemCallsAndInvocationMethods_Mayin074.pptxSystemCallsAndInvocationMethods_Mayin074.pptx
SystemCallsAndInvocationMethods_Mayin074.pptx
BlackGoku18
 

Similar to System calls (20)

System call
System callSystem call
System call
 
Operating system 11 system calls
Operating system 11 system callsOperating system 11 system calls
Operating system 11 system calls
 
Ch2 operating-system structures
Ch2   operating-system structuresCh2   operating-system structures
Ch2 operating-system structures
 
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
 
CS403: Operating System : Lec 5 System calls.pptx
CS403: Operating System : Lec 5 System calls.pptxCS403: Operating System : Lec 5 System calls.pptx
CS403: Operating System : Lec 5 System calls.pptx
 
OS Services, System call, Virtual Machine
OS Services, System call, Virtual MachineOS Services, System call, Virtual Machine
OS Services, System call, Virtual Machine
 
Operating System 2
Operating System 2Operating System 2
Operating System 2
 
CH02.pdf
CH02.pdfCH02.pdf
CH02.pdf
 
OPERATING SYSTEM SERVICES, OPERATING SYSTEM STRUCTURES
OPERATING SYSTEM SERVICES, OPERATING SYSTEM STRUCTURESOPERATING SYSTEM SERVICES, OPERATING SYSTEM STRUCTURES
OPERATING SYSTEM SERVICES, OPERATING SYSTEM STRUCTURES
 
2_System Calls.pptx
2_System Calls.pptx2_System Calls.pptx
2_System Calls.pptx
 
System Calls.pptx
System Calls.pptxSystem Calls.pptx
System Calls.pptx
 
Ch2
Ch2Ch2
Ch2
 
chapter2.pptx
chapter2.pptxchapter2.pptx
chapter2.pptx
 
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
 
System calls
System callsSystem calls
System calls
 
Services and system calls
Services and system callsServices and system calls
Services and system calls
 
Os unit 1(cont)
Os unit 1(cont)Os unit 1(cont)
Os unit 1(cont)
 
Operating System Structure Part-I.pdf
Operating System Structure Part-I.pdfOperating System Structure Part-I.pdf
Operating System Structure Part-I.pdf
 
SystemCallsAndInvocationMethods_Mayin074.pptx
SystemCallsAndInvocationMethods_Mayin074.pptxSystemCallsAndInvocationMethods_Mayin074.pptx
SystemCallsAndInvocationMethods_Mayin074.pptx
 

Recently uploaded

[Talk] Moving Beyond Spaghetti Infrastructure [AOTB] 2024-07-04.pdf
[Talk] Moving Beyond Spaghetti Infrastructure [AOTB] 2024-07-04.pdf[Talk] Moving Beyond Spaghetti Infrastructure [AOTB] 2024-07-04.pdf
[Talk] Moving Beyond Spaghetti Infrastructure [AOTB] 2024-07-04.pdf
Kief Morris
 
Paradigm Shifts in User Modeling: A Journey from Historical Foundations to Em...
Paradigm Shifts in User Modeling: A Journey from Historical Foundations to Em...Paradigm Shifts in User Modeling: A Journey from Historical Foundations to Em...
Paradigm Shifts in User Modeling: A Journey from Historical Foundations to Em...
Erasmo Purificato
 
What’s New in Teams Calling, Meetings and Devices May 2024
What’s New in Teams Calling, Meetings and Devices May 2024What’s New in Teams Calling, Meetings and Devices May 2024
What’s New in Teams Calling, Meetings and Devices May 2024
Stephanie Beckett
 
Pigging Solutions Sustainability brochure.pdf
Pigging Solutions Sustainability brochure.pdfPigging Solutions Sustainability brochure.pdf
Pigging Solutions Sustainability brochure.pdf
Pigging Solutions
 
Quality Patents: Patents That Stand the Test of Time
Quality Patents: Patents That Stand the Test of TimeQuality Patents: Patents That Stand the Test of Time
Quality Patents: Patents That Stand the Test of Time
Aurora Consulting
 
Running a Go App in Kubernetes: CPU Impacts
Running a Go App in Kubernetes: CPU ImpactsRunning a Go App in Kubernetes: CPU Impacts
Running a Go App in Kubernetes: CPU Impacts
ScyllaDB
 
MYIR Product Brochure - A Global Provider of Embedded SOMs & Solutions
MYIR Product Brochure - A Global Provider of Embedded SOMs & SolutionsMYIR Product Brochure - A Global Provider of Embedded SOMs & Solutions
MYIR Product Brochure - A Global Provider of Embedded SOMs & Solutions
Linda Zhang
 
HTTP Adaptive Streaming – Quo Vadis (2024)
HTTP Adaptive Streaming – Quo Vadis (2024)HTTP Adaptive Streaming – Quo Vadis (2024)
HTTP Adaptive Streaming – Quo Vadis (2024)
Alpen-Adria-Universität
 
How Netflix Builds High Performance Applications at Global Scale
How Netflix Builds High Performance Applications at Global ScaleHow Netflix Builds High Performance Applications at Global Scale
How Netflix Builds High Performance Applications at Global Scale
ScyllaDB
 
Verti - EMEA Insurer Innovation Award 2024
Verti - EMEA Insurer Innovation Award 2024Verti - EMEA Insurer Innovation Award 2024
Verti - EMEA Insurer Innovation Award 2024
The Digital Insurer
 
How to Avoid Learning the Linux-Kernel Memory Model
How to Avoid Learning the Linux-Kernel Memory ModelHow to Avoid Learning the Linux-Kernel Memory Model
How to Avoid Learning the Linux-Kernel Memory Model
ScyllaDB
 
@Call @Girls Guwahati 🚒 XXXXXXXXXX 🚒 Priya Sharma Beautiful And Cute Girl any...
@Call @Girls Guwahati 🚒 XXXXXXXXXX 🚒 Priya Sharma Beautiful And Cute Girl any...@Call @Girls Guwahati 🚒 XXXXXXXXXX 🚒 Priya Sharma Beautiful And Cute Girl any...
@Call @Girls Guwahati 🚒 XXXXXXXXXX 🚒 Priya Sharma Beautiful And Cute Girl any...
kantakumariji156
 
20240702 QFM021 Machine Intelligence Reading List June 2024
20240702 QFM021 Machine Intelligence Reading List June 202420240702 QFM021 Machine Intelligence Reading List June 2024
20240702 QFM021 Machine Intelligence Reading List June 2024
Matthew Sinclair
 
Fluttercon 2024: Showing that you care about security - OpenSSF Scorecards fo...
Fluttercon 2024: Showing that you care about security - OpenSSF Scorecards fo...Fluttercon 2024: Showing that you care about security - OpenSSF Scorecards fo...
Fluttercon 2024: Showing that you care about security - OpenSSF Scorecards fo...
Chris Swan
 
GDG Cloud Southlake #34: Neatsun Ziv: Automating Appsec
GDG Cloud Southlake #34: Neatsun Ziv: Automating AppsecGDG Cloud Southlake #34: Neatsun Ziv: Automating Appsec
GDG Cloud Southlake #34: Neatsun Ziv: Automating Appsec
James Anderson
 
Cookies program to display the information though cookie creation
Cookies program to display the information though cookie creationCookies program to display the information though cookie creation
Cookies program to display the information though cookie creation
shanthidl1
 
Calgary MuleSoft Meetup APM and IDP .pptx
Calgary MuleSoft Meetup APM and IDP .pptxCalgary MuleSoft Meetup APM and IDP .pptx
Calgary MuleSoft Meetup APM and IDP .pptx
ishalveerrandhawa1
 
BLOCKCHAIN FOR DUMMIES: GUIDEBOOK FOR ALL
BLOCKCHAIN FOR DUMMIES: GUIDEBOOK FOR ALLBLOCKCHAIN FOR DUMMIES: GUIDEBOOK FOR ALL
BLOCKCHAIN FOR DUMMIES: GUIDEBOOK FOR ALL
Liveplex
 
AC Atlassian Coimbatore Session Slides( 22/06/2024)
AC Atlassian Coimbatore Session Slides( 22/06/2024)AC Atlassian Coimbatore Session Slides( 22/06/2024)
AC Atlassian Coimbatore Session Slides( 22/06/2024)
apoorva2579
 
How Social Media Hackers Help You to See Your Wife's Message.pdf
How Social Media Hackers Help You to See Your Wife's Message.pdfHow Social Media Hackers Help You to See Your Wife's Message.pdf
How Social Media Hackers Help You to See Your Wife's Message.pdf
HackersList
 

Recently uploaded (20)

[Talk] Moving Beyond Spaghetti Infrastructure [AOTB] 2024-07-04.pdf
[Talk] Moving Beyond Spaghetti Infrastructure [AOTB] 2024-07-04.pdf[Talk] Moving Beyond Spaghetti Infrastructure [AOTB] 2024-07-04.pdf
[Talk] Moving Beyond Spaghetti Infrastructure [AOTB] 2024-07-04.pdf
 
Paradigm Shifts in User Modeling: A Journey from Historical Foundations to Em...
Paradigm Shifts in User Modeling: A Journey from Historical Foundations to Em...Paradigm Shifts in User Modeling: A Journey from Historical Foundations to Em...
Paradigm Shifts in User Modeling: A Journey from Historical Foundations to Em...
 
What’s New in Teams Calling, Meetings and Devices May 2024
What’s New in Teams Calling, Meetings and Devices May 2024What’s New in Teams Calling, Meetings and Devices May 2024
What’s New in Teams Calling, Meetings and Devices May 2024
 
Pigging Solutions Sustainability brochure.pdf
Pigging Solutions Sustainability brochure.pdfPigging Solutions Sustainability brochure.pdf
Pigging Solutions Sustainability brochure.pdf
 
Quality Patents: Patents That Stand the Test of Time
Quality Patents: Patents That Stand the Test of TimeQuality Patents: Patents That Stand the Test of Time
Quality Patents: Patents That Stand the Test of Time
 
Running a Go App in Kubernetes: CPU Impacts
Running a Go App in Kubernetes: CPU ImpactsRunning a Go App in Kubernetes: CPU Impacts
Running a Go App in Kubernetes: CPU Impacts
 
MYIR Product Brochure - A Global Provider of Embedded SOMs & Solutions
MYIR Product Brochure - A Global Provider of Embedded SOMs & SolutionsMYIR Product Brochure - A Global Provider of Embedded SOMs & Solutions
MYIR Product Brochure - A Global Provider of Embedded SOMs & Solutions
 
HTTP Adaptive Streaming – Quo Vadis (2024)
HTTP Adaptive Streaming – Quo Vadis (2024)HTTP Adaptive Streaming – Quo Vadis (2024)
HTTP Adaptive Streaming – Quo Vadis (2024)
 
How Netflix Builds High Performance Applications at Global Scale
How Netflix Builds High Performance Applications at Global ScaleHow Netflix Builds High Performance Applications at Global Scale
How Netflix Builds High Performance Applications at Global Scale
 
Verti - EMEA Insurer Innovation Award 2024
Verti - EMEA Insurer Innovation Award 2024Verti - EMEA Insurer Innovation Award 2024
Verti - EMEA Insurer Innovation Award 2024
 
How to Avoid Learning the Linux-Kernel Memory Model
How to Avoid Learning the Linux-Kernel Memory ModelHow to Avoid Learning the Linux-Kernel Memory Model
How to Avoid Learning the Linux-Kernel Memory Model
 
@Call @Girls Guwahati 🚒 XXXXXXXXXX 🚒 Priya Sharma Beautiful And Cute Girl any...
@Call @Girls Guwahati 🚒 XXXXXXXXXX 🚒 Priya Sharma Beautiful And Cute Girl any...@Call @Girls Guwahati 🚒 XXXXXXXXXX 🚒 Priya Sharma Beautiful And Cute Girl any...
@Call @Girls Guwahati 🚒 XXXXXXXXXX 🚒 Priya Sharma Beautiful And Cute Girl any...
 
20240702 QFM021 Machine Intelligence Reading List June 2024
20240702 QFM021 Machine Intelligence Reading List June 202420240702 QFM021 Machine Intelligence Reading List June 2024
20240702 QFM021 Machine Intelligence Reading List June 2024
 
Fluttercon 2024: Showing that you care about security - OpenSSF Scorecards fo...
Fluttercon 2024: Showing that you care about security - OpenSSF Scorecards fo...Fluttercon 2024: Showing that you care about security - OpenSSF Scorecards fo...
Fluttercon 2024: Showing that you care about security - OpenSSF Scorecards fo...
 
GDG Cloud Southlake #34: Neatsun Ziv: Automating Appsec
GDG Cloud Southlake #34: Neatsun Ziv: Automating AppsecGDG Cloud Southlake #34: Neatsun Ziv: Automating Appsec
GDG Cloud Southlake #34: Neatsun Ziv: Automating Appsec
 
Cookies program to display the information though cookie creation
Cookies program to display the information though cookie creationCookies program to display the information though cookie creation
Cookies program to display the information though cookie creation
 
Calgary MuleSoft Meetup APM and IDP .pptx
Calgary MuleSoft Meetup APM and IDP .pptxCalgary MuleSoft Meetup APM and IDP .pptx
Calgary MuleSoft Meetup APM and IDP .pptx
 
BLOCKCHAIN FOR DUMMIES: GUIDEBOOK FOR ALL
BLOCKCHAIN FOR DUMMIES: GUIDEBOOK FOR ALLBLOCKCHAIN FOR DUMMIES: GUIDEBOOK FOR ALL
BLOCKCHAIN FOR DUMMIES: GUIDEBOOK FOR ALL
 
AC Atlassian Coimbatore Session Slides( 22/06/2024)
AC Atlassian Coimbatore Session Slides( 22/06/2024)AC Atlassian Coimbatore Session Slides( 22/06/2024)
AC Atlassian Coimbatore Session Slides( 22/06/2024)
 
How Social Media Hackers Help You to See Your Wife's Message.pdf
How Social Media Hackers Help You to See Your Wife's Message.pdfHow Social Media Hackers Help You to See Your Wife's Message.pdf
How Social Media Hackers Help You to See Your Wife's Message.pdf
 

System calls

  • 1. Presentation On: SYSTEM CALLS Reference Book : Operating System Organisation With Special Reference To UNIX By Satyapriya Bhattacharjee Presented by; Bernard Senam Parkoo MSc. II, DOS In Computer Science
  • 2. Presentation Outline • What are System Calls • Scenario of System Calls • How a System Call Occurs • Methods of Passing Parameters to the OS • Categories of System Calls
  • 3. What are System Calls • System Calls provide the Interface between a process and the Operating System. • These calls are generally available as Assembly language instruction. • System Calls can also be made directly through HLL programs for certain systems. • UNIX System calls can be invoked directly from a C or C++ program.
  • 4. Scenario of System Calls An Example of how system calls are used. • Consider a simple program to copy data from one file to another file . • The first input of the program will be the name of both files. • These names can be specified depending on the design of Operation System • Once the file names are obtained, the program opens an input file and create an output file • Each of this operations require other System calls and may encounter possible error conditions.
  • 5. How System Calls Occur. System Calls occur in different ways depending on the computer in use: • More information is required than just the identify of the desired System call. • The exact type and amount of information varies according to the operation system and call • For instance to get an input we need to specify the file of device to use as source and the address and length of memory buffer into which the input should be read.
  • 6. Methods of Passing Parameters to Operating System Three methods are used in passing parameters to the operation system. • The simplest is approach is to pass parameter through registers. • The second is by storing parameters in blocks and passing the address through registers. • Finally parameter can be pushed into stack by the program and popped of by the Operating System.
  • 7. Categories of System Calls System calls can be grouped into five major categories as follows. • • • • • Process control File management. Device management Information Maintenance and Communication.
  • 8. Process control Some system calls under process control are: • • • • • • End, abort Load, execute Create process, terminate process Get process, terminate process Wait for time Allocate and free memory
  • 9. File management. Some system calls under file management are: • • • • Create file, delete file Open , close Read, write, reposition. Get file attributes, set fil attributes
  • 10. Device management Some system calls under device management are: • • • • Request Device, release device Read, write, reposition. Get device attributes and set device attributes Logically attach or detach devices
  • 11. Information Maintenance Some system calls under information maintenance are: • • • • • • Get time or date, Set time of date Logically attach or detach devices Information maintenance Get system data, Set Systems data Get process, file of device attributes Set process, file or device attributes
  • 12. Communication • • • • Create, delete communication connection. Send, receive messages Transfer status information Attach or detach remote devices.