SlideShare a Scribd company logo
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

PDF
Operating System Lecture 1
PDF
Operating System Lecture 2
PDF
Os lecture 6
PDF
Os lecture 5
PDF
Operating System Lecture 4
PDF
Operating System Lecture 3
PDF
Ch1kiit [compatibility mode]
PPT
Presentation1 cc
Operating System Lecture 1
Operating System Lecture 2
Os lecture 6
Os lecture 5
Operating System Lecture 4
Operating System Lecture 3
Ch1kiit [compatibility mode]
Presentation1 cc

What's hot (19)

PPTX
Introduction of operating system
PPT
Operating System
PPTX
Operating system alif
PDF
1 introduction
PDF
Introduction to computer_lec_06
DOCX
Operating System Structure (documentation)
PPTX
Structure of operating system
PPT
Chapter01
PDF
Operating System Concepts Presentation
PPT
OS - Ch1
PPTX
Operating System- Services,types.Batch files and DOS history
PPTX
What is operating system
PPTX
Introduction to computer_lec_06_fall_2018
PPTX
Operating system 02 os as an extended machine
PPTX
Operating system
PPT
Operating system (os)
PPTX
Unit 2 process Management
PDF
02.Os Structure
Introduction of operating system
Operating System
Operating system alif
1 introduction
Introduction to computer_lec_06
Operating System Structure (documentation)
Structure of operating system
Chapter01
Operating System Concepts Presentation
OS - Ch1
Operating System- Services,types.Batch files and DOS history
What is operating system
Introduction to computer_lec_06_fall_2018
Operating system 02 os as an extended machine
Operating system
Operating system (os)
Unit 2 process Management
02.Os Structure
Ad

Similar to Os lecture 7 (20)

PPTX
OS - Chapter # 3 for the development of os
PDF
Operating System Lecture 4 on Different Topics
PPTX
operating system process management with example
PPTX
Chapter -2 Operating-System and its Structures
PPTX
System-Calls-Bridging-Applications-and-the-OS[1] BINDUDUDU.pptx
PPT
9 cm402.13
PPTX
Operating Systems
PPT
ch2_OS Structures.ppt To discuss the various ways of structuring an operatin...
PPTX
Os lectures
PPTX
fork system call in operating system .pptx
PPTX
Lecture_02_Operating System Structures Operating Systems
PPTX
Lecture_Slide_4.pptx
PPTX
OS SERVICES.pptxJGHHHHHHHHHHHHHHHHGGGGGGGG
PDF
Os lab final
PDF
Lecture_3-Process Management.pdf
PPT
Processes this has stuff about processes and deifntions.ppt
PPTX
operating system module 2 presentation notes
PPT
Lecture5
PDF
Xv6 A Simple Unixlike Teaching Operating System Russ Cox Frans Kaashoek
OS - Chapter # 3 for the development of os
Operating System Lecture 4 on Different Topics
operating system process management with example
Chapter -2 Operating-System and its Structures
System-Calls-Bridging-Applications-and-the-OS[1] BINDUDUDU.pptx
9 cm402.13
Operating Systems
ch2_OS Structures.ppt To discuss the various ways of structuring an operatin...
Os lectures
fork system call in operating system .pptx
Lecture_02_Operating System Structures Operating Systems
Lecture_Slide_4.pptx
OS SERVICES.pptxJGHHHHHHHHHHHHHHHHGGGGGGGG
Os lab final
Lecture_3-Process Management.pdf
Processes this has stuff about processes and deifntions.ppt
operating system module 2 presentation notes
Lecture5
Xv6 A Simple Unixlike Teaching Operating System Russ Cox Frans Kaashoek
Ad

Recently uploaded (20)

PPTX
TLE Review Electricity (Electricity).pptx
PDF
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
PDF
Approach and Philosophy of On baking technology
PDF
Unlocking AI with Model Context Protocol (MCP)
PDF
Encapsulation theory and applications.pdf
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PPTX
A Presentation on Artificial Intelligence
PDF
Spectral efficient network and resource selection model in 5G networks
PDF
MIND Revenue Release Quarter 2 2025 Press Release
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PDF
Univ-Connecticut-ChatGPT-Presentaion.pdf
PDF
A comparative analysis of optical character recognition models for extracting...
PDF
gpt5_lecture_notes_comprehensive_20250812015547.pdf
PPTX
1. Introduction to Computer Programming.pptx
PPTX
Spectroscopy.pptx food analysis technology
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PPTX
Tartificialntelligence_presentation.pptx
TLE Review Electricity (Electricity).pptx
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
Approach and Philosophy of On baking technology
Unlocking AI with Model Context Protocol (MCP)
Encapsulation theory and applications.pdf
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
A Presentation on Artificial Intelligence
Spectral efficient network and resource selection model in 5G networks
MIND Revenue Release Quarter 2 2025 Press Release
Advanced methodologies resolving dimensionality complications for autism neur...
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
Univ-Connecticut-ChatGPT-Presentaion.pdf
A comparative analysis of optical character recognition models for extracting...
gpt5_lecture_notes_comprehensive_20250812015547.pdf
1. Introduction to Computer Programming.pptx
Spectroscopy.pptx food analysis technology
Building Integrated photovoltaic BIPV_UPV.pdf
Mobile App Security Testing_ A Comprehensive Guide.pdf
Digital-Transformation-Roadmap-for-Companies.pptx
Tartificialntelligence_presentation.pptx

Os lecture 7

  • 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