Operating System Concepts
Operating System Concepts
Operating System Concepts
1
2.1 Type of Services
An operating system provides an
environment for the execution of programs.
1. Program Execution
2. Input/Output Operation
3. File System Manipulation
4. Error Detection
5. Resource Allocation
6. Accounting
2 7. Protection
1. Program Execution:
* User will want to execute programs.
*The system must be able to load a program
into memory and run it.
*The program must be able to end its
execution, either normally or abnormally.
2. Input/Output Operation:
A running program may require input and
output.
This I/O may involve a file or an I/O device. For
specific devices, special function may be
desired.
3
3. File System Manipulation:
The file system is of particular interest.
It should obvious that we will want to read
and write files.
4. Error Detection:
The O.S. constantly needs to be aware of
possible errors.
Errors may occur in the CPU and memory H/W,
I/O devices, or in user program.
For each type of error, the O.S. should take the
appropriate action to assure correct and
consistent computer.
4
5. Resource Allocation:
When there are multiple users of multiple jobs
running at the same time, resources must be
allocated to each of them.
6. Accounting:
We want to keep track of which users use how much
and what kinds of computer resources.
This record-keeping statistics are required to
improve computing services.
7. Protection:
The owners of information stored in multi-user
computer system may want to control it’s used to
be
5 reconciled fairly and scheduled reasonably.
2.2 The User View
O.S. Services are provided in many different ways.
Two basic methods of providing services are
system calls and system programs.
2.2.1 System calls
The more fundamental level of services is handled
through the use of system calls,
which provides the interface between a running
program and the O.S.
These calls are generally available as assembly
language instruction, and are usually listed in
manuals used by assembly language
programmers.
System calls can be grouped into three major
categories:
6
1. Process and job control ; end, abort, load,
execute, create process, submit job,
get process attributes, set process attributes,
terminate process, etc…
7
2.2.2 System Programs
Another aspect of modern system is its collection of
systems programs.
System program can be divided into:
1. File manipulation: These programs are; create,
delete, copy, rename, print, dump, list, and
generally manipulate files and directories.
2. Status information: some programs simply ask
the O.S. for the data, time, amount of available
memory or disk space, number of users, etc..
3. File modification: several text editors may be
available to create and modify the content of files
stored on disk or tape.
8
4. Programming language Support: compilers, assemblers
and interprets for common programming languages (such
as FORTRAN, COBOL, PASCAL, BASIC, C, C++, etc.) are
often provided with the operating system.
5. Program Loading and Execution: once a program is
assembled or compiled, it must be loaded into memory to
be executed.
The system may provide absolute loaders, reload able
loaders, linkage editions. Debugging systems are needed
for both high level and a machine language.
6. Application Programs: most O.S.’s come with programs
which are useful to solve some problems.
7.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
9
to another
2.3 The Operating System View
The view of an O.S. seen by the user is defined
mainly by the systems programs,
particularly the command interpreter.
10
There are several different type of interrupt
may occur:
* A system call.
* An I/O device interrupts.
• A program error.