0% found this document useful (0 votes)
24 views

01 Operating System

Uploaded by

Mithun
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
24 views

01 Operating System

Uploaded by

Mithun
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 42

01 Operating System

PRAVEEN KUMAR SRIVASTAVA COURSE CODE: CAUCBC402T


9839692488
UNIT 1

Introduction: Definition and types of operating system, Evolution, Batch Processing System,
Multiprogramming, Time Sharing, Parallel System, Real Time System, Distributed System, Network
System, Operating System Structure, Components of Operating System, services, functions, System Calls,
System programs, Kernel and its types, Virtual Machines
Introduction

An operating System (OS) is an intermediary between users and computer hardware.


It provides users an environment in which a user can execute programs conveniently and
efficiently. In technical terms, it is software which manages hardware.
An operating System controls the allocation of resources and services such as memory,
processors, devices and information.
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
Computer System Structure

Computer system can be divided into four components:

1. Hardware – the central processing unit (CPU), the memory, and the input/output (I/O)
devices—provides the basic computing resources for the System.
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
e.g. :- Word processors, compilers, web browsers, database systems, video games
4. Users:- People, machines, other computers
Fig:- Abstract view of the components of a computer system.
Functions of the Operating System

Convenience: An OS makes a computer more convenient to use.


Efficiency: An OS allows the computer system resources to be used efficiently.
User Interface: The operating system provides a user interface that enables users to interact with the
computer system. This can be a Graphical User Interface (GUI), a Command-Line Interface (CLI), or a
combination of both.
Ability to Evolve: An OS should be constructed in such a way as to permit the effective development,
testing, and introduction of new system functions at the same time without interfering with service.
Throughput: An OS should be constructed so that It can give maximum throughput(Number of tasks
per unit time).
Resource Management: The operating system manages and allocates memory, CPU time, and other
hardware resources among the various programs and processes running on the computer.
Process Management:- The operating system is responsible for starting, stopping, and managing
processes and programs. It also controls the scheduling of processes and allocates resources to them.
Job Accounting: It keeps track of time and resources used by various jobs or users.
Virtualization: The operating system provides virtualization capabilities that allow multiple operating
systems or applications to run on a single physical machine. This can enable efficient use of resources
and flexibility in managing workloads.
Memory Management:- The operating system manages the computer’s primary memory and provides
mechanisms for optimizing memory usage.
Security :- The operating system provides a secure environment for the user, applications, and data by
implementing security policies and mechanisms such as access controls and encryption.
The operating system is responsible for organizing and managing the file system, including the creation,
deletion, and manipulation of files and directories.
Device Management: The operating system manages input/output devices such as printers, keyboards,
mice, and displays. It provides the necessary drivers and interfaces to enable communication between the
devices and the computer.
Networking: The operating system provides networking capabilities such as establishing and
managing network connections, handling network protocols, and sharing resources such as
printers and files over a network.
Backup and Recovery: The operating system provides mechanisms for backing up data and
recovering it in case of system failures, errors, or disasters.
System Calls: The operating system provides a set of system calls that enable applications to
interact with the operating system and access its resources. System calls provide a standardized
interface between applications and the operating system, enabling portability and compatibility
across different hardware and software platforms.

Windows uses Kerberos authentication to prevent unauthorized access to data.


Computer Startup

Booting the Computer


The process of starting or restarting the computer is known as booting.
If the computer is switched off completely and if turned on then it is called cold
booting.
Warm booting is a process of using the operating system to restart the computer.
bootstrap program is loaded at power-up or reboot
- Typically stored in ROM (read-only memory) or EPROM (electrically erasable
programmable read-only memory) , generally known as firmware
- Initializes all aspects of system
the bootstrap program must locate the operating-system kernel and load it into memory.
Once the kernel is loaded and executing, it can start providing services to the system and its users.

Once this phase is complete, the system is fully booted, and the system waits for some event to occur.
The occurrence of an event is usually signaled by an interrupt from either the hardware or the
software.
Hardware may trigger an interrupt at any time by sending a signal to the CPU, usually by way of the
system bus.
Software may trigger an interrupt by executing a special operation called a system call (also called a
monitor call).
The CPU can load instructions only from memory, so any programs to run must be stored there.
General-purpose computers run most of their programs from rewritable memory, called main memory
(also called random-access memory, or RAM).
Main memory commonly is implemented in a semiconductor technology called dynamic random-
access memory (DRAM).
the operating system is the one program running at all times on the computer—usually called
the kernel.
Along with the kernel, there are two other types of programs:
1. system programs, which are associated with the operating system but are not necessarily part of the
kernel, and
2. application programs, which include all programs not associated with the operation of the 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— features a core kernel along with middleware that supports databases, multimedia, and
graphics
Types of Operating Systems

•Batch Operating System


•Multi-Programming System
•Multi-Processing System
•Multi-Tasking Operating System
•Time-Sharing Operating System
•Distributed Operating System
•Network Operating System
•Real-Time Operating System
1. Batch Operating 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 groups them into batches. It is the responsibility
of the operator to sort jobs with similar needs.
Advantages of Batch Operating System

•It is very difficult to guess or know the time required for any job to complete. Processors
of the batch systems know how long the job would be when it is in the queue.
•Multiple users can share the batch systems.
•The idle time for the batch system is very less.
•It is easy to manage large work repeatedly in batch systems.
Disadvantages of Batch Operating System

•The computer operators should be well known with batch systems.


•Batch systems are hard to debug.
•It is sometimes costly.
•The other jobs will have to wait for an unknown time if any job fails.
Examples of Batch Operating Systems: Payroll Systems, Bank Statements, etc.
Multiprogramming Operating System

Multiprogramming is an extension to batch processing where the CPU is always kept busy.
Each process needs two types of system time: CPU time and IO time.
In a multiprogramming environment, when a process does its I/O, The CPU can start the execution of other
processes.
Therefore, multiprogramming improves the efficiency of the system.
Advantages of Multiprogramming OS
o Throughout the system, it increased as the CPU always had one program to execute.
o Response time can also be reduced.

Disadvantages of Multiprogramming OS
o Multiprogramming systems provide an environment in which various systems resources are
used efficiently, but they do not provide any user interaction with the computer system.
Multiprocessing Operating 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.
In Multiprocessing, Parallel computing is achieved. More than one processor present in the system
can execute more than one process simultaneously, which will increase the throughput of the
system.
Advantages of Multiprocessing operating system:
o Increased reliability: Due to the multiprocessing system, processing tasks can be distributed
among several processors. This increases reliability as if one processor fails, the task can be given
to another processor for completion.
o Increased throughout: As several processors increase, more work can be done in less.

Disadvantages of Multiprocessing operating System


o Multiprocessing operating system is more complex and sophisticated as it takes care of
multiple CPUs simultaneously.
Symmetrical Multiprocessing Operating System
In a Symmetrical multiprocessing operating system, each processor executes the same copy of
operating system every time. Each process makes its own decisions and works according to all other
process to make sure that system works efficiently. With the help of CPU scheduling algorithms, the task
is assigned to the CPU that has least burden. Symmetrical multiprocessing operating system is also
known as “Shared Everything System” because all the processors share memory and input-output bus.
Advantages
•Failure of one processor does not affect the functioning of other processors.
•It divides all the workload equally to the available processors.
•Makes use of available resources efficiently.

Disadvantages
•Symmetrical multiprocessing OS are more complex.
•They are more costlier.
•Synchronization between multiple processors is difficult.
Asymmetrical Multiprocessing Operating System
In Asymmetrical multiprocessing operating system one processor acts as a master whereas remaining all
processors act a slaves. Slave processors are assigned with ready to execute processes by the master
processor. A ready queue is being maintained by master processor to provides with processes for slaves.
In multiprocessing operating system a scheduler is created by master process that assigns processes to
be executed to slave processors.
Advantages
•Asymmetrical multiprocessing operating system are cost-effective.
•They are easy to design and manage.
•They are more scalable.

Disadvantages
•There can be uneven distribution of workload among the processors.
•The processors do not share same memory.
•Entire system goes down if one process fails.
Multitasking Operating System

The multitasking operating system is a logical extension of a multiprogramming system that


enables multiple programs simultaneously. It allows a user to perform more than one computer task at
the same time.
Features of Multi-Tasking Operating System


Time Sharing – In this, many processes are allocated with resources of computer in respective time slots,
processors time is shared with multiple processes.
Context Switching – context switching is a process of saving the context of one process and loading the
context of another process. In simpler terms it is loading another process when the prior process has
finished its execution.
Multi-Threading – Multithreading is the ability of a program or an operating system to enable more than
one user at a time without requiring multiple copies of the program running on the computer.
Hardware Interrupt – When a process or an event requires urgent attention, hardware or software will
signal with an interrupt. It informs the processor that a high-priority task has arisen that necessitates
interrupting the running process.
Advantages of Multitasking operating system
o This operating system is more suited to supporting multiple users simultaneously.
o The multitasking operating systems have well-defined memory management.

Disadvantages of Multitasking operating system


o The multiple processors are busier at the same time to complete any task in a multitasking
environment, so the CPU generates more heat.
Pre-emptive Multi-Tasking Operating System: In pre-emptive multitasking, the operating system
can initiate a context switching from the running process to another process. In other words, the
operating system allows stopping the execution of the currently running process and allocating the
CPU to some other process. The OS uses some criteria to decide for how long a process should
execute before allowing another process to use the operating system. The mechanism of taking
control of the operating system from one process and giving it to another process is called pre-
emption.

Examples UNIX, Windows 95, Windows NT operating system.


Non-pre-emptive Multi-Tasking Operating System: Non-pre-emptive Multi-Tasking Operating System is
also known as cooperative multitasking, this operating system never initiates context switching from the
running process to another process. A context switch occurs only when the processes voluntarily yield
control periodically or when idle or logically blocked to allow multiple applications to execute
simultaneously. Also, in this multitasking, all the processes cooperate for the scheduling scheme to work.
Example – Macintosh OS version 8.0-9.2.2 and Windows 3.x operating system.
Network Operating System

An Operating system, which includes software and associated protocols to communicate with other
computers via a network conveniently and cost-effectively, is called Network Operating System.
Advantages of Network Operating System
o In this type of operating system, network traffic reduces due to the division between clients and
the server.
o This type of system is less expensive to set up and maintain.
Disadvantages of Network Operating System
o In this type of operating system, the failure of any node in a system affects the whole system.
o Security and performance are important issues. So trained network administrators are required for
network administration.
Peer-to-Peer
Peer-to-peer network operating systems allow users to share resources and files located on their computers and to
access shared resources found on other computers. However, they do not have a file server or a centralized
management source
In a peer-to-peer network, all computers are considered equal;
they all have the same abilities to use the resources available on
the network. Peer-to-peer networks are designed primarily for
small to medium local area networks. Nearly all modern
desktop operating systems, such as Macintosh OSX, Linux, and
Windows, can function as peer-to-peer network operating
systems.
Client/Server
Client/server network operating systems allow the network
to centralize functions and applications in one or more
dedicated file servers (See fig. 2). The file servers become
the heart of the system, providing access to resources and
providing security. Individual workstations (clients) have
access to the resources available on the file servers. The
network operating system provides the mechanism to
integrate all the components of the network and allow
multiple users to simultaneously share the same resources
irrespective of physical location. UNIX/Linux and the
Microsoft family of Windows Servers are examples of
client/server network operating systems.
Real Time Operating System

In Real-Time Systems, each job carries a certain deadline within which the job is supposed to be
completed, otherwise, the huge loss will be there, or even if the result is produced, it will be completely
useless.
The Application of a Real-Time system exists in the case of military applications, if you want to drop a
missile, then the missile is supposed to be dropped with a certain precision.

Advantages of Real-time operating system:


o Easy to layout, develop and execute real-time applications under the real-time operating system.
o In a Real-time operating system, the maximum utilization of devices and systems.
Disadvantages of Real-time operating system:
o Real-time operating systems are very costly to develop.
o Real-time operating systems are very complex and can consume critical CPU cycles.
Time-Sharing Operating System

In the Time Sharing operating system, computer resources are allocated in a time-dependent fashion to
several programs simultaneously. Thus it helps to provide a large number of user's direct access to the main
computer. It is a logical extension of multiprogramming. In time-sharing, the CPU is switched among
multiple programs given by different users on a scheduled basis.
A time-sharing operating system allows many users to be served simultaneously, so sophisticated CPU
scheduling schemes and Input/output management are required.
Time-sharing operating systems are very difficult and expensive to build.
Advantages of Time Sharing Operating System
o The time-sharing operating system provides effective utilization and sharing of resources.
o This system reduces CPU idle and response time.
Disadvantages of Time Sharing Operating System
o Data transmission rates are very high in comparison to other methods.
o Security and integrity of user programs loaded in memory and data need to be maintained as many
users access the system at the same time.
Distributed Operating System

The Distributed Operating system is not installed on a single machine, it is divided into parts, and these
parts are loaded on different machines. A part of the distributed Operating system is installed on each
machine to make their communication possible. Distributed Operating systems are much more complex,
large, and sophisticated than Network operating systems because they also have to take care of varying
networking protocols.
Advantages of Distributed Operating System
o The distributed operating system provides sharing of resources.
o This type of system is fault-tolerant.
Disadvantages of Distributed Operating System
o Protocol overhead can dominate computation cost.

You might also like