MODULE 1-1. Introduction To OS
MODULE 1-1. Introduction To OS
Operating Systems
1
What is an Operating
System?
• A program that acts as an intermediary between a computer
user and the computer hardware.
• Operating System can be defined as an interface between user
and the hardware. It provides an environment to the user so
that, the user can perform its task in a convenient and efficient
way.
• 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
2
What is an Operating
System?
• An Operating System can be defined as an interface between user and hardware. It is responsible
for the execution of all the processes, Resource Allocation, CPU management, File Management and
many other tasks.
• The purpose of an operating system is to provide an environment in which a user can execute
programs in convenient and efficient manner.
3
4
Computer System Structure
• Computer system can be divided into four components:
1) Hardware: provides basic computing resources CPU, memory,
I/O devices, disks, etc.,
2) Operating system: Controls and coordinates use of hardware
among various applications and users.
3) 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, etc.,
4) Users: People, machines, other computers.
5
Four Components of a Computer System
6
What Operating System Do
• The operating system controls the hardware and coordinates its use
among the various application programs for the various users.
• We can also view a computer system as consisting of hardware,
software, and data.
• The operating system provides the means for proper use of these
resources in the operation of the computer system.
• An operating system is similar to a government. Like a government, it
performs no useful function by itself. It simply provides an
environment within which other programs can do useful work.
• To understand full the operating system's role, we explore operating
systems from two viewpoints:
• The user
• The system. 7
User View
The user's view of the computer varies according to the interface being used
• Single user computers (e.g., PC, workstations). Such systems are
designed for one user to monopolize its resources. The goal is to
maximize the work (or play) that the user is performing. The
operating system is designed mostly for ease of use and good
performance.
• Multi user computers (e.g., mainframes, computing servers).
These users share resources and may exchange information. The
operating system in such cases is designed to maximize resource
utilization -- to assure that all available CPU time, memory, and I/O
are used efficiently and that no individual users takes more than
their air share.
8
User View (Cont.)
• Handheld computers (e.g., smartphones and tablets). The
user interface for mobile computers generally features a
touch screen. The systems are resource poor, optimized for
usability and battery life.
• Embedded computers (e.g., computers in home devices and
automobiles) The user interface may have numeric keypads
and may turn indicator lights on or off to show status. The
operating systems are designed primarily to run without
user intervention.
9
System View
From the computer's point of view, the operating system is the program most
intimately involved with the hardware. There are two different views:
10
Defining Operating System
No universally accepted definition of what an OS:
• In the Computer System (comprises of Hardware and software),
Hardware can only understand machine code (in the form of 0
and 1) which doesn't make any sense to a naive user.
• An Operating System can be defined as an interface between
user and hardware. It is responsible for the execution of all the
processes, Resource Allocation, CPU management, File
Management and many other tasks.
• The purpose of an operating system is to provide an environment
in which a user can execute programs in convenient and efficient
manner.
11
Defining Operating System
No universally accepted definition of what an OS:
• Operating systems exist to offer a reasonable way to solve the problem
of creating a usable computing system.
• The fundamental goal of computer systems is to execute user programs
and to make solving user problems easier.
• Since bare hardware alone is not particularly easy to use, application
programs are developed.
⮚These programs require certain common operations, such as those
controlling the I/O devices.
⮚ The common functions of controlling and allocating resources are
brought together into one piece of software: the operating system.
12
Defining Operating System (Cont.)
⮚ Some systems take up less than a megabyte of space and lack even a full-screen
editor.
⮚ Some systems require gigabytes of space and are based entirely on graphical
windowing systems.
13
Defining Operating System (Cont.)
14
Defining Operating System (Cont.)
No universally accepted definition of what is part of the OS:
• A kernel is the central component of an operating system. It manages the
system’s resources and provides common services for computer programs.
• The only job performed by the kernel is to the manage the communication
between the software and the hardware.
• Functions of kernel
• The kernel is the core component of an operating system which acts as an
interface between applications, and the data is processed at the hardware
level.
• When an OS is loaded into memory, the kernel is loaded first and remains
in memory until the OS is shut down.
• After that, the kernel provides and manages the computer resources and
allows other programs to run and use these resources.
• The kernel also sets up the memory address space for applications, loads
the files with application code into memory, and sets up the execution stack
for programs.
15
Defining Operating System (Cont.)
• The emergence of mobile devices, have resulted in an
increase in the number of features that constituting the
operating system.
• Mobile operating systems often include not only a core
kernel but also middleware -- a set of software
frameworks that provide additional services to application
developers.
• For example, each of the two most prominent mobile
operating systems -- Apple's iOS and Google's Android --
feature a core kernel along with middleware that supports
databases, multimedia, and graphics (to name only a
few).
16
Simple Batch System
Multi-programming System
18
SIMPLE BATCH SYSTEM…
✔ This type of operating system does not interact with
the computer directly.
✔ There is an operator which takes similar jobs having
the same requirement and group them into batches.
✔ It is the responsibility of the operator to sort jobs
with similar needs.
19
SIMPLE BATCH SYSTEM…
✔ In Batch operating system, access is given to more than one
person; they submit their respective jobs to the system for the
execution.
✔ The system put all of the jobs in a queue on the basis of first
come first serve and then executes the jobs one by one.
✔ The users collect their respective output when all the jobs get
executed.
✔ The purpose of this operating system was mainly to transfer
control from one job to another as soon as the job was completed.
✔ It contained a small set of programs called the resident monitor
that always resided in one part of the main memory. The remaining
part is used for servicing jobs. 20
ADVANTAGES
✔ A data center’s staff can schedule batch processing during times when the computers are
otherwise idle, such as overnight.
✔ The use of a resident monitor improves computer efficiency as it eliminates CPU time between
two jobs.
✔ The computer operators can delay or prioritize different batches easily, depending on
circumstances.
DISADVANTAGES
Examples
22
MULTI-PROGRAMMING SYSTEM
✔ In this the operating system picks and begins to execute one
job from memory.
✔ Multiprogramming system, CPU will never be idle and keeps on processing.
ADVANTAGES
✔It increases CPU utilization.
✔ It maximizes the total job throughput of a Example
computer. Consider that Three jobs are
submitted. Almost no
contention for resources. All
three can run in minimum time
in a multitasking environment
DISADVANTAGES (assuming JOB2/3 have
✔ It must keep track of all kinds of jobs. enough CPU time to keep their
✔ Each system requires large chunks of I/O operations active)
hard drive space which cannot be
allocated to programs.
✔ Poor CPU usage when only one
program is present in memory.
23
REAL-TIME OPERATING SYSTEM
• In real time operating system (RTOS), Each task is given some time to
execute so that all the tasks work smoothly.
• Each user gets the time of CPU as they use a single system. These
systems are also known as Multitasking Systems.
• The task can be from a single user or different users also.
• The time that each task gets to execute is called quantum. After this time
interval is OS switches over to the next task.
24
REAL-TIME OPERATING SYSTEM
• Real time operating system (RTOS) is defined as a data processing system in
which the time interval required to process and respond to inputs is so small
that it controls the environment.
Types:
1.Hard real-time systems
Hard real-time systems-
guarantee that critical tasks
complete on time. In hard
real-time systems secondary
storage is limited or missing
with data stored in ROM
DISADVANTAGES
✔There are only limited tasks run at the same time and other task have to wait.
✔ RTOS used lot of system resources which is not as good and is also
expensive.
✔ Multi tasking is done few of times and this is the main disadvantage of RTOS.
26
MULTIPROCESSOR SYSTEM
• In Multiprocessing, Parallel computing is achieved. There are more than
one processors present in the system which can execute more than one
process at the same time.
• This will increase the throughput of the system, where Throughput is the
amount of work completed per unit of time.
• In other words throughput is the processes executed/ number of jobs
completed in a unit of time.
• Each processor can execute an app independent of the others.
27
MULTIPROCESSOR SYSTEM
• A multiprocessor system consists of several processors that share a
common physical memory. Multiprocessor system provides higher
computing power and speed.
ADVANTAGES DISADVANTAGES
✔Enhanced performance. ✔It's more complex
✔ Execution of several tasks by than other operating
different processors
concurrently, increases the
systems.
system's throughput. ✔ It requires context
✔ Due to the multiprocessing switching which
system, processing tasks can slightly impacts
be distributed among several performance.
processors. This increases
reliability as if one processor
fails, the task can be given to
another processor for
completion.
28
DISTRIBUTED OPERATING SYSTEM
• The motivation behind developing distributed operating systems is
the availability of powerful and inexpensive microprocessors and
advances in communication technology.
29
DISTRIBUTED OPERATING SYSTEM…
• ADVANTAGES
✔ If one machine crashes, the system as a whole can still survive.
✔ A distributed system may have more total computing power than a mainframe.
✔ Since it is an open system it is always ready to communicate with other
systems.
• DISADVANTAGES
✔ Distributed systems will have an inherent security issue.
✔ If the network gets saturated then problems with transmission will surface.
✔ There is currently very few softwares support for Distributed system.
30
31