Operating
system
Chapter One
Introduction to Operating System
10/27/2024 Ambo University Woliso Campus InSy3051 1
Chapter’s Contents
What is operating system?
History of operating system
Computer system organization
Operating system operation
Operating system services
Type of an operating system
10/27/2024 Ambo University Woliso Campus InSy3051 2
What is operating
system
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.
Operating System Functions:
Resource allocator - manages and allocates resources.
Control program - controls the execution of user programs and operation of
I/O devices.
Kernel - the one program running at all times (all else being application
programs).
10/27/2024 Ambo University Woliso Campus InSy3051 3
History of operating system
In the 1950s some technologies emerged that allowed a “simpler” interaction between the
user and the computer.
Resident monitor: - this is a system that loads the program into the computer, reading it
from a tape or punched cards.
This technology gave rise to the first operating system in history, created in 1956 for an
IBM 704 computer, which was responsible for loading programs successively (starting with
the next one when the previous one had finished loading), reducing the work time required.
Temporary storage: this is a system that also tried to increase speed by simultaneously
loading programs and executing tasks. In the 1960s, the rise of the integrated circuit
launched the power of computers, and operating systems responded by becoming
increasingly complex and offering new techniques.
Multiprogramming: - In this technique, the main memory already holds more than one
program, and the operating system is responsible for allocating the machine’s resources to
execute tasks based on existing needs.
10/27/2024 Ambo University Woliso Campus InSy3051 4
Timeshare: - This is a system that assigns the execution of applications within a group of
users working online.
Real time: - it is used specially in the area of telecommunications, it is responsible for
processing events external to the computer, so that, once a certain time has passed without
success, it considers them as failed.
Multiprocessor: - these are systems that try to manage the readings and writings made in
memory by two programs that are running simultaneously, in order to avoid errors. As
their name suggests, they are designed for use in computers that use more than one
processor.
In the 1970s, IT continued to become increasingly complex, resulting in the first versions
of some of the operating systems that have served as the basis for many of the ones we
use today, such as UNIX.
The operating systems of this decade are still available only to highly qualified users, and
their complexity means that they consume a large amount of resources. Among the most
outstanding, in addition to UNIX, we find MULTICS, BDOS and CP/M, widely used in
computers with Intel microprocessor.
10/27/2024 Ambo University Woliso Campus InSy3051 5
The 1980s gave rise to the boom in commercial computing. The arrival of computers in
thousands of offices and homes changes the focus of operating systems, forcing the
development of more user-friendly systems that introduced graphic elements such as
menus.
In this decade the development is such that it gives rise to some operating systems already
legendary, and that contribute to the rise of computing in later decades, such as C++,
SunOS (developed by Sun Microsystems and derived from UNIX), AmigaOS (developed
for the Commodore Amiga) and some classics such as these:-
MS-DOS: - developed by Microsoft for IBM PCs, which contributed enormously to
the popularization of computing and gave rise to Windows systems.
Mac OS: - a system of Macintosh computers developed by Apple Inc, launched in
1984, and which included a novel graphic interface and the use of the mouse (a rarity
at that time for users that were used to typing commands).
The decade of the 90’s continues with the explosive line marked in the 80’s, giving rise to
many of the operating systems that, in more modern versions, we use today:
10/27/2024 Ambo University Woliso Campus InSy3051 6
GNU/Linux: it was developed based on UNIX, and which is one of the greatest
exponents of free software. Today, GNU/Linux is widely used all over the world, having a
pre-eminence close to 100% in fields as striking as supercomputers.
Solaris: - also developed on UNIX basis by Sun Microsystems for servers and
workstations.
Microsoft Windows: - which has resulted in a popular family of commercially successful
operating systems used by millions of users around the world.
In the first decade of the present century, new operating systems continue to succeed each
other, perhaps with less impact than those that emerged in the previous decade, but have
their own place. Highlights include SymbOS, MorphOS, Darwin, Mac OS, Haiku and
OpenSolaris.
So now we see the current decade, in which the rise of phones gives rise to some popular
operating systems, including Android, developed by Google or iOS, created by Apple.
10/27/2024 Ambo University Woliso Campus InSy3051 7
Computer system organization
Computer system can be divided into four components
–Hardware – provides basic computing resources
•CPU, memory, I/O devices
–Operating system
•Controls and coordinates use of hardware among various applications and
users
–Application programs – define the ways in which the system resources are used
to solve the computing problems of the users
•Word processors, compilers, web browsers, database systems, video games
–Users
•People, machines, other computers
10/27/2024 Ambo University Woliso Campus InSy3051 8
Computer system operation
Computer-system operation
•One or more CPUs, device controllers connect through common bus providing
access to shared memory
Concurrent execution of CPUs and devices competing for memory cycles
10/27/2024 Ambo University Woliso Campus InSy3051 9
Computer system operation(con’t…)
o I/O devices and the CPU can execute concurrently.
oEach device controller is in charge of a particular device type.
oEach device controller has a local buffer.
oCPU moves data from/to main memory to/from local buffers
oI/O is from the device to local buffer of controller.
Device controller informs CPU that it has finished its operation by causing an
interrupt.
• Interrupt transfers control to the interrupt service routine generally, through
the interrupt vector, which contains the addresses of all the service routines.
• Interrupt architecture must save the address of the interrupted instruction.
• Incoming interrupts are disabled while another interrupt is being processed to
prevent a lost interrupt.
• A trap is a software-generated interrupt caused either by an error or a user
request.
• An operating system is Ambo
10/27/2024
interrupt driven.
University Woliso Campus InSy3051 10
Storage structure
oMain memory – only large storage media that the CPU can access directly.
oSecondary storage – extension of main memory that provides large
nonvolatile storage capacity.
oMagnetic disks – rigid metal or glass platters covered with magnetic
recording material
Disk surface is logically divided into tracks, which are subdivided into
sectors.
The disk controller determines the logical interaction between the
device and the computer.
oCaching – copying information into faster storage system; main memory can
be viewed as a last cache for secondary storage.
oStorage systems organized in hierarchy.
Speed
Cost
Volatility
10/27/2024 Ambo University Woliso Campus InSy3051 11
Storage-Device Hierarchy
Less
High Cost
Cost and slow
and fast
10/27/2024 Ambo University Woliso Campus InSy3051 12
Migration of A From Disk to Register
oData transfer between cache to CPU is hardware function without OS
intervention.
oTransfer from disk to memory is usually controlled by OS.
10/27/2024 Ambo University Woliso Campus InSy3051 13
I/O structure
• After I/O starts, control returns to user program only upon I/O
completion.
– Wait instruction idles the CPU until the next interrupt
– Wait loop (contention for memory access).
– At most one I/O request is outstanding at a time, no simultaneous
I/O processing.
• After I/O starts, control returns to user program without waiting for
I/O completion.
– System call – request to the operating system to allow user to wait
for I/O completion.
– Device-status table contains entry for each I/O device indicating its
type, address, and state.
– Operating system indexes into I/O device table to determine device
status and to modify table entry to include interrupt.
10/27/2024 Ambo University Woliso Campus InSy3051 14
Direct Memory Access Structure
o Used for high-speed I/O devices able to transmit information at close
to memory speeds.
o Device controller transfers blocks of data from buffer storage directly
to main memory without CPU intervention.
o Only one interrupt is generated per block, rather than the one
interrupt per byte.
10/27/2024 Ambo University Woliso Campus InSy3051 15
Operating system services
One set of operating system service provides functions that are helpful
to user.
• Program execution - ability 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 - 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.
10/27/2024 Ambo University Woliso Campus InSy3051 16
Operating system common component
oUser interface
oProcess Management
oMain Memory Management
oSecondary-Storage Management
oI/O System Management
oFile Management
oProtection System
Networking
10/27/2024 Ambo University Woliso Campus InSy3051 17
Process Management
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.
• The operating system is responsible for the following activities in
connection with process management.
Process creation and deletion.
process suspension and resumption.
Provision of mechanisms for:
process synchronization
process communication
10/27/2024 Ambo University Woliso Campus InSy3051 18
Main-Memory Management
oMemory is a large array of words or bytes, each with its own address.
It is a repository of quickly accessible data shared by the CPU and I/O
devices.
oThe operating system is responsible for the following activities in
connection with memory management:
Keep track of which parts of memory are currently being used and by whom.
Decide which processes to load when memory space becomes available.
Allocate and deallocate memory space as needed. e.g. the C function 'malloc'
(or 'New' in Pascal) allocates a specified amount of memory; this happens via an
OS call. The functions 'free'(C) and 'Dispose'(Pascal) deallocate this memory.
10/27/2024 Ambo University Woliso Campus InSy3051 19
Secondary-Storage Management
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.
Most modern computer systems use disks as the principle on-line
storage medium, for both programs and data.
The operating system is responsible for the following activities in
connection with disk management:
Free space management
Storage allocation
Disk scheduling
10/27/2024 Ambo University Woliso Campus InSy3051 20
I/O System Management
The I/O system consists of:
o A buffer-caching system
o A general device-driver interface
o Drivers for specific hardware devices
10/27/2024 Ambo University Woliso Campus InSy3051 21
File Management
A file is a collection of related information defined by its creator.
Commonly, files represent programs (both source and object forms) and
data.
The operating system is responsible for the following activities in
connections with file management:
File creation and deletion.
Directory creation and deletion.
Support of primitives for manipulating files and directories.
Mapping files onto secondary storage.
File backup on stable (nonvolatile) storage media.
10/27/2024 Ambo University Woliso Campus InSy3051 22
Protection System
Protection refers to a mechanism for controlling access by programs,
processes, or users to both system and user resources.
The protection mechanism must:
distinguish between authorized and unauthorized usage.
specify the controls to be imposed.
provide a means of enforcement.
10/27/2024 Ambo University Woliso Campus InSy3051 23
Any Queries
10/27/2024 Ambo University Woliso Campus InSy3051 24