Os Unit I
Os Unit I
Introduction
An operating system is important software which makes the computer to run. It handles all the computer processes
and runs the hardware. It makes you to communicate with computer without having command on its language. It is
seen that your computer operating system manages all software and hardware functions. The main idea of
operating system is to coordinate will all processes and links these processes with central processing unit (CPU),
memory and storage.
Introduction of Software:
Software is a set of instructions, data or programs used to operate computers and execute specific tasks. It is the
opposite of hardware, which describes the physical aspects of a computer. Software is a generic term used to refer
to applications, scripts and programs that run on a device.
The two main categories of software are application software and system software. An application is software that
fulfills a specific need or performs tasks. System software is designed to run a computer's hardware and provides a
platform for applications to run on top of.
Early software was written for specific computers and sold with the hardware it ran on
Among the various categories of software, the most common types include the following:
Application software
The most common type of software, application software is a computer software package that performs a specific
function for a user, or in some cases, for another application. An application can be self-contained, or it can be a
group of programs that run the application for the user. Examples of modern applications include office suites,
graphics software, databases and database management programs, web browsers, word processors, software
development tools, image editors and communication platforms.
System software.
System software is a type of computer program that is designed to run a computer's hardware and application
programs. If we think of the computer system as a layered model, the system software is the interface between the
hardware and user applications. The operating system is the best-known example of system software. The OS
manages all the other programs in a computer.
System software is used to manage the computer itself. It runs in the background, maintaining the computer's basic
functions so users can run higher-level application software to perform certain tasks.
computer manufacturers usually develop the system software as an integral part of the computer. The primary
responsibility of this software is to create an interface between the computer hardware they manufacture and the
end user.
System software generally includes the following features:
1. High speed. System software must be as efficient as possible to provide an effective platform for higher-level
software in the computer system.
2. Hard to manipulate. It often requires the use of a programming language, which is more difficult to use than
a more intuitive user interface (UI).
3. Written in a low-level computer language. System software must be written in a computer language the
central processing unit (CPU) and other computer hardware can read.
4. Close to the system. It connects directly to the hardware that enables the computer to run.
5. Versatile. System software must communicate with both the specialized hardware it runs on and the
higher-level application software that is usually hardware-agnostic and often has no direct connection to the
hardware it runs on.
Driver software
Also known as device drivers, this software is often considered a type of system software. Device drivers control
the devices and peripherals connected to a computer, enabling them to perform their specific tasks. Every device
that is connected to a computer needs at least one device driver to function. Examples include software that comes
with any nonstandard hardware, including special game controllers, as well as the software that enables standard
hardware, such as USB storage devices, keyboards, headphones and printers.
Programming software.
Computer programmers use programming software to write code. Programming software and programming tools
enable developers to develop, write, test and debug other software programs. Examples of programming software
include assemblers, compilers, debuggers and interpreters.
Embedded Software
Developers embed this software into hardware as a part of larger systems to control their various functions. The
systems’ ROM (Read Only Memory) embeds this type of software. For example, Keypad control software
embedded in a microwave oven or washing machine where there is a need to take input, analyze and decide and
take action, which allows the product to perform in the desired manner. People also refer to this software as
intelligent software because of its performance.
Web Applications
Users access it as an application via web browsers over a network such as the Internet or an intranet. It is also a
computer software application that developers code in a browser support language and that relies on a common
web browser to render the application executable. The first generation of web applications allows the business to
post the information publicly. Thus, anyone with a web browser and internet access can see this information. The
problem with the first generation is that the information is in static form. The second-generation web applications
allow users to do interactive queries against databases from a web application.
This software uses non-numerical algorithms that use the data generated in the system to solve complex problems
that are not amenable to problem-solving procedures and require specific Analysis and interpretation of the
problem to solve it. For example, Artificial neural networks, robotics, expert systems, and computer games. All
this software can run either in real-time mode or offline mode. Users can share these software programs free of
charge through storage.
The BIOS (basic input/output system) gets the computer system started after it's turned on and manages the data
flow between the OS and attached devices, such as the hard drive, video adapter, keyboard, mouse and printer.
● An assembler takes basic computer instructions and converts them into a pattern of bits that the
computer's processor can use to perform its basic operations.
● A device driver controls a particular type of device that is attached to your computer, such as a keyboard or
mouse. The driver program converts the more general I/O instructions of the OS.
Operating systems
The computer's OS is a well-known example of system software. Widely used operating systems include Microsoft
Windows, macOS and Linux. Unlike other system software types, the average computer user regularly interacts
with the computer OS through its graphical UI (GUI) and, with some operating systems, a less complex
command-line interface (CLI).
An operating system is a collection of programs that controls the running of programs and organizes the resources
of a computer system. These resources are the hardware components of the system, such as keyboards, printers,
monitors, and disk drives.
Important tasks performed by the operating system
The main responsibility of the operating system is to manage a computer's software and hardware resources. It is
the computer's main control program. The OS controls and maintains a record of all other programs on the
computer, including both application and system software. The OS creates an environment that all other computer
programs run within and provides service to those other applications.
Operating systems perform tasks. Five of the most important ones are the following:
1. File management and process scheduling. The OS allocates resources and prioritizes which programs should
receive the resources and in what order. For example, a digital audio workstation application may require a
certain level of processing power when being used. The OS decides how much power the application gets from
the CPU and manages the effects of that allocation on other applications. If a more critical process is
happening elsewhere on the computer, the OS might sacrifice some of the power the digital audio workstation
has requested, for example, to ensure the other process can be completed.
2. Processor and memory management. The OS allocates the computer's memory to a process when needed
and deallocates it when the process is finished.
3. Error detection. The OS detects, tracks and debugs errors in the computer's other programs.
4. Security. The OS uses passwords to protect the computer's programs and data from unauthorized access.
5.Control and management. The OS uses compilers, assemblers and interpreters to control and manage other
programs on the computer. These language processers are pieces of system software that translate the high-level
languages -- Java, Python and C++ -- that many computer programs are written in into low-level machine code
instructions, which is essentially a series of 1s and 0s that the computer's CPU can read.
What is a Program?
A program is a set of instruction codes that has been designed to complete a certain task. It is a passive entity
stored in the secondary memory of the computer system. A program is considered as a passive and static entity.
A program is like a file which contains a set of instruction codes stored on a disk in the form of an executable file.
A program contains instructions written in any programming language. Programs have an unlimited span of time.
What is a Process?
A process is an instance of a program that is being currently executed. It is a dynamic and active entity of a
program. Processes are created when the programs are executing and they reside in the main memory.
A process exists only for a limited time, and hence gets terminated as soon as the task completes. A process
always consists of instructions written in machine language. A process c
The following table highlights the important differences between a program and a process −
Program Process
It resides in the secondary memory of the It is created when a program is in execution and
system. is being loaded into the main memory.
It exists in a single place and continues to It exists for a limited amount of time and it gets
exist until it has been explicitly deleted. terminated once the task has been completed.
It doesn't have a control block. It has its own control block, which is known as
Process Control Block.
A computer system holds various resources like processors, memories, timers, disks, printers, and many others.
The OS manages these resources and allocates them to particular programs.
As a resource manager, OS provides controlled allocation of the processors, memories, and I/O devices among
various programs.
Therefore OS is also called a Resource Allocator, which is one of the main features of an OS.
In the computer system, multiple user programs are running simultaneously.
The CPU itself is one kind of resource and the OS decides how much processor time should be given for the
execution of a particular user program.
OS also manages memory and I/O devices when multiple users are working simultaneously.
The main goal of the OS is to keep the track of which programs are using which resources, to grant resource
requests, account for usage, and to resolve conflicting requests from different programs and users.
An OS is the one form of the control program.
This control program controls the execution of user programs to prevent any errors and improper use of computer
system resources.
When a resource is shared in time, different programs can take the chance to use it.
The first one gets the chance to use the resource, then the second, then another, likewise.
For example, CPU and printer are timely shared resources, where OS decides who will use it and for how much
time duration.
The best example of in-time sharing is CPU Scheduling on OS.
The other kind of resource sharing is in-space sharing, in this, the users share the space of resource.
For example, both primary and secondary memories are space shared, where OS allocates them to the user
program and keeps the track of it.
The best example of in-space sharing is when the main memory consists of several processes at a time so that the
processes can share the resources.
Hardware
The hardware consists of the memory, CPU, arithmetic-logic unit, various bulk storage devices, I/O,
peripheral devices and other physical devices.
Kernel
In computing, the kernel is the central component of most computer operating systems; it is a bridge
between applications and the actual data processing done at the hardware level. The kernel's
responsibilities include managing the system's resources (the communication between hardware and
software components). Usually as a basic component of an operating system, a kernel can provide the
lowest-level abstraction layer for the resources (especially processors and I/O devices) that application
software must control to perform its function. It typically makes these facilities available to application
processes through inter-process communication mechanisms and system calls.
Shell
A shell is a piece of software that provides an interface for users to an operating system which provides
access to the services of a kernel. The name shell originates from shells being an outer layer of interface
between the user and the innards of the operating system (the kernel).
Operating system shells generally fall into one of two categories: command-line and graphical.
Command-line shells provide a command-line interface (CLI) to the operating system, while graphical
shells provide a graphical user interface (GUI). In either category the primary purpose of the shell is to
invoke or "launch" another program; however, shells frequently have additional capabilities such as
viewing the contents of directories.
Application:
The application represents the software that a user is running on an operating system it can be either system or
application software eg slack, sublime text editor, etc.
The batch operating system grouped jobs that perform similar functions. These job groups are treated as a batch
and executed simultaneously.
Types of Batch Operating System
There are mainly two types of the batch operating system. These are as follows:
Simple Batched System
Multi-programmed batched system
distributed system
A distributed system is a model where distributed applications are running on multiple computers linked by a
communications network. Sometimes it is also called loosely coupled systems because in which each processor
has its own local memory and processing units. LOCUS and MICROS are some examples of distributed operating
systems.
Advantages of Distributed Systems:
Scalability: Distributed systems can be easily scaled by adding more computers to the network.
Fault Tolerance: Distributed systems can recover from failures by redistributing work to other computers in the
network.
Geographical Distribution: Distributed systems can be geographically distributed, allowing for better performance
and resilience.
Multitasking OS
The multitasking OS is also known as the time-sharing operating system as each task is given some time so that all
the tasks work efficiently. This system provides access to a large number of users, and each user gets the time of
CPU as they get in a single system. The tasks performed are given by a single user or by different users. The time
allotted to execute one task is called a quantum, and as soon as the time to execute one task is completed, the
system switches over to another task.
Advantages of Multitasking OS
● Each task gets equal time for execution.
● The idle time for the CPU will be the lowest.
● There are very few chances for the duplication of the software.
Disadvantages of Multitasking OS
● Processes with higher priority cannot be executed first as equal priority is given to each process or task.
● Various user data is needed to be taken care of from unauthorized access.
● Sometimes there is a data communication problem.
Examples of Multitasking OS: UNIX, etc.
Network OS
Network operating systems are the systems that run on a server and manage all the networking functions. They
allow sharing of various files, applications, printers, security, and other networking functions over a small network
of computers like LAN or any other private network. In the network OS, all the users are aware of the
configurations of every other user within the network, which is why network operating systems are also known as
tightly coupled systems.
Advantages of Network OS
● New technologies and hardware can easily upgrade the systems.
● Security of the system is managed over servers.
● Servers can be accessed remotely from different locations and systems.
● The centralized servers are stable.
Disadvantages of Network OS
● Server costs are high.
● Regular updates and maintenance are required.
● Users are dependent on the central location for the maximum number of operations.
Examples of Network OS: Microsoft Windows server 2008, LINUX, etc.
Real-Time OS
Real-Time operating systems serve real-time systems. These operating systems are useful when many events occur
in a short time or within certain deadlines, such as real-time simulations.
Mobile OS
A mobile OS is an operating system for smartphones, tablets, and PDA’s. It is a platform on which other
applications can run on mobile devices.
Advantages of Mobile OS
● It provides ease to users.
Disadvantages of Mobile OS
● Some of mobile operating systems give poor battery quality to users.
● Some of the mobile operating systems are not user-friendly.
Examples of Mobile OS: Android OS, ios, Symbian OS, and Windows mobile OS.
Single User
Single User Single-Tasking
Single User Multi-Tasking
Single-User/Single-Tasking OS
An operating system that allows a single user to perform only one task at a time is called a Single-User
Single-Tasking Operating System. Functions like printing a document, downloading images, etc., can be
performed only one at a time. Examples include MS-DOS, Palm OS, etc.
Advantages
● This operating system occupies less space in memory.
● Easy to maintain.
● Less chance of damage.
● This is a single-user interface it allows only one user’s tasks to execute in a given time.
Disadvantages
● It can perform only a single task at a time.
Tasks take longer to complete.
It has a high response time.
Single-User Multi-Tasking:
Operating system allows a single user to execute multiple programs at the same time, the single user can
perform multiple tasks at a time. This type of operating system is found on personal desktops and laptops. The
most popular single-user multi-tasking is Microsoft windows.
Example: Windows, Mac
Advantages:
● Time-saving
● High productivity in less time frame
● Less memory is used
Disadvantage:
● Require more space
● More complexity
Multiuser
Multiuser/Multitasking OS
It is an operating system that permits several users to utilize the programs that are concurrently running on a single
network server. The single network server is termed as "Terminal server". "Terminal client" is a software that
supports user sessions. Examples include UNIX, MVS, etc.
Advantages
It is highly productive as it performs multiple tasks at a time.
It is time saving as we don’t have to make changes in many desktops, instead can make changes only to the
server.
Disadvantages
If the connection to the server is broken, user cannot perform any task on the client as it is connected to that
server.
Memory Management
The operating system manages the Primary Memory or Main Memory. Main memory is made up of a large array
of bytes or words where each byte or word is assigned a certain address. Main memory is fast storage and it can be
accessed directly by the CPU. For a program to be executed, it should be first loaded in the main memory. An
Operating System performs the following activities for Memory Management:
● It keeps track of primary memory, i.e., which bytes of memory are used by which user program. The memory
addresses that have already been allocated and the memory addresses of the memory that has not yet been
used.
● In multiprogramming, the OS decides the order in which processes are granted memory access, and for how
long.
● It Allocates the memory to a process when the process requests it and deallocates the memory when the
process has terminated or is performing an I/O operation.
Processor Management
In a multi-programming environment, the OS decides the order in which processes have access to the processor,
and how much processing time each process has. This function of OS is called Process Scheduling. An Operating
System performs the following activities for Processor Management.
Keeps track of the status of processes. The program which performs this task is known as a traffic controller.
Allocates the CPU that is a processor to a process. De-allocates processor when a process is no more required.
Device Management
An OS manages device communication via its respective drivers. It performs the following activities for device
management. Keeps track of all devices connected to the system. designates a program responsible for every
device known as the Input/Output controller. Decides which process gets access to a certain device and for how
long. Allocates devices effectively and efficiently. Deallocates devices when they are no longer required.
File Management
A file system is organized into directories for efficient or easy navigation and usage. These directories may contain
other directories and other files. An Operating System carries out the following file management activities. It
keeps track of where information is stored, user access settings, the status of every file, and more. These facilities
are collectively known as the file system.
Security
The operating system uses password protection to protect user data and similar other techniques. it also prevents
unauthorized access to programs and user data.
Control Over System Performance
Monitors overall system health to help improve performance. records the response time between service requests
and system response to having a complete view of the system’s health. This can help improve performance by
providing important information needed to troubleshoot problems.
● Virtualization: Operating systems can provide Virtualization capabilities, allowing multiple operating systems
or instances of an operating system to run on a single physical machine. This can improve resource utilization
and provide isolation between different operating systems or applications.
● Networking: Operating systems provide networking capabilities, allowing the computer system to connect to
other systems and devices over a network. This can include features such as network protocols, network
interfaces, and network security.
● Scheduling: Operating systems provide scheduling algorithms that determine the order in which tasks are
executed on the system. These algorithms prioritize tasks based on their resource requirements and other
factors to optimize system performance.
● Inter process Communication: Operating systems provide mechanisms for applications to communicate with
each other, allowing them to share data and coordinate their activities.
● Performance Monitoring: Operating systems provide tools for monitoring system performance, including
CPU usage, memory usage, disk usage, and network activity. This can help identify performance bottlenecks
and optimize system performance.
● Backup and Recovery: Operating systems provide backup and recovery mechanisms to protect data in the
event of system failure or data loss.
● Debugging: Operating systems provide debugging tools that allow developers to identify and fix software
bugs and other issues in the system.
Parallel Systems:
Parallel Systems are designed to speed up the execution of programs by dividing the programs into multiple
fragments and processing these fragments at the same time. Flynn has classified computer systems into four types
based on parallelism in the instructions and in the data streams.
1. Single Instruction stream, single data stream
2. Single Instruction stream, multiple data stream
3. Multiple Instruction stream, single data stream
4. Multiple Instruction stream, multiple data stream
Microsoft Windows
Microsoft created the Windows operating system in the mid-1980s. There have been many different versions of
Windows, but the most recent ones 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.
macOS
macOS (previously called OS X) is a line of operating systems created by Apple. It comes preloaded on all
Macintosh computers, or Macs. Some of the specific versions include Mojave (released in 2018), High
Sierra (2017), and Sierra (2016).
According to StatCounter Global Stats, macOS users account for less than 10% of global operating
systems—much lower than the percentage of Windows users (more than 80%). One reason for this is that Apple
computers tend to be more expensive. However, many people do prefer the look and feel of macOS over Windows.
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. This is different from proprietary software like Windows, which can
only be modified by the company that owns it. The advantages of Linux are that it is free, and there are many
different distributions—or versions—you can choose from.
operating systems for Workstation
there are huge numbers of Operating systems developed in the past 2 to 3 decades. Every computing device has
some sort of operating system that runs within it, similarly the workstations also supports many operating systems
but there are four main operating systems that are currently used every where. These four main operating systems
for the workstations are
Windows OS
The Microsoft Windows family of operating systems has been the largest installation operating systems in the
desktop and laptop PC market. Windows family is developed by the American company i.e. Microsoft and these
are commercial operating systems which means that we can only use these when we purchase its license from the
company
Linux OS
Linux was developed in 1991 by Linus Torvalds and it is one of the derivative of UNIX. Linux is also the least
popular operating system for workstation installation.
Linux is open source operating system which means that anyone can download it, use it and can modify it
according to their will. Linux is basically a command-line operating system.
Mac OS
Apple introduced the Macintosh computer in 1984 and it had a very easy-to-use interface — the first popular
WIMP(Window, Icon, Menu and Pointer) interface. The OS on the first Mac was simply called System. Mac OS
X has also user friendly interfaces like windows and these are also a commercial operating systems which require
proper license before use it. These are used in high visual projects because they have high definition graphics as
compared to all other types of operating systems.
Chrome OS
Chrome OS was developed by Google and launched in 2011. Chrome OS is supposed to be lightweight and
perform the most common tasks users need today. Chrome desktop looks like most other modern OS desktops,
with a launcher in the lower-left corner, a taskbar, and status tray with a clock in the lower-right corner.
Palm OS:
Since the Palm Pilot was introduced in 1996, the Palm OS platform has provided various mobile devices with
essential business tools, as well as the capability that they can access the internet via a wireless connection.
These devices have mainly concentrated on providing basic personal-information-management applications. The
latest Palm products have progressed a lot, packing in more storage, wireless internet, etc.
Symbian OS:
It has been the most widely-used smartphone operating system because of its ARM architecture before it was
discontinued in 2014. It was developed by Symbian Ltd.
This operating system consists of two subsystems where the first one is the microkernel-based operating system
which has its associated libraries and the second one is the interface of the operating system with which a user can
interact.
Since this operating system consumes very less power, it was developed for smartphones and handheld devices.
It has good connectivity as well as stability.
It can run applications that are written in Python, Ruby, .NET, etc.
Linux OS:
● Linux OS is an open-source operating system project which is a cross-platform system that was developed
based on UNIX.
It was developed by Linus Torvalds. It is a system software that basically allows the apps and users to perform
some tasks on the PC.
● Linux is free and can be easily downloaded from the internet and it is considered that it has the best community
support.
● Linux is portable which means it can be installed on different types of devices like mobile, computers, and
tablets.
● It is a multi-user operating system.
● Linux interpreter program which is called BASH is used to execute commands.
● It provides user security using authentication features.
Windows OS:
● Windows is an operating system developed by Microsoft. Its interface which is called Graphical User
Interface eliminates the need to memorize commands for the command line by using a mouse to navigate
through menus, dialog boxes, and buttons.
● It is named Windows because its programs are displayed in the form of a square. It has been designed for both
a beginner as well professional.
● It comes preloaded with many tools which help the users to complete all types of tasks on their computer,
mobiles, etc.
● It has a large user base so there is a much larger selection of available software programs.
● One great feature of Windows is that it is backward compatible which means that its old programs can run on
newer versions as well.
Android OS:
It is a Google Linux-based operating system that is mainly designed for touchscreen devices such as phones,
tablets, etc.
There are three architectures which are ARM, Intel, and MIPS which are used by the hardware for supporting
Android. These lets users manipulate the devices intuitively, with movements of our fingers that mirror some
common motions such as swiping, tapping, etc.
Android operating system can be used by anyone because it is an open-source operating system and it is also
free.It offers 2D and 3D graphics, GSM connectivity, etc.There is a huge list of applications for users since Play
Store offers over one million apps.Professionals who want to develop applications for the Android OS can
download the Android Development Kit. By downloading it they can easily develop apps for android.