01 Operating System
01 Operating System
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
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
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
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
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
•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
•
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.
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.
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.