0% found this document useful (0 votes)
52 views25 pages

OS Chap 2

The document discusses operating system services, system calls, and operating system structure. It provides an overview of the services operating systems provide users and processes, including user interfaces, program execution, I/O operations, file manipulation, communications, and error detection. It also describes system calls as the interface for processes and users to manipulate system resources, and common types of system calls. Finally, it discusses different ways operating systems can be structured, including simple, layered, microkernel, modular, and hybrid structures.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
52 views25 pages

OS Chap 2

The document discusses operating system services, system calls, and operating system structure. It provides an overview of the services operating systems provide users and processes, including user interfaces, program execution, I/O operations, file manipulation, communications, and error detection. It also describes system calls as the interface for processes and users to manipulate system resources, and common types of system calls. Finally, it discusses different ways operating systems can be structured, including simple, layered, microkernel, modular, and hybrid structures.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 25

Robleh Wacayz

Department of Computer

OPERATING SYSTEM Science and Information


Technology
EELO University
CHAPTER 2:OPERATING
SYSTEM STRUCTURE
Operating System Services
User Operating System Interface
System Calls
Types of System Calls
System Programs
Operating System Design and Implementation
Operating System Structure
OBJECTIVE
To describe the services an operating system provides to users,
processes, and other systems.
To discuss the various ways of structuring an operating system.
To explain how operating systems are installed and customized
and how they boot.
A VIEW OF OPERATING SYSTEM
SERVICES & SYSTEM CALLS
OPERATING SYSTEM
SERVICES
Operating systems provide an environment for execution of
programs and services to programs and users.
operating-system services provides functions that are helpful to
the user:
 User interface - Almost all operating systems have a user interface (UI).
 Varies between Command-Line (CLI), Graphics User Interface (GUI), Batch and touchscreen.
 Program execution - The system must be able to load a program into
memory and to run that program, end execution, either normally or
abnormally (indicating error).
OPERATING SYSTEM
SERVICES
I/O operations - A running program may require I/O operations,
which may involve a file or an I/O device.
File-system manipulation - Programs need to read and write
files and directories, create and delete them, search them, list file
Information, permission management.
Communications – One processes may exchange information
with another, on the same computer or between computers over a
network with another process.
Error detection – OS needs to be constantly aware of possible
errors.
OPERATING SYSTEM
SERVICES
Another set of OS functions exists for ensuring the efficient operation of
the system itself:
 Resource allocation - When multiple users or multiple jobs running concurrently,
resources must be allocated to each of them.
 Accounting - To keep track of which users use how much and what kinds of
computer resources.
Protection and security - The owners of information stored in a
multiuser or networked computer system may want to control use of that
information, concurrent processes should not interfere with each other.
 Protection involves ensuring that all access to system resources is controlled.
 Security of the system from outsiders requires user authentication, extends to defending I/O devices
from invalid access attempts.
USER OPERATING SYSTEM
INTERFACE – CLI
Command Line Interface (CLI) or command interpreter
allows direct command entry.
Sometimes implemented in kernel, sometimes by systems
program.
Sometimes multiple flavors implemented – shells.
Primarily fetches a command from user and executes it.
 Sometimes commands built-in, sometimes just names of programs.
 The command-interpreter program, which can be small, does not have to be changed for
new commands to be added.
USER OPERATING SYSTEM
INTERFACE – GUI
User-friendly desktop image interface
 Usually mouse, keyboard, and monitor.
 Icons represent files, programs, actions, etc.
 Various mouse buttons over objects in the interface cause various actions (provide
information, options, execute function, open directory (known as a folder)).
Many systems now include both CLI and GUI interfaces.
 Microsoft Windows is GUI with CLI “command” shell.
 http://ss64.com/nt/ - (An A-Z Index of the Windows CMD command line)
 Apple Mac OS X as “Aqua” GUI interface with UNIX kernel underneath and
shells available.
TOUCHSCREEN INTERFACES

Touchscreen devices
require new interfaces
 Mouse not possible or not
desired
 Actions and selection based
on gestures
 Virtual keyboard for text entry
SOME EXAMPLES

Bourne Shell Command Interpreter The Mac OS X GUI


SYSTEM CALLS
•The System Call is the Request for Running any Program and for Performing
any Operation on the System.
•When a user First Time Starts the System then the System is in the user
Mode and When he request For a Service then the User Mode will be
Converted into the Kernel Mode Which just Listen the Request of the user
and Process the Request and Display the Results those are Produced after the
Processing.
•When a user Request for Opening any Folder or When a Moves his Mouse on
the Screen, then this is called as the System call which he is using for
performing any Operation.
SYSTEM CALLS
SYSTEM CALLS
•It provides an interface to the
services made available by an OS.
•System calls allows processes and
users to manipulate system
resources.
•Typically written in a high-level
language (C or C++).
•For example a system call
sequence to copy the contents of
one file to another file.
SYSTEM CALLS
Systems execute thousands of system calls per second.
Application developers designs programs according to API.
Three most common APIs are Win32 API for Windows, POSIX
API for POSIX-based systems (including virtually all versions of
UNIX, Linux, and Mac OS X), and Java API for the Java virtual
machine (JVM).
TYPES OF SYSTEM CALLS
Process control
 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
TYPES OF SYSTEM CALLS
File management Device management
 create file, delete file  request device, release device
 open, close file  read, write, reposition
 read, write, reposition  get device attributes, set device attributes
 get and set file attributes  logically attach or detach devices

Information maintenance Communications


 get time or date, set time or date  create, delete communication connection
 get system data, set system data  send, receive messages
 get and set process, file, or device attributes  transfer status information
 attach and detach remote devices
TYPES OF SYSTEM CALLS

Windows and Unix System Calls


SYSTEM PROGRAMS
System programs provide a convenient environment for program
development and execution, System programs, also known as system
utilities
. They can be divided into:
 File manipulation
 Status information
 File modification
 Programming language support
 Program loading and execution
 Communications
SYSTEM PROGRAMS
File management - Create, delete, copy, rename, print, dump, list, and generally
manipulate files and directories.
File modification
 Text editors to create and modify files.
 Special commands to search contents of files or perform transformations of the text.

Status information
 Some ask the system for info - date, time, amount of available memory, disk space, number
of users.
 Others provide detailed performance, logging, and debugging information.
SYSTEM PROGRAMS
Programming-language support - Compilers, assemblers, debuggers and
interpreters for common programming languages are often provided with the
OS or available as a separate download.
Program loading and execution- loaders, linkers, debugging systems for
higher-level and machine language.
Communications - Provide the mechanism for creating virtual connections
among processes, users, and computer systems
 Allow users to send messages to one another’s screens, browse web pages, send electronic-
mail messages, log in remotely, transfer files from one machine to another
OPERATING SYSTEM DESIGN AND IMPLEMENTATION

Start the design by defining goals and specifications


Affected by choice of hardware, type of system
User goals and System goals
 User goals – operating system should be convenient to use, easy to learn, reliable, safe,
and fast
 System goals – operating system should be easy to design, implement, and maintain, as
well as flexible, reliable, error-free, and efficient
Important principle to separate
Policy: What will be done?
Mechanism: How to do it?
Specifying and designing an OS is highly creative task of software
engineering
OPERATING SYSTEM STRUCTURE
General-purpose OS is very large program
Various ways to structure ones
 Simple structure
 More complex
 Layered
 Microkernel
 Modular
 Hybrid
CONCLUSION
Operating systems provide an environment for
execution of programs and services to programs and
users..

Assignment: 02
Discuss about the different OS structures and locate the figure structure of your OS.
THANK YOU
Coming up next: Chapter 3
 Processes and Threads

You might also like