0% found this document useful (0 votes)
52 views77 pages

OS Chapter 1

The document discusses the history and concepts of operating systems. It covers four generations of operating systems from vacuum tubes to personal computers. It also defines operating systems and describes their goals. Examples of popular operating systems like Windows, Mac OS, and Linux are provided.

Uploaded by

200339616138
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
52 views77 pages

OS Chapter 1

The document discusses the history and concepts of operating systems. It covers four generations of operating systems from vacuum tubes to personal computers. It also defines operating systems and describes their goals. Examples of popular operating systems like Windows, Mac OS, and Linux are provided.

Uploaded by

200339616138
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 77

Operating System

Prof. Abhijitsinh Parmar, Assistant Professor


Computer Science & Engineering
CHAPTER-1
Introduction
Concepts of Operating System
Software:-
•Program is a collection of code/instruction.
•Software is a collection of program.

Hardware:-
•Physical device is a collection of computer system which is called
Hardware.

Example: Processor, RAM, Hard disk, I/O devices.


Concepts of Operating System
Types of Software:-
•Software is divide into 3 types:
1. System software
2. Utility software
3. Application software
System Software
• The software which is used to perform all types of system level
tasks of computer is called system software.

For example:
– Compiler
– Operating system
– Interpreter
– Linker
– Loader
Utility Software
• The software, which provide an additional meaning to the
computer system.

For Example:-
– Calculator
– MS-paint
– Browser
– Notepad
– Media Player
Application Software
• The software which is created by users, using the different high
level language and database system for any special purpose.

For Example:-
– Library Management system
– Banking Software
– Ticket Reservation system
What is an Operating System?
• An operating system (OS) is a collection of system software that
manages computer hardware resources and provides common
services for computer programs.

OR

• A program that acts as an intermediary/interface between a user


of a computer and the computer hardware.
What is an Operating System?
• Users and Processes access the
Computer’s resources through the
Operating System
Goals of an Operating System
• Simplify the execution of user programs and make solving user
problems easier
• Use computer hardware efficiently
• Allow sharing of hardware and software resources.
• Make application software portable and flexible
• Provide isolation, security and protection among user programs
• Improve overall system reliability like Error confinement, Fault
tolerance, Reconfiguration.
Generations of Operating Systems
• It’s also known as history of Operating
First Generation (1945-1955)
systems. Vacuum Tubes & Plug boards
• Which can be divided in 4 generations
Second Generation (1955-1965)
Transistors & Batch Systems

Third Generation (1965-1980)


Integrated Circuits & Multi
programming

Fourth Generation (1980-Current)


Personal Computers
The First Generation (1945-1955): Vacuum Tubes
• Digital computers were not
constructed until the second world
war.
• Calculating engines with mechanical
relays were built at that time.
• However, the mechanical relays were
Vacuum Tubes Source: Google

very slow and were later replaced


with vacuum tubes.
• These machines were enormous but
were still very slow.
1940s computers Source: Google
The First Generation (1945-1955): Plugboards
•Programming languages were unknown
and there were no operating systems so all
the programming was done in machine
language. All the problems were simple
numerical calculations.

•By the 1950’s punch cards were Plugboards Source: Google

introduced and this improved the


computer system. Instead of using
plugboards, programs were written on
cards and read into the system.
The Second Generation(1955-1965)
Transistors & Batch Systems
• Transistors led to the development of the computer systems that
could be manufactured and sold to paying customers. These
machines were known as mainframes and were locked in air-
conditioned computer rooms with staff to operate them.

• The Batch System was introduced to reduce the wasted time in


the computer. A tray full of jobs was collected in the input room
and read into the magnetic tape.
The Third Generation (1965-1980)
Integrated Circuits & Multiprogramming
• Until the 1960’s, there were two types of computer systems i.e
the scientific and the commercial computers. These were
combined by IBM in the System/360. This used integrated circuits
and provided a major price and performance advantage over the
second generation systems.

• The third generation operating systems also introduced


multiprogramming. This meant that the processor was not idle
while a job was completing its I/O operation. Another job was
scheduled on the processor so that its time would not be wasted.
The Fourth Generation (1980-Present)
Personal Computers
• Personal Computers were easy to create with the development of
large-scale integrated circuits. These were chips containing
thousands of transistors on a square centimetre of silicon.

• The advent of personal computers also led to the growth of


networks. This created network operating systems and
distributed operating systems. The users were aware of a
network while using a network operating system and could log in
to remote machines and copy files from one machine to another.
Examples of Personal Computer Operating Systems
Microsoft Windows
• Microsoft created the Windows operating system in the mid-
1980s.

• Most recent versions are Windows 10 (released in 2015),


Windows 8 (2012), Windows 7 (2009), and Windows Vista (2007).

• Windows comes pre-loaded on most new PCs, which helps to


make it the most popular operating system in the world.
Examples of Personal Computer Operating Systems
Microsoft Windows

Windows 10
Examples of Personal Computer Operating Systems
Mac OS
• Mac OS is a line of operating systems created by Apple.

• It comes preloaded on all new Macintosh computers, or Macs.

• Specific versions include El Capitan (released in 2015), Yosemite


(2014), Mavericks (2013), Mountain Lion (2012), and Lion (2011).
Examples of Personal Computer Operating Systems
macOS

macOS Source: Google


Examples of Personal Computer Operating Systems
Linux
• Linux (pronounced LINN-ux) is a family of open-source operating
systems, which means they can be modified and distributed by
anyone around the world.

• The advantages of Linux are that it is free, and there are many
different distributions or versions you can choose from.
Examples of Personal Computer Operating Systems
linux

Ubuntu OS Source: Google


Operating systems for mobile devices
• Mobile devices such as smartphones, tablets, and MP3 players are
different from desktop and laptop computers, so they run
operating systems that are designed specifically for mobile
devices.

• Examples of mobile OS - Apple iOS and Google Android.


Types of Operating Systems
• Simple Batch System
• Multiprogramming Batch System
• Multitasking system
• Multiprocessor System
• Distributed Operating System
• Real-time Operating System
SIMPLE BATCH SYSTEMS
• No direct interaction between user and computer.

• The user has to submit a job (written on cards or tape) to a


computer operator.

• Then computer operator places a batch of several jobs on an


input device.
SIMPLE BATCH SYSTEMS

Batch OS (Source)
SIMPLE BATCH SYSTEMS
Advantages
• Increased performance - next job start as the previous job
finished.
• Suitable for executing large jobs that need little interaction
Disadvantages
• Zero interaction between user and computer.
• No mechanism to prioritize processes.
Multiprogramming Batch Operating System
• Several jobs are kept in main
memory at the same time, and the
CPU is multiplexed among them.
Multiprogramming Batch Operating System
•Multiprogramming increases CPU utilization

•Multiple jobs are loaded into main memory and one is selected from
pool for execution by CPU

•If at some point program in progress requires service of a peripheral


device, the control of CPU is given to next job which is in main
memory

•So, CPU is always executing some program instead of waiting.


Multiprogramming Batch Operating System
• CPU usage is poor when only one program is present in memory

• If memory can hold several programs, then CPU can switch to


another one whenever a program is awaiting for an I/O to complete
This is multitasking (multiprogramming)

Multiprogramming (Source)
Multiprogramming Batch Operating System
Effects of Multiprogramming

Effects of Multiprogramming (Source)


Multiprogramming Batch Operating System
Advantages
•High CPU utilization, so CPU never sits idle, if there are jobs available
•Many programs are allotted CPU almost simultaneously.
•Provides better resource utilization (Memory, I/O, CPU)
•More then one process can be executed simultaneously by user.
Disadvantages
•CPU scheduling is required.
•Memory management is required, to accommodate many jobs in
memory
•Multiprogramming does not support interaction with users
Multitasking/Time Sharing System(TSS)
• Multiprogramming does not support interaction with users, TSS
extends multiprogramming to handle multiple interactive jobs

• TSS uses CPU scheduling & multiprogramming to provide


economical interactive systems of two or more users.

• Each user is given a time-slice for executing his job in Round-Robin


Fashion ( Every process will be given equal amount of CPU one by
one in sequence). Job continues until the time slice ends.
• The CPU is multiplexed among several jobs that are kept in main
memory.
Multitasking/Time Sharing System(TSS)
• TSS allows more frequent context switches from one user to the
next (when time-slice of particular process ends it switches to the
next for given time slice duration)

• This gives each user the impression that the entire computer is
dedicated to his use only, whereas actually one computer is being
shared among many users.
Multitasking/Time Sharing System(TSS)
Advantages
• Provides Quick Response
• Reduces CPU idle time

Disadvantages
• Security & Integrity of user’s program & data is needed.
• If lots of users & applications are running then it may hang up the
system. So, high configuration of hardware is required.
Multiprocessor/Parallel System
• Multiprocessor systems with more than one CPU works in close
communication.

• Tightly coupled system – processors share memory and I/O


devices, bus, system and communication usually takes place
through the shared memory.
Multiprocessor/Parallel System
• A multiprocessor system comprises of several processors that
share a common physical memory.

• Multiprocessor system delivers higher computing power and


speed.

• In multiprocessor system all processors function under single


operating system.
Multiprocessor/Parallel System
Advantages
• Increased throughput: No. of jobs executed per unit time
increased as there are more no. of processors.

• Economical: Buying one system with 3 CPU is cheaper than 3


systems with 3 different CPUs. The processors can share
peripherals, cabinets and power supplies.

• Increased reliability: The failure of one processor will not stop the
system, it functions with other available processors.
Real Time System
• A real-time operating system (RTOS) promises a certain capability
within a specified time constraint.

• It is defined as an operating system known to give maximum time


for each of the critical operations that it performs, like OS calls and
interrupt handling.
Real Time System
• A real-time operating system (RTOS) promises a certain capability
within a specified time constraint.

• It is defined as an operating system known to give maximum time


for each of the critical operations that it performs, like OS calls and
interrupt handling.
Real Time System
Hard real-time system
• The Real-Time Operating system which guarantees the maximum
time for critical operations and complete them on time are
referred to as Hard Real-Time Operating Systems.

• If the system fails to meet the deadline even once the system is
considered to have Failed.

• E.g. Defence applications, nuclear system etc. Missing deadlines


creates hazards.
Real Time System
Soft real-time system
• The critical task will get priority over other tasks, but no assurity
of completing it in a defined time. These systems are referred to
as Soft Real-Time Operating Systems.

• It is less restrictive type of OS. even if the system fails to meet the
deadline, the system is not considered to have failed. In this case
the results of the requests are not worthless.

• E.g. Audio-Video streaming etc.


Distributed System
• Distribute the computation among several physical processors.

• Distributed OS is an OS that runs on several machines and it


controls the resources of several machines.

• Loosely coupled system – each processor has its own local


memory; processors communicate with one another through
various communications lines, such as high-speed buses or
telephone lines.
Distributed System

Distributed OS (Source)
Distributed System
Advantages
• Resources Sharing
• Computation speed up due to load sharing . So, Short response
time and higher throughput.
• Higher Reliability: Degree of tolerance against failure
• Incremental Growth : to extend functionality of a system by simply
adding additional resources to the system
Operating System Services
Operating System Services
• User Interface: Almost all operating systems have a user interface (UI).
Varies between Command-Line (CLI), Graphics User Interface (GUI),
Batch Interfaces

• Program execution: The system must be able to load a program into


memory and to run that program, must be able to end execution, either
normally or abnormally (indicating error)

• I/O operations: A running program may require I/O, which may involve a
file or an I/O device, user programs cannot execute I/O operations
directly, the operating system must provide some means to do I/O.
Operating System Services
• File-system manipulation: Programs need to read and write files
and directories, create and delete them, search them, list file
Information, permission management; allow or deny access to
files/directories based on file ownership.

• 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.
Operating System Services
• Error detection – OS needs to be constantly aware of possible
errors
• May occur in the CPU and memory hardware, in I/O devices, in
user program
• For each type of error, OS should take the appropriate action to
ensure correct and consistent computing
• Debugging facilities can greatly enhance the user’s and
programmer’s abilities to efficiently use the system
Some Additional OS Services
• Resource allocation: When multiple users or multiple jobs running
concurrently, resources must be allocated to each of them. Many
types of resources - Some (such as CPU cycles, main memory, and
file storage) may have special allocation code, others (such as I/O
devices) may have general request and release code.

• Accounting: To keep track of which users use how much and what
kinds of computer resources. Used for accounting or usage
statistics.
Some Additional OS Services
• Protection involves ensuring that all access to system resources is
controlled

• Security of the system from outsiders requires user authentication


(by password), extends to defending external I/O devices (eg.
Modems, network adapter from invalid access attempts .

• Protection and security: The owners of information stored in a


multiuser or networked computer system may want to control use
of that information, concurrent processes should not interfere
with each other.
System Calls
• System call is a request made by user program in order to get the
service of an operating system.

• When a program in user mode requires access to RAM or a


hardware resource, it must ask the kernel to provide access to
that resource. This is done via something called a system call.
System Calls
Kernel Mode
• When CPU is in kernel mode, the code being
executed can access any memory address and
any hardware resource.
• Hence kernel mode is a very privileged and
powerful mode. OS modes (Source)

• If a program crashes in kernel mode, the


entire system will be halted.
System Calls
User Mode
• When CPU is in user mode, the programs
don't have direct access to memory and
hardware resources.
• In user mode, if any program crashes, only
that particular program is halted. That means OS modes (Source)

the system will be in a safe state even if a


program in user mode crashes.
• Hence, most programs in an OS run in user
mode.
System Calls For Process Management
System Calls For File Management
System Calls For Directory Management
System Calls For Miscellaneous Tasks
Operating System layered structure
Operating System layered structure
• With the layered approach, the
bottom layer is the hardware,
while the highest layer is the
user interface.

• Advantage is simplicity of
construction and debugging.
• The main difficulty is defining the
various layers.
• The main disadvantage is that
the OS tends to be less efficient
than other implementations
Operating System Layers (Source)
Operating System Structure - Components
• Process Management
• Main Memory Management
• File Management
• I/O System Management
• Secondary Management
• Networking
• Protection System
• Command-Interpreter System
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.
– Deadlock handling
– Provision of mechanisms for:
– process synchronization
– process communication
Memory Management
• Memory 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.
• Main memory is a volatile storage device. It loses its contents in the
case of system failure.
• The operating system is responsible for the following activities in
connections 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.
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.
I/O System Management
• The I/O system consists of:
– A buffer-caching system
– A general device-driver interface
– Drivers for specific hardware devices
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.

• OS is responsible for the following activities with disk management:


– Free space management
– Storage allocation
– Disk scheduling
Networking
• A distributed system is a collection processors that do not share
memory or a clock. Each processor has its own local memory.

• The processors in the system are connected through a communication


network. Communication takes place using a protocol. A distributed
system provides user access to various system resources.

• Access to a shared resource allows:


– Computation speed-up
– Increased data availability
– Enhanced reliability
Protection
• 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.
Command-Interpreter System
• The program that reads and interprets control statements is
called variously:
– command-line interpreter
– shell (in UNIX)

• Its function is to get and execute the next command statement.


Monolithic Approach
• Functionality of the OS
is activated with simple
function calls within the
kernel, Monolithic
kernel is one large
program.

• Device drivers are


loaded into the running
kernel and become part
of the kernel.
Monolithic Approach
• Microkernel structures the OS by removing all unnecessary parts
of the kernel and implement them as system and user level
programs.

• They offers minimal process and memory management, and a


communications facility.

• Communication between components is done by message


passing.
Monolithic Approach
Monolithic Approach
Advantage
• Operating system can be easily extended
• Kernel is smaller, so very few changes are required in it.
• It offers more security and reliability.

Disadvantage
• It has poor performance due to increased system overhead of
message passing.
Virtual Machine
• Virtual machine does abstract
the hardware of a single
computer (the CPU, Memory,
Disk drives, Network Interface
Cards, and so forth) into
several different execution
environments and thereby
creating the illusion that each
separate execution
environment is running its
own PC/environment.
Virtual Machine
• Virtual Machine(VM) is also known as a guest machine, which is
created within another computing environment known as a
“host”.

• Multiple VM can be present within a single host at one time.


References
[1] Silberschatz, A., Galvin, P. B., & Gagne, G. (2005). Operating system concepts.
Hoboken, NJ: J. Wiley & Sons.
[2] Stallings, W. (2018). Operating systems: Internals and design principles.
Prentice-Hall
[3] Tanenbaum, A. (2014). Modern operating systems. Harlow: Pearson.
[4] Nutt, G. J. (2004). Operating systems: A modern perspective. Boston:
Pearson/Addison Wesley.
[5] Bower T. Operating System Structure. K–State Polytechnic.
http://faculty.salina.k-state.edu/tim/ossg/Introduction/struct.html
[6] Bower T. Basic Operating System Concepts. K–State Polytechnic.
http://faculty.salina.k-state.edu/tim/ossg/Introduction/OSrole.html
[7] Operating System Generations. Tutorialspoint.
https://www.tutorialspoint.com/operating-system-generations
www.paruluniversity.ac.in

You might also like