Operating Systems
B Y: -
DR. ESRAA ABDALLA ABDELHAMID
LECTURER
Lecture 2 OS Services and Types
❑ Operating System Services
❑ User Operating System Interface
❑ System Calls
❑ System Program
❑Types of Operating Systems
Operating System Services
Operating systems provide an environment for execution
•
of programs and services to programs and users
•One set of operating-system services provides functions
that are helpful to the user:-
•User interface - Almost all operating systems have a user
interface (UI).
Operating System Services (Cont.)
• Varies between Command-Line (CLI), Graphics User
Interface (GUI), Batch
•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)
•I/O operations - A running program may require I/O,
which may involve a file or an I/O device
Operating System Services (Cont.)
One set of operating-system services provides functions that are
helpful to the user :
• File-system manipulation - The file system is of particular interest.
Programs need to read and write files and directories, create and
delete them, search them, list file Information, permission
management.
•Communications – Processes may exchange information, on the
same computer or between computers over a network
Communications may be via shared memory or through message
passing
Operating System Services (Cont.)
• Error detection – OS needs to be constantly aware of possible
errors
May occur in the CPU and memory hardware, in I/O devices, in user
program
For each type of error, OS should take the appropriate action to
ensure correct and consistent computing
Debugging facilities can greatly enhance the user’s and
programmer’s abilities to efficiently use the system
Operating System Services (Cont.)
Another set of OS functions exists for ensuring the efficient
operation of the system itself via resource sharing
• Resource allocation - When multiple users or multiple jobs
running concurrently, resources must be allocated to each of them
Many types of resources - CPU cycles, main memory, file storage,
I/O devices.
• Accounting - To keep track of which users use how much and what
kinds of computer resources
Operating System Services (Cont.)
• 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 external I/O devices from invalid access
attempts
Operating System Services (Cont.)
User Operating System Interface - CLI
• CLI or command interpreter allows direct command entry
• Primarily fetches a command from user and executes it
• Sometimes commands built-in
• Sometimes just names of programs
DOS
System Call
• Programming interface to the services provided by the OS
• Typically written in a high-level language (C or C++)
• Mostly accessed by programs via a high-level Application
Programming Interface (API) rather than direct system call use
• 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)
Example of System Calls
System call sequence to copy the contents of one file to another file
System Program
System programs provide a convenient environment for
program development and execution. They can be divided
into:
◦ File manipulation
◦ Status information sometimes stored in a File modification
◦ Programming language support
◦ Program loading and execution
◦ Communications
◦ Background services
◦ Application programs
Types of Operating Systems
• Single User
•Multiuser
•Multitasking
•Interactive
•Real time
•Batch Processing
Single User
• Standard OS for standalone computer
•Only one person can use the computer system at any one time
•Can support multiple accounts but only one used at a time
•Processing power of the CPU is dedicated to the user
•Multi-tasking can be performed
Multiuser
•More than one user accessing the system at the same time
•Most commonly network operating system
•Server computer connected to a number of terminals
Client server LAN, ATM, Ticket booking
•OS allocates a time slice to each user
•Switch from user to user
•The larger the number of users the slower the system works
•Can run several programs simultaneously
Multitasking
•CPU carries out more than one task at the same time
• Several programs can be loaded and running at the same time
•Example using a word processor while browsing the Internet
•Processor switches between tasks
•Completes part of one tasks and switches to do part of another
tasks
•This process happens very fast
•Appears the tasks are running concurrently
•True multitasking requires more than one processor
• Many current CPUs have multiple processing cores
Interactive
•Direct user interaction while a program is running
• Accepts and responds to input from user
•Computer give the user an immediate response
• "Question and Answer" between user and computer
•Examples:-
-Booking concert tickets - ordering books online- Handling bank
accounts
-Booking a holiday (Filling in a web form- submit it - site informs you
of the room you have booked)
Real Time
•Must respond to events with no delay
•Response immediately to the data entered
•Used where response time by the system is critical
•Where delays in processing would prove unacceptable
•Used for control systems
•Examples:- Cars, Heart Rate Monitoring, Aircraft Control, Computer
Games, Controlling Robots
Batch Processing
•Data can be collected over a period of time
•When all data collected it is processed at the same time as a batch
•Data is processed at an off peak period where is a less demand over
processor
•Suitable for situations where there is a lot of similar data to be
processed and the processing can wait
• Gas bill printing, Payroll processing
•Not suitable where the data must be processed instantly
Distributed systems
•Complex tasks split into a number of smaller, similar tasks
•A series of computers connected together via a network
•Computers can be in different physical locations
•Each computer performs part of the processing
•Results from individual machines are combined to achieve the
overall task
•Examples film animation
•Modeling real world scenarios - scientific, environmental, financial
•Analysis of large data sets
Summary
❑ Operating System Services
❑ User Operating System Interface
❑ System Calls
❑ System Program
❑Types of Operating Systems
Questions ?
1. Silberschatz, A., Peterson, J. L., & Galvin, P. B. (1991).
Operating system concepts. Addison-Wesley Longman
Publishing Co., Inc..
2. Silberschatz, A., Galvin, P. B., & Gagne, G. (2013).
Operating system concepts essentials. Wiley Publishing.
References 3. Stallings, W. (2011). Operating systems: internals and
design principles. Prentice Hall Press.