You are on page 1of 35

1.1 What is an Operating System and its objectives?

• A program that acts as an intermediary between a


user of a computer and the computer hardware.
• It is a set of programs that run on computer system
that allow it to work properly.
• System program that controls execution of application
programs.
• It provides the facilities to create, modification of
program and data files.
• It is used as a host for application software to be
installed.

04/12/2024 INTRODUCTION TO OPERATING SYSTEM 1


Objectives

• Convenience:
• Efficiency: Allows the Computer system resources to be
used in an efficient manner.
Providing an orderly and controlled allocation of
resources.
Improving resource utilization.
• Ability to Evolve:
 Adaptability to new changes.
 Hardware upgrades/New types of
hardware.
 Need of new services.
 Easy fixes of latent errors.
04/12/2024 INTRODUCTION TO OPERATING SYSTEM 2
Components of Computer System

Figure 1.1 Abstract view of the components of a computer system

04/12/2024 INTRODUCTION TO OPERATING SYSTEM 3


Continued …
• OS can also be defined based on user and system
view
2. Users view
• One system is designed for a single user but others
may participate multiple users connected via
networks.
• Users share resources and may exchange information.
• Devices may be standalone connected only with a
single user.
• Devices
04/12/2024 are designed to run
INTRODUCTION TO OPERATING SYSTEM with/without user
4
Continued …
2. System View
• It is the program that is most close with the hardware.
• It is a resource allocator and manager(HW and SW like
CPU time and memory management).
• It manages the execution of user programs to prevent
errors and improper use of the computer.

04/12/2024 INTRODUCTION TO OPERATING SYSTEM 5


1.2 Functions of Operating System
• Process Management:
√Creating and destroying the user and system
processes.
√Allocating hardware resources among the processes.
√Providing mechanisms for process communications.
√Provides mechanisms for deadlock handling.
• Memory Management:
√ Assign memory location
√ Allocate or deallocation technique policy for memory.

• File Management
• I/O System Management: buffering, caching and spooling and device driver
management.

04/12/2024 INTRODUCTION TO OPERATING SYSTEM 6


1.3 Types of Operating System
1. MAINFRAME SYSTEMS: the first computers used to tackle many
commercial and scientific applications. Not user friendly.
2. Batch Systems:
• Operators batched the job into one for speed up.
• Users don’t directly interact with the operating system/computers
• Users prepared control cards and submit for the operators
3. Multiprogrammed Systems
• Several jobs are kept in main memory at the same time, and the
CPU is multiplexed among them.

04/12/2024 INTRODUCTION TO OPERATING SYSTEM 7


Multiprogramed System

04/12/2024 INTRODUCTION TO OPERATING SYSTEM 8


Continued …
4. Time-sharing Systems
• The CPU is multiplexed among several jobs that are kept
in memory and on disk (the CPU is allocated to a job only if the job is in
memory).
• A job swapped in and out of memory to the disk.
• On-line communication between the user and the system is provided;
when the operating system finishes the execution of one command, it seeks
the next “control statement” from the user’s keyboard.
• On-line system must be available for users to access data
• It is interactive and CPU needs scheduling

User 7 User 3

User 1
User 5
CPU
User 2
User 6

04/12/2024 INTRODUCTION TO OPERATING SYSTEM User 4 9


Continued …
5. Desktop Systems
• Personal computers – computer system dedicated to a
single user.
• I/O devices – keyboards, mice, display screens, small
printers.
• User convenience and responsiveness.
• Can adopt technology developed for larger operating
system’ often individuals have sole use of computer and
do not need advanced CPU utilization of protection
features.
• May run several different types of operating systems
(Windows, MacOS, UNIX, Linux)
04/12/2024 INTRODUCTION TO OPERATING SYSTEM 10
Continued …
6. Distributed Systems
• Distribute the computation among several physical
processors.
• Connected via networks.
• Loosely coupled system – each processor has its own local
memory; processors communicate with one another
through various communications lines, such as highspeed
buses or telephone lines.
• Advantages of distributed systems.
✦ Resources Sharing
✦ Computation speed up – load sharing
✦ Reliability
✦ Communications
04/12/2024 INTRODUCTION TO OPERATING SYSTEM 11
Continued …
7. Client-Server Systems

Servers can be classified as :


• Compute-server systems
• File-server systems

04/12/2024 INTRODUCTION TO OPERATING SYSTEM 12


Continued …
8. Network operating system(NOS)
• Provides features such as file sharing across the network
• Allows different processes on different computers to exchange messages.
• Acts autonomously from all other computers on the network
• It is aware of the network and is able to communicate
with other networked computers.
• The software behind a NOS allows multiple devices within a network to
communicate and share resources with each other.

04/12/2024 INTRODUCTION TO OPERATING SYSTEM 13


Continued …
9. Multiprocessor Systems
• Most systems today are single-processor systems which have a
single CPU. Known as parallel system.
• With more than one CPU in close communication.
• Tightly coupled system – processors share memory, bus and a clock;
communication usually takes place through the shared memory.
Advantages of parallel system:
✦ Increased throughput
✦ Economical
✦ Increased reliability
• Graceful degradation
• Fault tolerant

04/12/2024 INTRODUCTION TO OPERATING SYSTEM 14


Multiprocessor System(Cont.’)
It has two forms:
1. Symmetric multiprocessing (SMP)
✦ Each processor runs and identical copy of the operating
system.
✦ Many processes can run at once without performance
deterioration.
✦ Most modern operating systems support SMP
2. Asymmetric multiprocessing
✦ Each processor is assigned a specific task; master processor
schedules and allocated work to slave processors.
✦ More common in extremely large systems

04/12/2024 INTRODUCTION TO OPERATING SYSTEM 15


Continued ….
10. Real-time Systems
• It is a special-purpose operating system designed
for specific tasks.
• used when rigid time requirements have been
placed on the operation of a processor or the flow
of data;
• Used as a control device in a dedicated application
e.g. scientific experiments, medical imaging systems, industrial control
systems, and certain display systems, automobile-engine, fuel-injection
systems, home-appliance controllers, and weapon systems.

04/12/2024 INTRODUCTION TO OPERATING SYSTEM 16


Continued ….
11. Handheld Systems
• Personal Digital Assistants (PDAs)
• Cellular telephones, tablets
• Issues/drawbacks:
✦ Limited memory storage
✦ Slow processors capacity
✦ Small display screens.
✦ connectivity wireless vs wired and basic
converge areas while using networks

04/12/2024 INTRODUCTION TO OPERATING SYSTEM 17


Feature Migration
• An examination of operating systems for mainframes and
microcomputers shows that features once available only
on mainframes have been adopted by microcomputers.
The same concepts are appropriate for the various classes
of computers: mainframes, minicomputers,
microcomputers, and handhelds.
It is discussed briefly in the figure of next slide

04/12/2024 INTRODUCTION TO OPERATING SYSTEM 18


Migration of Operating-System Concepts and Features

04/12/2024 INTRODUCTION TO OPERATING SYSTEM 19


1.5 Computer System Structure
• A computer system consists of a CPU and a number of
device controllers that are connected through a common
bus that provides access to shared memory.
• Each device controller is in charge of a specific type of device (for example, disk
drives, audio devices, and video displays.

04/12/2024 INTRODUCTION TO OPERATING SYSTEM 20


Computer System Structure (Cont’d)
• When the system is powered up or booted-it needs to have an initial program
to run. This initial program or bootstrap program is stored in read-only
memory (ROM).
• The bootstrap program loads into the memory of operating
system kernel and start to execute the system. The operating
system then starts executing the first process, such as "init,"
and waits for some event to occur.
• The occurrence of an event is usually signaled by an interrupt
HW interrupt: triggers an interrupt at any time by
sending a signal to the CPU via system bus
SW interrupt: trigger an interrupt by executing a
special operation called a system call (also called a
monitor call).

04/12/2024 INTRODUCTION TO OPERATING SYSTEM 21


Computer System Structure (Cont’d)
controller can
• I/O Structure: The small computer-systems interface (SCSI)
have several devices attached to it. A device controller maintains
some local buffer storage and a set of special-purpose registers. It is
responsible for moving the data between the peripheral devices that
it controls and its local buffer storage.
• I/O Interrupts: , the CPU loads the appropriate registers within the
device controller: The device controller, examines the contents of
these registers to take an action.
• Direct Memory access (DMA) is used for high-speed I/O
devices. The device controller transfers an entire block of data directly to or
from its own buffer storage to memory with no intervention by the CPU.

04/12/2024 INTRODUCTION TO OPERATING SYSTEM 22


Computer System Structure (Cont’d)
Storage Structure
• A disk drive is attached to a computer by a set of wires called an I/O
bus. Several kinds of buses are available, including Enhanced
Integrated Drive Electronics (EIDE), Advanced Technology
Attachment (ATA), and SCSI buses. The data transfers on a bus are
carried out by special electronic processors called controllers.
• The host controller is the controller at the computer end of the bus. A
disk controller is built into each disk drive. To perform a disk, I/O
operation, the computer places a command into the host controller,
typically using memory-mapped I/O ports.

04/12/2024 INTRODUCTION TO OPERATING SYSTEM 23


Computer System Structure (Cont’d)
• Main memory and the registers built into the processor itself are the
only storage that the CPU can access directly. An instructions in
execution, and any data being used by the instructions, must be in
one of these direct-access storage devices. If the data are not in
memory, they must be moved there before the CPU can operate on
them.
• Caching:- is an important principle of computer systems.
Information is normally kept in some storage system (such as main
RAM). As it is used, it is copied into a faster storage system-the
cache-on a temporary basis.

04/12/2024 INTRODUCTION TO OPERATING SYSTEM 24


1.6 Operating System Structure
Operating-system Services:-
• It provides an environment for the execution of programs.
• It provides certain services to programs and to the users of those programs.
• Provide services for the convenience of the programmer, to make the
programming task easier. Even if the services are different from types
of OS ,but generally it provide the following list of functions.
√ Program execution: loads a program into memory and to run that program;
end its execution, either normally or abnormally (indicating error).

04/12/2024 INTRODUCTION TO OPERATING SYSTEM 25


Operating System Structure(Cont’d)
√ I/O Operations: I/O device management, security of I/O devices common
with the latest machines.
√ File-system manipulation: read/write/create/delete files.

√ Communications: process needs to exchange information with


another process. Either it takes place between processes that are
executing on the same computer; or executing on different computer
systems via a computer network.
√ Error detection: it is aware of possible errors and takes any possible
measurement.
How Errors occur in a computer system?

04/12/2024 INTRODUCTION TO OPERATING SYSTEM 26


Operating System Structure (Cont’d)
√Resource allocation: different types of resources are managed by the
operating system. such as CPU cycles, main memory, and file storage may have
special allocation code, There might also be routines to allocate a tape drive
for use by a job. One such routine locates an unused tape drive and marks an
internal table to record the drive's new user. Another routine is used to clear
that table.
Accounting: counting how many users and which types of
resources is accessed; this may be useful for usage statics or for any
other research use.
√ Protection: securing the system either from insider or outsiders
attacks; User authentication system; protect from hackers and
crackers; protection from virus and information theft.

04/12/2024 INTRODUCTION TO OPERATING SYSTEM 27


System Call
• It provides the interface between • end, abort
a process and the operating • load, execute
• create process,
system. These calls are generally terminate process
available as assembly-language • get process attributes,
instructions. set process attributes
• It is grouped into five major • wait for time
categories: process control, file • wait event, signal
management, device management, event
information maintenance, and • allocate and free
communications.
memory

1. Process control

04/12/2024 INTRODUCTION TO OPERATING SYSTEM 28


System Call (Cont’d)
2. File management 4. Information maintenance
• create file, delete file • get time or date, set time or date
• open, close • get system data, set system data
• read, write, reposition • get process, file
• get file attributes, set • set process, file, or device attributes
file attributes 5. Communications
• create, delete communication
3. Device management
connection
• request device, release
• send, receive messages
device
• transfer status information
• read, write, reposition
• attach or detach remote devices
• get device attributes, set
device attributes
• logically attach or detach
device
04/12/2024 INTRODUCTION TO OPERATING SYSTEM 29
System Programs
•It provides a convenient environment for program
development and execution. Some of them are simply user
interfaces to system calls; others are considerably more
complex; They can be divided into the following categories:
• File management: programs create, delete, copy, rename, print, dump, list,
and generally manipulate files and directories.
• Status information: programs ask the system for the date, time, amount of
available memory or disk space, number of users, or similar status information.
• File modification: Several text editors may be available to create and modify
the content of files stored on disk or tape.

04/12/2024 INTRODUCTION TO OPERATING SYSTEM 30


System Programs(Cont’d)
• Programming-language support: Compilers, assemblers, and interpreters
for common programming languages (such as C, C++, Java, Visual Basic, and
PERL) are often provided to the user with the operating system. Some of these
programs are now priced and provided separately.
• 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, relocatable loaders, linkage editors, and overlay
loaders. Debugging systems for either higher-level languages or machine
languages are also needed.
• Communications: Provides the mechanism for creating virtual connections
among processes, users, and different computer systems.

04/12/2024 INTRODUCTION TO OPERATING SYSTEM 31


System Structure
• It refers to the internal organization of the software.
• Simple Structure:- Many commercial systems are very small in size
and limited functionality. MS-DOS is an example of such a system. It
was originally designed and implemented by a few people who had
no idea that it would become so popular. It was written to provide the
most functionality in the least space (because of the limited hardware
on which it ran), so it was not divided into modules carefully.
•The essence of operating system structure is to manage the
complexity of the software.

04/12/2024 INTRODUCTION TO OPERATING SYSTEM 32


System Structure(Cont’d)
Four Types Os Structures
1. Monolithic Systems: It is a collection of procedures. Each has a well defined
interface (in terms of parameters & results). Procedure can call any other
one.
• User program puts the parameters in well defined places (registers/stack).
2. Layered/Hierarchical Systems: Organizes the system as a series of levels
which has six layers.
• Layer 1: Process allocation and multiprogramming.
• Process allocation.
• Process switching.

04/12/2024 INTRODUCTION TO OPERATING SYSTEM 33


System Structure(Cont’d)

Layer 2: Memory and drum management


• Allocate space for processes.
Layer 3: Operator process communication
• Handle communication between process and operator console.
Layer 4: I/O management
• Manages I/O devices and buffering information streams to and from them.
• Layer 5: User programs
• Layer 6: Operator

04/12/2024 INTRODUCTION TO OPERATING SYSTEM 34


System Structure (Cont’d)

3. Virtual Machines: VM is a software implementation of a machine (i.e. a


computer) that executes programs like a physical machine.
• The essence of virtual machine systems is to separate the two functions of
Timesharing systems and Multiprogramming. It extends the machine with a
more convenient interface.
There are two primary advantages to using virtual machines.
1. First, by completely protecting system resources, the virtual machine
provides a robust level of security.
2. Second, it allows system development to be done without disrupting
normal system operation.
4. Client-Server Model: User process sends a request to a server, which does
the work and sends back the answer. All the kernel does is handling the
communication between clients and servers.

04/12/2024 INTRODUCTION TO OPERATING SYSTEM 35

You might also like