1.overview of Operating System

Download as pdf or txt
Download as pdf or txt
You are on page 1of 18

UNIT 1

OVERVIEW OF OPERATING SYSTEM 8 marks


1.1 OPERATING SYSTEM
What is an Operating System?
A program that acts as an intermediary between a user of a computer and the computer hardware
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
Hardware – provides basic computing resources
CPU, memory, I/O devices
Operating system
Controls and coordinates use of hardware among various applications and users
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
Users
People, machines, other computers

Four Components of a Computer System

Operating System Definition

OS is a resource allocator
Manages all resources
Decides between conflicting requests for efficient and fair resource use
OS is a control program
Controls execution of programs to prevent errors and improper use of the computer
No universally accepted definition
Everything a vendor ships when you order an operating system” is good approximation
But varies wildly
Components of Operating System-

The components of an operating system play a key role to make a variety of computer system
parts work together. The operating components are discussed below.

Operating-system-components

Kernel
The kernel in the OS provides the basic level of control on all the computer peripherals. In the
operating system, the kernel is an essential component that loads firstly and remains within the main
memory. So that memory accessibility can be managed for the programs within the RAM, it creates
the programs to get access from the hardware resources. It resets the operating states of the CPU for
the best operation at all times.

Process Execution
The OS gives an interface between the hardware as well as an application program so that the
program can connect through the hardware device by simply following procedures & principles
configured into the OS. The program execution mainly includes a process created through an OS
kernel that uses memory space as well as different types of other resources.

Interrupt
In the operating system, interrupts are essential because they give a reliable technique for the OS
to communicate & react to their surroundings. An interrupt is nothing but one kind of signal between a
device as well as a computer system otherwise from a program in the computer that requires the OS to
leave and decide accurately what to do subsequently. Whenever an interrupt signal is received, then
the hardware of the computer puts on hold automatically whatever computer program is running
presently, keeps its status & runs a computer program which is connected previously with the
interrupt.

Multitasking
It describes the working of several independent computer programs on a similar computer
system. Multitasking in an OS allows an operator to execute one or more computer tasks at a time.
Since many computers can perform one or two tasks at a time, usually this can be done with the help
of time-sharing, where each program uses the time of a computer to execute.
Networking
Networking can be defined as when the processor interacts with each other through
communication lines. The design of communication-network must consider routing, connection
methods, safety, the problems of opinion & security.
Presently most of the operating systems maintain different networking techniques, hardware, &
applications. This involves that computers that run on different operating systems could be included in
a general network to share resources like data, computing, scanners, printers, which uses the
connections of either wired otherwise wireless.

Security
If a computer has numerous individuals to allow the immediate process of various processes,
then the many processes have to be protected from other activities. This system security mainly
depends upon a variety of technologies that work effectively. Current operating systems give an entrée
to a number of resources, which are obtainable to work the software on the system, and to external
devices like networks by means of the kernel. The operating system should be capable of
distinguishing between demands which have to be allowed for progressing & others that don’t need to
be processed. Additionally, to permit or prohibit a security version, a computer system with a high
level of protection also provides auditing options. So this will allow monitoring the requests from
accessibility to resources

User Interface
A GUI or user interface (UI) is the part of an OS that permits an operator to get the information.
A user interface based on text displays the text as well as its commands which are typed over a
command line with the help of a keyboard.
The OS-based applications mainly provide a specific user interface for efficient communication.
The main function of a user interface of an application is to get the inputs from the operator & to
provide o/ps to the operator. But, the sorts of inputs received from the user interface as well as the o/p
types offered by the user interface may change from application to application. The UI of any
application can be classified into two types namely GUI (graphical UI) & CLI (command line user
interface).
Operations of the operating system-

The major operations of the operating system are process management, memory management,
device management and file management. These are given in detail as follows:

Process Management
The operating system is responsible for managing the processes i.e assigning the processor to a
process at a time. This is known as process scheduling. The different algorithms used for process
scheduling are FCFS (first come first served), SJF (shortest job first), priority scheduling, round robin
scheduling etc.
There are many scheduling queues that are used to handle processes in process management. When the
processes enter the system, they are put into the job queue. The processes that are ready to execute in
the main memory are kept in the ready queue. The processes that are waiting for the I/O device are
kept in the device queue.

Memory Management
Memory management plays an important part in operating system. It deals with memory and the
moving of processes from disk to primary memory for execution and back again.
The activities performed by the operating system for memory management are:
The operating system assigns memory to the processes as required. This can be done using best fit,
first fit and worst fit algorithms.
All the memory is tracked by the operating system i.e. it nodes what memory parts are in use by the
processes and which are empty.
The operating system de-allocated memory from processes as required. This may happen when a
process has been terminated or if it no longer needs the memory.

Device Management
There are many I/O devices handled by the operating system such as mouse, keyboard, disk
drive etc. There are different device drivers that can be connected to the operating system to handle a
specific device. The device controller is an interface between the device and the device driver. The
user applications can access all the I/O devices using the device drivers, which are device specific
codes.
File Management
Files are used to provide a uniform view of data storage by the operating system. All the files are
mapped onto physical devices that are usually non volatile so data is safe in the case of system failure.
The files can be accessed by the system in two ways i.e. sequential access and direct access:
 Sequential Access
The information in a file is processed in order using sequential access. The files records are accessed
on after another. Most of the file systems such as editors, compilers etc. use sequential access.
 Direct Access
In direct access or relative access, the files can be accessed in random for read and write operations.
The direct access model is based on the disk model of a file, since it allows random accesses.

Protection and Security


Protection – any mechanism for controlling access of processes or users to resources defined by the
OS
Security – defense of the system against internal and external attacks
Huge range, including denial-of-service, worms, viruses, identity theft, theft of service
Systems generally first distinguish among users, to determine who can do what
User identities (user IDs, security IDs) include name and associated number, one per user
User ID then associated with all files, processes of that user to determine access control
Group identifier (group ID) allows set of users to be defined and controls managed, then also
associated with each process, file
Privilege escalation allows user to change to effective ID with more rights

Operating System Views

An operating system is a construct that allows the user application programs to interact with the
system hardware. Operating system by itself does not provide any function but it provides an
atmosphere in which different applications and programs can do useful work.
The operating system can be observed from the point of view of the user or the system. This is known
as the user view and the system view respectively. More details about these are given as follows:

User View
The user view depends on the system interface that is used by the users. The different types of user
view experiences can be explained as follows:
 If the user is using a personal computer, the operating system is largely designed to make the
interaction easy. Some attention is also paid to the performance of the system, but there is no
need for the operating system to worry about resource utilization. This is because the personal
computer uses all the resources available and there is no sharing.
 If the user is using a system connected to a mainframe or a minicomputer, the operating system
is largely concerned with resource utilization. This is because there may be multiple terminals
connected to the mainframe and the operating system makes sure that all the resources such as
CPU,memory, I/O devices etc. are divided uniformly between them.
 If the user is sitting on a workstation connected to other workstations through networks, then the
operating system needs to focus on both individual usage of resources and sharing though the
network. This happens because the workstation exclusively uses its own resources but it also
needs to share files etc. with other workstations across the network.
 If the user is using a handheld computer such as a mobile, then the operating system handles the
usability of the device including a few remote operations. The battery level of the device is also
taken into account.

There are some devices that contain very less or no user view because there is no interaction with
the users. Examples are embedded computers in home devices, automobiles etc.

System View
 According to the computer system, the operating system is the bridge between applications and
hardware. It is most intimate with the hardware and is used to control it as required.
 The different types of system view for operating system can be explained as follows:
 The system views the operating system as a resource allocator. There are many resources such
as CPU time, memory space, file storage space, I/O devices etc. that are required by processes
for execution. It is the duty of the operating system to allocate these resources judiciously to the
processes so that the computer system can run as smoothly as possible.
 The operating system can also work as a control program. It manages all the processes and I/O
devices so that the computer system works smoothly and there are no errors. It makes sure that
the I/O devices work in a proper manner without creating problems.
 Operating systems can also be viewed as a way to make using hardware easier.
 Computers were required to easily solve user problems. However it is not easy to work directly
with the computer hardware. So, operating systems were developed to easily communicate with
the hardware.
 An operating system can also be considered as a program running at all times in the background
of a computer system (known as the kernel) and handling all the application programs. This is
the definition of the operating system that is generally followed
1.2 Types of Operating System-

Operating systems are there from the very first computer generation and they keep evolving with time.
In this chapter, we will discuss some of the important types of operating systems which are most commonly
used.

1. Batch processing Operating System


Batch processing is a technique in which an Operating System collects the programs and data
together in a batch before processing starts. An operating system does the following activities
related to batch processing −
 The OS defines a job which has predefined sequence of commands, programs and data as a
single unit.
 The OS keeps a number a jobs in memory and executes them without any manual information.
 Jobs are processed in the order of submission, i.e., first come first served fashion.
 When a job completes its execution, its memory is released and the output for the job gets
copied into an output spool for later printing or processing.

Advantages-
 Batch processing takes much of the work of the operator to the computer.
 Increased performance as a new job get started as soon as the previous job is finished, without
any manual intervention.
Disadvantages-
 Difficult to debug program.
 A job could enter an infinite loop.
 Due to lack of protection scheme, one batch job can affect pending jobs.
2. Multitasking Operating System-
Multitasking is when multiple jobs are executed by the CPU simultaneously by switching between
them. Switches occur so frequently that the users may interact with each program while it is
running. An OS does the following activities related to multitasking −
 The user gives instructions to the operating system or to a program directly, and receives an
immediate response.
 The OS handles multitasking in the way that it can handle multiple operations/executes multiple
programs at a time.
 Multitasking Operating Systems are also known as Time-sharing systems.
 These Operating Systems were developed to provide interactive use of a computer system at a
reasonable cost.
 A time-shared operating system uses the concept of CPU scheduling and multiprogramming to
provide each user with a small portion of a time-shared CPU.
 Each user has at least one separate program in memory.

 A program that is loaded into memory and is executing is commonly referred to as a process.
 When a process executes, it typically executes for only a very short time before it either finishes
or needs to perform I/O.
 Since interactive I/O typically runs at slower speeds, it may take a long time to complete.
During this time, a CPU can be utilized by another process.
 The operating system allows the users to share the computer simultaneously. Since each action
or command in a time-shared system tends to be short, only a little CPU time is needed for each
user.
 As the system switches CPU rapidly from one user/program to the next, each user is given the
impression that he/she has his/her own CPU, whereas actually one CPU is being shared among
many users.

3. Multiprogramming Operating System-


Sharing the processor, when two or more programs reside in memory at the same time, is referred
as multiprogramming. Multiprogramming assumes a single shared processor. Multiprogramming
increases CPU utilization by organizing jobs so that the CPU always has one to execute.
The following figure shows the memory layout for a multiprogramming system.
An OS does the following activities related to multiprogramming.
 The operating system keeps several jobs in memory at a time.
 This set of jobs is a subset of the jobs kept in the job pool.
 The operating system picks and begins to execute one of the jobs in the memory.
 Multiprogramming operating systems monitor the state of all active programs and system
resources using memory management programs to ensures that the CPU is never idle, unless
there are no jobs to process.
Advantages-
 High and efficient CPU utilization.
 User feels that many programs are allotted CPU almost simultaneously.
Disadvantages-
 CPU scheduling is required.
 To accommodate many jobs in memory, memory management is required.

4. Time-sharing operating systems-

Time-sharing is a technique which enables many people, located at various terminals, to use a
particular computer system at the same time. Time-sharing or multitasking is a logical extension of
multiprogramming. Processor's time which is shared among multiple users simultaneously is termed as
time-sharing.
The main difference between Multiprogrammed Batch Systems and Time-Sharing Systems is
that in case of Multiprogrammed batch systems, the objective is to maximize processor use, whereas in
Time-Sharing Systems, the objective is to minimize response time.
Multiple jobs are executed by the CPU by switching between them, but the switches occur so
frequently. Thus, the user can receive an immediate response. For example, in a transaction processing,
the processor executes each user program in a short burst or quantum of computation. That is, if n users
are present, then each user can get a time quantum. When the user submits the command, the response
time is in few seconds at most.
The operating system uses CPU scheduling and multiprogramming to provide each user with a
small portion of a time. Computer systems that were designed primarily as batch systems have been
modified to time-sharing systems.
Advantages −
 Provides the advantage of quick response.
 Avoids duplication of software.
 Reduces CPU idle time.
Disadvantages −
 Problem of reliability.
 Question of security and integrity of user programs and data.
 Problem of data communication.

5. Multiprocessor System-
Multiprocessor operating system allows the multiple processors, and these processors are connected
with physical memory, computer buses, clocks, and peripheral devices.
Main objective of using multiprocessor operating system is to consume high computing power and
increase the execution speed of system.
There are mainly two types of multiprocessors i.e. symmetric and asymmetric multiprocessors

Types of Multiprocessors
There are mainly two types of multiprocessors i.e. symmetric and asymmetric multiprocessors. Details
about them are as follows −
a. Symmetric Multiprocessors
In these types of systems, each processor contains a similar copy of the operating system and they all
communicate with each other. All the processors are in a peer to peer relationship i.e. no master - slave
relationship exists between them.
An example of the symmetric multiprocessing system is the Encore version of Unix for the Multimax
Computer.
b. Asymmetric Multiprocessors
In asymmetric systems, each processor is given a predefined task. There is a master processor that gives
instruction to all the other processors. Asymmetric multiprocessor system contains a master slave
relationship.
Asymmetric multiprocessor was the only type of multiprocessor available before symmetric
multiprocessors were created. Now also, this is the cheaper option.

Advantages of Multiprocessor Systems


There are multiple advantages to multiprocessor systems. Some of these are −

 More reliable Systems


In a multiprocessor system, even if one processor fails, the system will not halt. This ability to continue
working despite hardware failure is known as graceful degradation. For example: If there are 5 processors in a
multiprocessor system and one of them fails, then also 4 processors are still working. So the system only
becomes slower and does not ground to a halt.

 Enhanced Throughput
If multiple processors are working in tandem, then the throughput of the system increases i.e. number of
processes getting executed per unit of time increase. If there are N processors then the throughput increases by an
amount just under N.

 More Economic Systems


Multiprocessor systems are cheaper than single processor systems in the long run because they share the data
storage, peripheral devices, power supplies etc. If there are multiple processes that share data, it is better to
schedule them on multiprocessor systems with shared data than have different computer systems with multiple
copies of the data.

Disadvantages of Multiprocessor Systems


There are some disadvantages as well to multiprocessor systems. Some of these are:

 Increased Expense
Even though multiprocessor systems are cheaper in the long run than using multiple computer systems, still they
are quite expensive. It is much cheaper to buy a simple single processor system than a multiprocessor system.

 Complicated Operating System Required


There are multiple processors in a multiprocessor system that share peripherals, memory etc. So, it is much more
complicated to schedule processes and impart resources to processes. Than in single processor systems. Hence, a
more complex and complicated operating system is required in multiprocessor systems.

 Large Main Memory Required


All the processors in the multiprocessor system share the memory. So a much larger pool of memory is required
as compared to single processor systems.

6. Distributed operating System-


A distributed system contains multiple nodes that are physically separate but linked together using the network.
All the nodes in this system communicate with each other and handle processes in tandem. Each of these nodes
contains a small part of the distributed operating system software.

A diagram to better explain the distributed system is −

Types of Distributed Systems


The nodes in the distributed systems can be arranged in the form of client/server systems or peer to peer systems.
Details about these are as follows −

Client/Server Systems
In client server systems, the client requests a resource and the server provides that resource. A server may serve
multiple clients at the same time while a client is in contact with only one server. Both the client and server
usually communicate via a computer network and so they are a part of distributed systems.

Peer to Peer Systems


The peer to peer systems contains nodes that are equal participants in data sharing. All the tasks are equally
divided between all the nodes. The nodes interact with each other as required as share resources. This is done
with the help of a network.

Advantages of Distributed Systems


Some advantages of Distributed Systems are as follows −

 All the nodes in the distributed system are connected to each other. So nodes can easily share data with
other nodes.
 More nodes can easily be added to the distributed system i.e. it can be scaled as required.
 Failure of one node does not lead to the failure of the entire distributed system. Other nodes can still
communicate with each other.
 Resources like printers can be shared with multiple nodes rather than being restricted to just one.
Disadvantages of Distributed Systems
 Some disadvantages of Distributed Systems are as follows −
 It is difficult to provide adequate security in distributed systems because the nodes as well as the
connections need to be secured.
 Some messages and data can be lost in the network while moving from one node to another.
 The database connected to the distributed systems is quite complicated and difficult to handle as
compared to a single user system.
 Overloading may occur in the network if all the nodes of the distributed system try to send data at once.

7. Real Time operating System


A real-time system 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. The time taken by the system to respond to an input
and display of required updated information is termed as the response time. So in this method, the response time
is very less as compared to online processing.

Real-time systems are used when there are rigid time requirements on the operation of a processor or the flow of
data and real-time systems can be used as a control device in a dedicated application. A real-time operating
system must have well-defined, fixed time constraints, otherwise the system will fail. For example, Scientific
experiments, medical imaging systems, industrial control systems, weapon systems, robots, air traffic control
systems, etc.
There are two types of real-time operating systems.

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 and the data is stored in ROM. In these systems, virtual memory is almost never
found.

Soft real-time systems


Soft real-time systems are less restrictive. A critical real-time task gets priority over other tasks and retains the
priority until it completes. Soft real-time systems have limited utility than hard real-time systems. For example,
multimedia, virtual reality, Advanced Scientific Projects like undersea exploration and planetary rovers, etc.

8. Mobile Operating System


Mobile operating system is one that controls smartphone personal digital assistant tablet PC and information
appliances. Mobile operating system also known as mobile o s, mobile platform Android operating system.it is
the Operating system that controls mobile devices.

There are two types of mobile operating system


1. Android
2. iOS(iPhone OS)
1. Android-
Android mobile operating system developed by Google based on modified version of Linux kernel other open
source software and design primarily for touch screen.

Linux is an Operating System for mobile devices such as smartphones and tablet PC based on Linux kernel.
Android applications are developed in Java language using Android software development kit.

once Develop Android applications can be package and easily sold out either through such as Google Play
Opera Mobile Store etc

Advantages of Android operating system


1. Android based on Linux
2. it is provides reach Browser facilities as well.
3. Android OS is open source and it is cost effective
4. Multitasking Operating System can be virtualize
5. It is a flexible operating system
6. Stability and security it's better than other mobile operating system as it is based on Linux kernel.
7. Android TV customizable user can change all most everything in the UI.
Disadvantages of Android operating system
1. Application quality of Android operating system not good.
2. Complex layout and animations are Harder to code in Android
3. Android OS can also slow down if installing more apps
4. Complexity involved in Android app development makes the process more time consuming than that of an ios
group
2. . iOS (iPhone OS)-
iOS Mobile operating system created and developed by apple operating system that presently power meaning of
the company's mobile devices including the iPhone, iPad and iPod Touch it is the second most popular operating
system globally after Android.
The iOS user interface is based upon direct manipulation using multi-touch gesture
interface control element consists of slider,switches and buttons
Advantages of iOS operating system-
1. iOs provides customer service.
2.iOS has security which offer its user stay safe from external threats
3. Performance is awesome and support multitasking
4.iOS Support a vast number of application.
Disadvantages of iOS system
1.No flexible only support iOS services
2.The iOS is not open source
3. iOS is costly Apps Development
4.iOS is not customizable

Difference between Android and iOS

Sr Parameter Android iOS


no.

1 Source model Open source Closed with open source


components

2 Os Family Linux Unix

3. Language used C,C++,JAVA C,C++

4 Customizability a lot can change almost Limited


everything

5 Widgets yes no

6 File transfer easier than iOS more difficult

7 App store Google Play Store Apple Play Store


8. Speed of development more time consuming and Fast
slow

9. Security Low High

10 Performance Low Excellent

1.3 Command Line Based OS and GUI Based OS-


An Operating System provides an interface through which the user interacts with the system. The user interact
with the computer system through its user interface(UI).
One of the the most important function of operating system is providing a user interface. Which allows user to
access and interact with the computer system
There are two interface of operating system.
1. Command line interface(CLI) based OS -
In CLI user interact with operating system by typing commands or instructions on a command line.
various commands needs to be type for carrying out various jobs like creating , deleting, editing renaming for
printing a file.
In CLI each command represents an executable program which is Run in the command is type with proper
parameter.
Advantages-
1. The user knows correct commands then this type of interface can be much faster than any
other type of interface.
2. This type of interface needs much less memory(RAM) as compared to other interface.
3. CLI does not use as much CPU processing time like other UIs.
Disadvantages-
1.CLI are not user friendly because they require the user to remember a lot of command.
2. ,command have to be typed correctly, if there is a spelling mistake then ,command will not respond.
There are various ,command line based operating system

1. MS DOS-
MS Dos(Microsoft disk operating system) is non graphical ,command line operating system created for IBM
compatible computers.
MS Dos uses CUI(character user interface)or command line interfacethe user interact with the compute rwith the
help of predefined commands.
DOS Commands are executed by a command line interpreter by translating them into system call.
Generally this interpreter outside the kernel so that kernel is not affected by the user.
some MS DOS command include CD,DIR,DEL,EDIT ,MOVE,REN,CLS.
2.UNIX-
Unix was originally developed in 1969 by of group of AT&T employees Ken Thompson,Dennis Ritchie
,Douglas Mcllory and Joe Ossanna at bells lab.
It is a CLI based operating system the Unix shell is a command line interface similar to the DOS operating
system.
a Shell is program that provides the command line interface it inputs command from user,interpret them and
execute them,using the shell press enter user type ,command press enter and the command is immediately
executed.
2. Graphical user interface (GUI) Based OS-
GUI is alternative and more user friendly method to interface with operating system.
GUI provides a rectangular area on a screen called window.In which files programs directory and system
functions are represented as a small images or symbols called as icon.
In addition various menus are provided by GUI.
A GUI provides the window and Menu based graphical interface that can be operated by using a pointing
device like mouse
Mouse can be used to point and click on command button pictures or Icon execute the command,open folder or
run the program.

Advantages-

1.GUIs are easy to use,operate and provide better accessibility.


2.User can switch quickly between the task on the GUI interface.
3.GUI allows multiple program and its instances to be displayed simultaneously.
4.GUI is convenient and user-friendly.

Disadvantages-

1.It uses more Computer memory.


2.GUI become more complex if user needs to communicate with the computer directly
3.Difficult to display all necessary control because of Limited Windows space.
4.Slow speed because of long pointer operation.

There are two GUI based operating system.

1.Windows
2.Linux

1.Windows-

It series of operating system developed by the Microsoft.


Each version of Windows includes graphical user interface with desktop that allows a user to view a files.
Microsoft Windows is designed for both home computer and professional purpose fast version of Windows
includes Windows 3.0(1990), Windows 3.1 (1992),Windows 95 (1995),
Windows 98(1998),Windows ME(2000),Windows XP (2001) Windows Vista(2006),Windows 7(2009) etc.
The Current version Windows 10 was release on 29 July 2015.

2. Linux-

Linux is unix-like operating system created by LinusTorvalds. Linux each Freely Distributed Operating System.
Today Linux is used by millions of people around the world programmer can even modify the source code and
create their own unique version of the Linux operating system.
Some of the popular version of Linux Red Hat Enterprise, cent OS, and Ubuntu.
Most Linux System provide either K Desktop environment (KDE) or GNOME interface.
GNOME stands for GNU network object model environment is one of the oldest and most widely used Linux
Desktop Environment.

Difference between CLI and GUI

Sr CLI GUI
no.

1 It is a text based interface used to interact Including Windows icon and images It is
with software and operating system by visual based interface which features the use
typing the ,commands of graphical images

2 It is faster and difficult to use than GUI It is slower and easier to use than CLI

3. It consume low memory it consume high memory

4 In CLI Command have to be typed in the In GUI one can point and click on icon to
command line to execute them. execute ,commands

5 Not much flexible it is more flexible

6 CLI is a less user-friendly GUI is user friendly

7 Examples: DOS,UNIX Examples: Windows and Linux

You might also like