CH 1
CH 1
Chapter 1
Introduction
By Amsalu F.
1
What is an operating system?
A program that acts as an intermediary between a user of a computer and the computer
hardware.
Operating system goals:
Execute user programs and make solving user problems easier.
Make the computer system convenient to use.
Use the computer hardware in an efficient manner.
Resource allocator – manages and allocates resources.
Control program – controls the execution of user programs and operations of I/O devices .
2
Operating Systems(cont..)
Some examples of operating systems are:
UNIX
MS-DOS
MS Windows
Mac OS.
Windows XP,7,8,8.1,10
Almost every computer system has an operating system and it is an
important part of the system.
3
Computer System Components
1.Hardware – provides basic computing resources (CPU, memory, I/O devices).
2.Operating system – controls and coordinates the use of the hardware among the various
application programs for the various users.
3.Applications programs – define the ways in which the system resources are used to
solve the computing problems of the users (compilers, database systems, video games,
business programs).
4
Abstract View of System Components
5
Functions of an operating System.
o To hide details of hardware by creating abstraction.
Processor Management
Memory Management
Device Management
File Management
Security
Control over system performance
Job accounting
Error detecting aids
Coordination between other software and users 6
Process Management
o A process is a program in execution. A process needs certain resources,
including CPU time, memory, files, and I/O devices, to accomplish its
task.
o The operating system is responsible for the following activities in
connection with process management.
o Process creation and deletion.
o process suspension and resumption.
o Provision of mechanisms for:
o process synchronization
o process communication
7
Main-Memory Management
o Memory is a large array of words or bytes, each with its own address.
o It is a repository of quickly accessible data shared by the CPU and I/O
devices.
o Main memory is a volatile storage device. It loses its contents in the
case of system failure.
o The operating system is responsible for the following activities in
connections with memory management:
o Keep track of which parts of memory are currently being used and by whom.
o Decide which processes to load when memory space becomes available.
o Allocate and de-allocate memory space as needed.
8
Secondary-Storage Management
o Since main memory (primary storage) is volatile and too small to
accommodate all data and programs permanently, the computer system
must provide secondary storage to back up main memory.
o The operating system is responsible for the following activities in
connection with disk management:
o Free space management
o Storage allocation
o Disk scheduling
9
Device Management
• An Operating System manages device communication via their
respective drivers. It does the following activities for device
management:
Keeps tracks of all devices. The program responsible for this task is
known as the I/O controller.
Decides which process gets the device when and for how much time.
Allocates the device in the most efficient way.
De-allocates devices.
10
File Management
o A file is a collection of related information defined by its creator.
Commonly, files represent programs (both source and object forms) and
data.
o The operating system is responsible for the following activities in
connections with file management:
o File creation and deletion.
o Directory creation and deletion.
o Support of primitives for manipulating files and directories.
o Mapping files onto secondary storage.
o File backup on stable (nonvolatile) storage media.
11
Other Important Activities
• Following are some of the important activities that an Operating System performs:
Security -- By means of password and similar other techniques, it prevents unauthorized
access to programs and data.
Control over system performance -- Recording delays between request for a service
and response from the system.
Job accounting -- Keeping track of time and resources used by various jobs and users.
Error detecting aids -- Production of traces, error messages, and other debugging and
error detecting aids.
Coordination between other software and users -- Coordination and assignment of
compilers, interpreters, assemblers and other software to the various users of the
computer systems.
12
Operating System Services
13
Operating System Services
• Program execution – system capability to load a program into memory and to
run it.
• I/O operations – since user programs cannot execute I/O operations directly,
the operating system must provide some means to perform I/O.
• File-system manipulation – program capability to read, write, create, and delete
files.
• Communications – exchange of information between processes executing either
on the same computer or on different systems tied together by a network.
Implemented via shared memory or message passing.
• Error detection – ensure correct computing by detecting errors in the CPU and
memory hardware, in I/O devices, or in user programs.
14
Additional Operating System
Functions
Additional functions exist not for helping the user, but rather for ensuring efficient system
operations.
• Resource allocation – allocating resources to multiple users or multiple jobs running
at the same time.
• Accounting – keep track of and record which users use how much and what kinds of
computer resources for account billing or for accumulating usage statistics.
• Protection – ensuring that all access to system resources is controlled.
23