Professional Documents
Culture Documents
Introduction To Operating System (Part2) : by Asst. Prof. Dr. Noor Ghazi
Introduction To Operating System (Part2) : by Asst. Prof. Dr. Noor Ghazi
By
Asst. Prof. Dr. Noor Ghazi
Lecture 2
1
Operating System Services
- Operating systems provide an environment for execution of programs and services to programs and users.
The set of operating-system services provides functions that are helpful to the user are the following and as in figure
(1):
User interface.
Program execution.
I/O operations.
File-system manipulation.
Communications.
Error detection.
Resource allocation.
Logging (accounting).
Protection and security.
• 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 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.
◦ Resource allocation - When multiple users or multiple processes running concurrently, resources must
be allocated to each of them.
◦ Many types of resources - CPU, main memory, file storage, I/O devices.
◦ Logging (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 external I/O devices from invalid access
attempts. 4
User Interfaces
• Command Line Interface.
• Graphical User Interface.
• Touchscreen Interfaces.
Touchscreen Interfaces
• Touchscreen devices require new interfaces. An example in figure (4)
• Actions and selection based on gestures.
• Virtual keyboard for text entry.
• Sometime the user can use voice commands.
Figure (4) Touchscreen 6
System Calls
• System call is a 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)
7
Example of system calls
An example for system call sequence to copy the contents of one file to another file using a
program is illustrated in figure (5).
Another approach is by a command which copies the input file in.txt to the output file out.txt.
Ex: cp in.txt out.txt
9
Examples to OS
Examples of Operating System are:
- Windows (GUI based, PC, Server).
- GNU/Linux (Personal, Workstations, ISP, File and print server, client/Server).
- macOS (Macintosh), used for Apple’s personal computers and workstations (MacBook, iMac).
- Android (Google’s Operating System for smartphones/tablets/smartwatches).
- iOS (Apple’s OS for iPhone, iPad, and iPod Touch).
10