SlideShare a Scribd company logo
1 of 5
Download to read offline
OPERATING SYSTEM
4th Stage , College of Education , KUFA University
CHAPTER TWO – OPERATING-SYSTEM
STRUCTURES
provides new coverage of user interfaces for
mobile devices, including discussions of iOS and
Android, and expanded coverage of Mac OS X as
a type of hybrid system.
Prepared By:
Dr. Ahmed J. Obaid
Lecture :7
4th
stage, CS Dept. Operating System, CH2 Dr. Ahmed J. Obaid
Operating System Structure
2.4 System Calls
System calls can be grouped roughly into six major categories:
Process control, file manipulation, device manipulation, information maintenance,
communications, and protection.
2.4.1 Process Control
A running program needs to be able to halt its execution either normally (end ()) or
abnormally (abort ()).
 If a system call is made to terminate the currently running program abnormally, or if
the program runs into a problem and causes an error trap ‫كمين‬ ‫او‬ ‫,شرك‬ a dump ‫مهمل‬ ‫جزء‬
of memory is sometimes taken and an error message generated.
 The dump is written to disk and may be examined by a debugger—a system program
designed to aid the programmer in finding and correcting errors, or bugs—to determine
the cause of the problem.
 Under either normal or abnormal circumstances, the operating system must transfer
control to the invoking command interpreter.
 The command interpreter then reads the next command.
 In an interactive system, the command interpreter simply continues with the next
command; it is assumed that the user will issue an appropriate command to respond
to any error. In a GUI system, a pop-up window might alert the user to the error and
ask for guidance. In a batch system, the command interpreter usually terminates the
entire job and continues with the next job. Some systems may allow for special recovery
actions in case an error occurs. If the program discovers an error in its input and
wants to terminate abnormally, it may also want to define an error level.
4th
stage, CS Dept. Operating System, CH2 Dr. Ahmed J. Obaid
Process Control Calls:
◦ end, abort
◦ load, execute
◦ create process, terminate process
◦ get process attributes, set process attributes
◦ wait for time
◦ wait event, signal event
◦ allocate and free memory
========================================================
LINUX: Process Control
Linux is multi-tasking OS and it executes multiple processes simultaneous. One
of the best futures of working at the terminal line is that we can easily manipulate
this type of activity(processes).
Why is important to control the processes in Linux
Well, as administrator you will have to know and understand the Linux
Processes and what types they are so you can manipulate then as you like.
By manipulating we refer to the priority of running processes and termination of
that processes.
4th
stage, CS Dept. Operating System, CH2 Dr. Ahmed J. Obaid
What is Running Processes?
Also called ‘running instance’ or ‘program’ the process is a program in execution.
The processes consist in executing program code, resources such as open files,
internal data, an address space, one or more threads of execution and a data section
containing global variables.
Every process has its own descriptors that keeps the information used to track
the process in the memory.
We will not look deep into the processes since this is a wide area in the Linux
OS. We are going to describe and explain how we can see and manipulate the
running processes.
2.4.2 File Management
A running program needs to be able to halt its execution either normally (end ()) or
abnormally (abort ()).
 We first need to be able to create() and delete() files. Either system call requires the
name of the file and perhaps some of the file’s attributes. Once the file is created, we
need to open() it and to use it. We may also read(), write(), or reposition() (rewind
or skip to the end of the file, for example). Finally, we need to close() the file, indicating
that we are no longer using it. We may need these same sets of operations for
directories if we have a directory structure for organizing files in the file system. In
addition, for either files or directories, we need to be able to determine the values of
4th
stage, CS Dept. Operating System, CH2 Dr. Ahmed J. Obaid
various attributes and perhaps to reset them if necessary. File attributes include the file
name, file type, protection codes, accounting information, and so on.
 Some operating systems provide many more calls, such as calls for file move() and
copy(). Others might provide an API that performs those operations using code and
other system calls, and others might provide system programs to perform those tasks.
 If the system programs are callable by other programs, then each can be considered
an API by other system programs.
File management Calls
◦ create file, delete file
◦ open, close
◦ read, write, reposition
◦ get file attributes, set file attributes

More Related Content

What's hot

Introduction of operating system
Introduction of operating systemIntroduction of operating system
Introduction of operating systemmahfuzur32785
 
1 introduction
1 introduction1 introduction
1 introductionMohd Arif
 
Operating System Structure (documentation)
Operating System Structure (documentation)Operating System Structure (documentation)
Operating System Structure (documentation)Navid Daneshvaran
 
Structure of operating system
Structure of operating systemStructure of operating system
Structure of operating systemGayathriS578276
 
Operating System Concepts Presentation
Operating System Concepts PresentationOperating System Concepts Presentation
Operating System Concepts PresentationNitish Jadia
 
OS - Ch1
OS - Ch1OS - Ch1
OS - Ch1sphs
 
Operating System- Services,types.Batch files and DOS history
Operating System- Services,types.Batch files and DOS historyOperating System- Services,types.Batch files and DOS history
Operating System- Services,types.Batch files and DOS historySURBHI SAROHA
 
What is operating system
What is operating systemWhat is operating system
What is operating systemSuvithak
 
Introduction to computer_lec_06_fall_2018
Introduction to computer_lec_06_fall_2018Introduction to computer_lec_06_fall_2018
Introduction to computer_lec_06_fall_2018Ramadan Babers, PhD
 
Operating system 02 os as an extended machine
Operating system 02 os as an extended machineOperating system 02 os as an extended machine
Operating system 02 os as an extended machineVaibhav Khanna
 
Operating system
Operating systemOperating system
Operating systemHaripritha
 
Operating System BCA 301
Operating System BCA 301Operating System BCA 301
Operating System BCA 301cpjcollege
 
Operating system (os)
Operating system (os)Operating system (os)
Operating system (os)bbp2067
 
Unit 2 process Management
Unit 2 process ManagementUnit 2 process Management
Unit 2 process Managementzahid7578
 

What's hot (19)

Introduction of operating system
Introduction of operating systemIntroduction of operating system
Introduction of operating system
 
Operating System
Operating SystemOperating System
Operating System
 
Operating system alif
Operating system alifOperating system alif
Operating system alif
 
1 introduction
1 introduction1 introduction
1 introduction
 
Introduction to computer_lec_06
Introduction to computer_lec_06Introduction to computer_lec_06
Introduction to computer_lec_06
 
Operating System Structure (documentation)
Operating System Structure (documentation)Operating System Structure (documentation)
Operating System Structure (documentation)
 
Structure of operating system
Structure of operating systemStructure of operating system
Structure of operating system
 
Chapter01
Chapter01Chapter01
Chapter01
 
Operating System Concepts Presentation
Operating System Concepts PresentationOperating System Concepts Presentation
Operating System Concepts Presentation
 
OS - Ch1
OS - Ch1OS - Ch1
OS - Ch1
 
Operating System- Services,types.Batch files and DOS history
Operating System- Services,types.Batch files and DOS historyOperating System- Services,types.Batch files and DOS history
Operating System- Services,types.Batch files and DOS history
 
What is operating system
What is operating systemWhat is operating system
What is operating system
 
Introduction to computer_lec_06_fall_2018
Introduction to computer_lec_06_fall_2018Introduction to computer_lec_06_fall_2018
Introduction to computer_lec_06_fall_2018
 
Operating system 02 os as an extended machine
Operating system 02 os as an extended machineOperating system 02 os as an extended machine
Operating system 02 os as an extended machine
 
Operating system
Operating systemOperating system
Operating system
 
Operating System BCA 301
Operating System BCA 301Operating System BCA 301
Operating System BCA 301
 
Operating system (os)
Operating system (os)Operating system (os)
Operating system (os)
 
Unit 2 process Management
Unit 2 process ManagementUnit 2 process Management
Unit 2 process Management
 
02.Os Structure
02.Os Structure02.Os Structure
02.Os Structure
 

Similar to OS Structures and System Calls

16. Computer Systems Basic Software 2
16. Computer Systems   Basic Software 216. Computer Systems   Basic Software 2
16. Computer Systems Basic Software 2New Era University
 
operatinndnd jdj jjrg-system-1(1) (1).pptx
operatinndnd jdj jjrg-system-1(1) (1).pptxoperatinndnd jdj jjrg-system-1(1) (1).pptx
operatinndnd jdj jjrg-system-1(1) (1).pptxkrishnajoshi70
 
services and system calls of operating system
services and system calls of operating system services and system calls of operating system
services and system calls of operating system Saurabh Soni
 
Hcs Topic 5 Software V2
Hcs Topic 5 Software V2Hcs Topic 5 Software V2
Hcs Topic 5 Software V2ekul
 
Hcs Topic 5 Software V2
Hcs Topic 5 Software V2Hcs Topic 5 Software V2
Hcs Topic 5 Software V2Kyle
 
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 SystemsArnoyKhan
 
Fundamental concepts and_principles_of_operating_systems (2)
Fundamental concepts and_principles_of_operating_systems (2)Fundamental concepts and_principles_of_operating_systems (2)
Fundamental concepts and_principles_of_operating_systems (2)DanaAlexander13
 
installing and optimizing operating system software
installing and optimizing operating system software   installing and optimizing operating system software
installing and optimizing operating system software Jaleto Sunkemo
 
CS9222 Advanced Operating System
CS9222 Advanced Operating SystemCS9222 Advanced Operating System
CS9222 Advanced Operating SystemKathirvel Ayyaswamy
 
UNIT-2-Process-Management.pdf
UNIT-2-Process-Management.pdfUNIT-2-Process-Management.pdf
UNIT-2-Process-Management.pdfaakritii765
 
L-3 BCE OS FINAL.ppt
L-3 BCE OS FINAL.pptL-3 BCE OS FINAL.ppt
L-3 BCE OS FINAL.pptKirti Verma
 
Operating System 2
Operating System 2Operating System 2
Operating System 2tech2click
 
Computer software form 4
Computer software form 4Computer software form 4
Computer software form 4norhaslinamj
 
Windows Architecture Explained by Stacksol
Windows Architecture Explained by StacksolWindows Architecture Explained by Stacksol
Windows Architecture Explained by StacksolStacksol
 
Basics of Operating System
Basics of Operating SystemBasics of Operating System
Basics of Operating SystemSoumit Ghosh
 
Solid-State diskA solid-state drive also known as a solid-state di.pdf
Solid-State diskA solid-state drive also known as a solid-state di.pdfSolid-State diskA solid-state drive also known as a solid-state di.pdf
Solid-State diskA solid-state drive also known as a solid-state di.pdfsaahinmanpam
 
M.c.a. (sem ii) operating systems
M.c.a. (sem   ii) operating systemsM.c.a. (sem   ii) operating systems
M.c.a. (sem ii) operating systemsTushar Rajput
 

Similar to OS Structures and System Calls (20)

16. Computer Systems Basic Software 2
16. Computer Systems   Basic Software 216. Computer Systems   Basic Software 2
16. Computer Systems Basic Software 2
 
operatinndnd jdj jjrg-system-1(1) (1).pptx
operatinndnd jdj jjrg-system-1(1) (1).pptxoperatinndnd jdj jjrg-system-1(1) (1).pptx
operatinndnd jdj jjrg-system-1(1) (1).pptx
 
services and system calls of operating system
services and system calls of operating system services and system calls of operating system
services and system calls of operating system
 
Hcs Topic 5 Software V2
Hcs Topic 5 Software V2Hcs Topic 5 Software V2
Hcs Topic 5 Software V2
 
Hcs Topic 5 Software V2
Hcs Topic 5 Software V2Hcs Topic 5 Software V2
Hcs Topic 5 Software V2
 
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
 
CH02.pdf
CH02.pdfCH02.pdf
CH02.pdf
 
Fundamental concepts and_principles_of_operating_systems (2)
Fundamental concepts and_principles_of_operating_systems (2)Fundamental concepts and_principles_of_operating_systems (2)
Fundamental concepts and_principles_of_operating_systems (2)
 
installing and optimizing operating system software
installing and optimizing operating system software   installing and optimizing operating system software
installing and optimizing operating system software
 
CS9222 Advanced Operating System
CS9222 Advanced Operating SystemCS9222 Advanced Operating System
CS9222 Advanced Operating System
 
UNIT-2-Process-Management.pdf
UNIT-2-Process-Management.pdfUNIT-2-Process-Management.pdf
UNIT-2-Process-Management.pdf
 
L-3 BCE OS FINAL.ppt
L-3 BCE OS FINAL.pptL-3 BCE OS FINAL.ppt
L-3 BCE OS FINAL.ppt
 
Operating System 2
Operating System 2Operating System 2
Operating System 2
 
Computer software form 4
Computer software form 4Computer software form 4
Computer software form 4
 
Windows Architecture Explained by Stacksol
Windows Architecture Explained by StacksolWindows Architecture Explained by Stacksol
Windows Architecture Explained by Stacksol
 
Basics of Operating System
Basics of Operating SystemBasics of Operating System
Basics of Operating System
 
OpeatingSystemPPT
OpeatingSystemPPTOpeatingSystemPPT
OpeatingSystemPPT
 
Solid-State diskA solid-state drive also known as a solid-state di.pdf
Solid-State diskA solid-state drive also known as a solid-state di.pdfSolid-State diskA solid-state drive also known as a solid-state di.pdf
Solid-State diskA solid-state drive also known as a solid-state di.pdf
 
M.c.a. (sem ii) operating systems
M.c.a. (sem   ii) operating systemsM.c.a. (sem   ii) operating systems
M.c.a. (sem ii) operating systems
 
Ch2
Ch2Ch2
Ch2
 

Recently uploaded

WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...gurkirankumar98700
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilV3cube
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 

Recently uploaded (20)

WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of Brazil
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 

OS Structures and System Calls

  • 1. OPERATING SYSTEM 4th Stage , College of Education , KUFA University CHAPTER TWO – OPERATING-SYSTEM STRUCTURES provides new coverage of user interfaces for mobile devices, including discussions of iOS and Android, and expanded coverage of Mac OS X as a type of hybrid system. Prepared By: Dr. Ahmed J. Obaid Lecture :7
  • 2. 4th stage, CS Dept. Operating System, CH2 Dr. Ahmed J. Obaid Operating System Structure 2.4 System Calls System calls can be grouped roughly into six major categories: Process control, file manipulation, device manipulation, information maintenance, communications, and protection. 2.4.1 Process Control A running program needs to be able to halt its execution either normally (end ()) or abnormally (abort ()).  If a system call is made to terminate the currently running program abnormally, or if the program runs into a problem and causes an error trap ‫كمين‬ ‫او‬ ‫,شرك‬ a dump ‫مهمل‬ ‫جزء‬ of memory is sometimes taken and an error message generated.  The dump is written to disk and may be examined by a debugger—a system program designed to aid the programmer in finding and correcting errors, or bugs—to determine the cause of the problem.  Under either normal or abnormal circumstances, the operating system must transfer control to the invoking command interpreter.  The command interpreter then reads the next command.  In an interactive system, the command interpreter simply continues with the next command; it is assumed that the user will issue an appropriate command to respond to any error. In a GUI system, a pop-up window might alert the user to the error and ask for guidance. In a batch system, the command interpreter usually terminates the entire job and continues with the next job. Some systems may allow for special recovery actions in case an error occurs. If the program discovers an error in its input and wants to terminate abnormally, it may also want to define an error level.
  • 3. 4th stage, CS Dept. Operating System, CH2 Dr. Ahmed J. Obaid Process Control Calls: ◦ end, abort ◦ load, execute ◦ create process, terminate process ◦ get process attributes, set process attributes ◦ wait for time ◦ wait event, signal event ◦ allocate and free memory ======================================================== LINUX: Process Control Linux is multi-tasking OS and it executes multiple processes simultaneous. One of the best futures of working at the terminal line is that we can easily manipulate this type of activity(processes). Why is important to control the processes in Linux Well, as administrator you will have to know and understand the Linux Processes and what types they are so you can manipulate then as you like. By manipulating we refer to the priority of running processes and termination of that processes.
  • 4. 4th stage, CS Dept. Operating System, CH2 Dr. Ahmed J. Obaid What is Running Processes? Also called ‘running instance’ or ‘program’ the process is a program in execution. The processes consist in executing program code, resources such as open files, internal data, an address space, one or more threads of execution and a data section containing global variables. Every process has its own descriptors that keeps the information used to track the process in the memory. We will not look deep into the processes since this is a wide area in the Linux OS. We are going to describe and explain how we can see and manipulate the running processes. 2.4.2 File Management A running program needs to be able to halt its execution either normally (end ()) or abnormally (abort ()).  We first need to be able to create() and delete() files. Either system call requires the name of the file and perhaps some of the file’s attributes. Once the file is created, we need to open() it and to use it. We may also read(), write(), or reposition() (rewind or skip to the end of the file, for example). Finally, we need to close() the file, indicating that we are no longer using it. We may need these same sets of operations for directories if we have a directory structure for organizing files in the file system. In addition, for either files or directories, we need to be able to determine the values of
  • 5. 4th stage, CS Dept. Operating System, CH2 Dr. Ahmed J. Obaid various attributes and perhaps to reset them if necessary. File attributes include the file name, file type, protection codes, accounting information, and so on.  Some operating systems provide many more calls, such as calls for file move() and copy(). Others might provide an API that performs those operations using code and other system calls, and others might provide system programs to perform those tasks.  If the system programs are callable by other programs, then each can be considered an API by other system programs. File management Calls ◦ create file, delete file ◦ open, close ◦ read, write, reposition ◦ get file attributes, set file attributes