[go: up one dir, main page]

0% found this document useful (0 votes)
15 views18 pages

PDF Document

An operating system (OS) is essential software that manages computer hardware and provides an interface for users to execute programs efficiently. It allocates resources, handles input/output operations, and ensures security and communication between processes. Various types of operating systems exist, including batch, time-sharing, and distributed systems, each with distinct advantages and disadvantages.

Uploaded by

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

PDF Document

An operating system (OS) is essential software that manages computer hardware and provides an interface for users to execute programs efficiently. It allocates resources, handles input/output operations, and ensures security and communication between processes. Various types of operating systems exist, including batch, time-sharing, and distributed systems, each with distinct advantages and disadvantages.

Uploaded by

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

Introduction to Operating System

A computer without a program running is just an inert hunk of electronics. The


first thing a computer has to do when it is turned on is to start up a special
program called an operating system. The operating system’s job is to help
other computer programs work by handling the messy details of controlling the
computer’s hardware.

An operating system act as an intermediary between the user of a computer and


computer hardware. The purpose of an operating system is to provide an
environment in which a user can execute programs conveniently and
efficiently.
An operating system is software that manages computer hardware. The
hardware must provide appropriate mechanisms to ensure the correct operation
of the computer system and to prevent user programs from interfering with the
proper operation of the system.
A more common definition is that the operating system is the one program
running at all times on the computer (usually called the kernel), with all else
being application programs.

Fig1: Conceptual view of a computer system

An operating system is concerned with the allocation of resources and services,


such as memory, processors, devices, and information. The operating system
correspondingly includes programs to manage these resources, such as a traffic
controller, a scheduler, a memory management module, I/O programs, and a file
system.
OS Is Designed to Serve Two Basic Purposes
1. It controls the allocation and use of the computing System’s resources
among the various user and tasks.
2. It provides an interface between the computer hardware and the
programmer that simplifies and makes it feasible for coding and
debugging of application programs.

Features of Operating system


A good operating system is built with the following principles in mind
• Convenience: An OS makes a computer more convenient to use.
• Efficiency: An OS allows the computer system resources to be used
efficiently.
• 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).

The Operating system must support the following tasks


1. Provides the facilities to create and modify of programs and data files
using an editor.
2. Access to the compiler for translating the user program from high-level
language to machine language.
3. Provide a loader program to move the compiled program code to the
computer’s memory for execution.
4. Provide routines that handle the details of I/O programming.

Why we Need Operating System


• To serve as platform for apps: The OS provides a platform, on top of
which, other programs, called application programs can run
• Manage I/O unit: the OS also allows the computer to manage its own
resources such as memory, monitor, keyboard, printer, etc. Management
of these resources is required for effective utilization.
• Provide consistent UI: OS provides the user with an easy-to-work user
interface, so the user doesn’t have to learn a different UI every time and
can focus on the content and be productive as quickly as possible.
• Multitasking: Operating System manages memory and allows multiple
programs to run in their own space and even communicate with each
other through shared memory
Operating System: More Insight
An Operating System acts as a communication bridge (interface) between the
user and computer hardware. The purpose of an operating system is to provide
a platform on which a user can execute programs in a convenient and efficient
manner.
An operating system is a piece of software that manages the allocation of
computer hardware. The coordination of the hardware must be appropriate to
ensure the correct working of the computer system and to prevent user
programs from interfering with the proper working of the system.
Example: Just like a boss gives orders to his employee, in a similar way we
request or pass our orders to the Operating System. The main goal of the
Operating System is to make the computer environment more convenient to
use and Secondary goal is to use the resources in the most efficient manner.

The goal of an Operating System: The fundamental goal of an Operating


System is to execute user programs and to make tasks easier. Various
application programs along with hardware systems are used to perform this
work. Every general-purpose computer consists of hardware, an operating
system(s), system programs, and application programs. The hardware consists
of memory, CPU, ALU, I/O devices, peripheral devices, and storage devices.
The system program consists of compilers, loaders, editors, OS, etc. The
application program consists of business programs and database programs.
Characteristics of operating systems
• 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.

• Interprocess 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.
Operating System Services
What is really an Operating System?
The main purpose of operating system is to provide environment for execution
of programs. Thus, an operating System also provides certain services to the
computer system in one form or the other. It can be listed in the following
manner:
1. Program Execution: The Operating System is responsible for the
execution of all types of programs whether it be user programs or system
programs. The Operating System utilizes various resources available for the
efficient running of all types of functionalities.

2. Handling Input/output Operations: The Operating System is responsible


for handling all sorts of inputs, i.e, from the keyboard, mouse, desktop, etc.
The Operating System does all interfacing in the most appropriate manner
regarding all kinds of Inputs and Outputs.
For example, there is a difference in the nature of all types of peripheral
devices such as mice or keyboards, the Operating System is responsible for
handling data between them.

3. Manipulation of File System: The Operating System is responsible for


making decisions regarding the storage of all types of data or files, i.e,
floppy disk/hard disk/pen drive, etc. The Operating System decides how the
data should be manipulated and stored.

4. Error Detection and Handling: The Operating System is responsible for


the detection of any type of error or bugs that can occur while any task. The
well-secured OS sometimes also acts as a countermeasure for preventing
any sort of breach to the Computer System from any external source and
probably handling them.

5. Resource Allocation: The Operating System ensures the proper use of all
the resources available by deciding which resource to be used by whom for
how much time. All the decisions are taken by the Operating System.
6. Accounting: The Operating System tracks an account of all the
functionalities taking place in the computer system at a time. All the details
such as the types of errors that occurred are recorded by the Operating
System.

7. Information and Resource Protection: The Operating System is


responsible for using all the information and resources available on the
machine in the most protected way. The Operating System must foil an
attempt from any external resource to hamper any sort of data or
information.

8. Communication: The various processes executing on a system may need


to communicate in order to exchange data or information. Operating system
provides this communication by using a facility of message passing. In
message passing packets of information are moved between processes by
operating system.

9. User interface. Almost all operating systems have a user interface (UI). This
interface can take several forms. Most commonly, a graphical user interface
(GUI) is used. Here, the interface is a window system with a mouse that
serves as a pointing device to direct I/O, choose from menus, and make
selections and a keyboard to enter text. Mobile systems such as phones and
tablets provide a touch-screen interface, enabling users to slide their fingers
across the screen or press buttons on the screen to select choices. Another
option is a command-line interface (CLI), which uses text commands and a
method for entering them (say, a keyboard for typing in commands in a
specific format with specific options). Some systems provide two or all three
of these variations.

There are several ways for users to interface with the operating system.
Here, we discuss three fundamental approaches. One provides a command-
line interface, or command interpreter, that allows users to directly enter
commands to be performed by the operating system. The other two allow
users to interface with the operating system via a graphical user interface, or
GUI.
a. Command Interpreters: Most operating systems, including Linux,
UNIX, and Windows, treat the command interpreter as a special program
that is running when a process is initiated or when a user first logs on (on
interactive systems). On systems with multiple command interpreters to
choose from, the interpreters are known as shells.

b. Graphical User Interface A second strategy for interfacing with the


operating system is through a user- friendly graphical user interface, or
GUI. Here, rather than entering commands directly via a command-line
interface, users employ a mouse-based window- and-menu system
characterized by a desktop metaphor. The user moves the mouse to
position its pointer on images, or icons, on the screen (the desktop) that
represent programs, files, directories, and system functions. Depending on
the mouse pointer’s location, clicking a button on the mouse can invoke a
program, select a file or directory—known as a folder—or pull down a
menu that contains commands.
c. Touch-Screen Interface either
a command-line interface or a
mouse-and-keyboard system is
impractical for most mobile
systems, smartphones and
handheld tablet computers
typically use a touch-screen
interface. Here, users interact by
making gestures on the touch
screen for example, pressing
and swiping fingers across the
screen. Although earlier
smartphones included a
physical keyboard, most
smartphones and tablets now
simulate a keyboard on the
touch screen.
All these services are ensured by the Operating System for the convenience
of the users to make the programming task easier. All different kinds of
Operating systems more or less provide the same services.

Examples of Operating Systems


1. Windows (GUI-based, PC)
2. GNU/Linux (Personal, Workstations, ISP, File, and print server, Three-
tier client/Server)
3. macOS (Macintosh), used for Apple’s personal computers and
workstations (MacBook, iMac).
4. Android (Google’s Operating System for
smartphones/tablets/smartwatches)
5. iOS (Apple’s OS for iPhone, iPad, and iPod Touch)

History of Operating system: The operating system has been evolving through
the years. The following table shows the history of OS.
Generation Year Electronic device used Types of OS Devices
First 1945-55 Vacuum Tubes Plug Boards
Second 1955-65 Transistors Batch Systems
Third 1965-80 Integrated Circuits(IC) Multiprogramming
Fourth Since 1980 Large Scale Integration PC
Types of Operating Systems

Some widely used operating systems are as follows-

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
group 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 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 based Operating System: Payroll System, Bank
Statements, etc.
2. Time-Sharing Operating Systems
Each task is given some time to execute so that all the tasks work
smoothly. Each user gets the time of CPU as they use a single system.
These systems are also known as Multitasking Systems. The task can be
from a single user or different users also. The time that each task gets to
execute is called quantum. After this time interval is over OS switches
over to the next task. Example: Multics, Unix, etc.

Advantages of Time-Sharing OS:


• Each task gets an equal opportunity
• Fewer chances of duplication of software
• CPU idle time can be reduced
• Resource Sharing: Time-sharing systems allow multiple users to share
hardware resources such as the CPU, memory, and peripherals, reducing
the cost of hardware and increasing efficiency.
• Improved Productivity: Time-sharing allows users to work concurrently,
thereby reducing the waiting time for their turn to use the computer. This
increased productivity translates to more work getting done in less time.
• Improved User Experience: Time-sharing provides an interactive
environment that allows users to communicate with the computer in real-
time, providing a better user experience than batch processing.
Disadvantages of Time-Sharing OS:
• Reliability problem
• One must have to take care of the security and integrity of user programs
and data
• Data communication problem
• High Overhead: Time-sharing systems have a higher overhead than other
operating systems due to the need for scheduling, context switching, and
other overheads that come with supporting multiple users.
• Complexity: Time-sharing systems are complex and require advanced
software to manage multiple users simultaneously. This complexity
increases the chance of bugs and errors.
• Security Risks: With multiple users sharing resources, the risk of security
breaches increases. Time-sharing systems require careful management of
user access, authentication, and authorization to ensure the security of data
and software.

Examples of Time-Sharing OS

• IBM VM/CMS: IBM VM/CMS is a time-sharing operating system that


was first introduced in 1972. It is still in use today, providing a virtual
machine environment that allows multiple users to run their own instances
of operating systems and applications.
• TSO (Time Sharing Option): TSO is a time-sharing operating system that
was first introduced in the 1960s by IBM for the IBM System/360
mainframe computer. It allowed multiple users to access the same computer
simultaneously, running their own applications.
• Windows Terminal Services: Windows Terminal Services is a time-
sharing operating system that allows multiple users to access a Windows
server remotely. Users can run their own applications and access shared
resources, such as printers and network storage, in real-time.

3. Distributed Operating System

These types of the operating system are a recent advancement in the


world of computer technology and are being widely accepted all over
the world and, that too, with a great pace. Various autonomous
interconnected computers communicate with each other using a shared
communication network. Independent systems possess their own
memory unit and CPU. These are referred to as loosely coupled
systems or distributed systems. These system’s processors differ in size
and function. The major benefit of working with these types of the
operating system is that it is always possible that one user can access the
files or software which are not actually present on his system but some
other system connected within this network i.e., remote access is
enabled within the devices connected in that network.

Advantages of Distributed Operating System:


• Failure of one will not affect the other network communication, as all
systems are independent from each other
• Electronic mail increases the data exchange speed
• Since resources are being shared, computation is highly fast and durable
• Load on host computer reduces
• These systems are easily scalable as many systems can be easily added to
the network
• Delay in data processing reduces
Disadvantages of Distributed Operating System:
• Failure of the main network will stop the entire communication
• To establish distributed systems the language which is used are not well
defined yet
• These types of systems are not readily available as they are very expensive.
Not only that the underlying software is highly complex and not understood
well yet
Examples of Distributed Operating System are- LOCUS, etc.

4. Network Operating System

These systems run on a server and provide the capability to manage data,
users, groups, security, applications, and other networking functions. These
types of operating systems allow shared access of files, printers, security,
applications, and other networking functions over a small private network.
One more important aspect of Network Operating Systems is that all the
users are well aware of the underlying configuration, of all other users
within the network, their individual connections, etc. and that’s why these
computers are popularly known as tightly coupled systems.

Advantages of Network Operating System:


• Highly stable centralized servers
• Security concerns are handled through servers
• New technologies and hardware up-gradation are easily integrated into the
system
• Server access is possible remotely from different locations and types of
systems
Disadvantages of Network Operating System:
• Servers are costly
• User has to depend on a central location for most operations
• Maintenance and updates are required regularly
Examples of Network Operating System are: Microsoft Windows Server
2003, Microsoft Windows Server 2008, UNIX, Linux, Mac OS X, Novell
NetWare, and BSD, etc.

5. Real-Time Operating System


These types of OSs serve real-time systems. The time interval required
to process and respond to inputs is very small. This time interval is
called response time.

Real-time systems are used when there are time requirements that are very
strict like missile systems, air traffic control systems, robots, etc.

Two types of Real-Time Operating System which are as follows:


• Hard Real-Time Systems:
These OSs are meant for applications where time constraints are very strict
and even the shortest possible delay is not acceptable. These systems are
built for saving life like automatic parachutes or airbags which are required
to be readily available in case of any accident. Virtual memory is rarely
found in these systems.

• Soft Real-Time Systems:


These OSs are for applications where time-constraint is less strict. This type
of system can miss its deadline occasionally with some acceptably low
probability. Missing the deadline have no disastrous consequences. The
usefulness of results produced by a soft real-time system decreases gradually
with an increase in tardiness. Example: Telephone switches.
Advantages of RTOS:
• Maximum Consumption: Maximum utilization of devices and system,
thus more output from all the resources
• Task Shifting: The time assigned for shifting tasks in these systems are
very less. For example, in older systems, it takes about 10 microseconds in
shifting one task to another, and in the latest systems, it takes 3
microseconds.
• Focus on Application: Focus on running applications and less importance
to applications which are in the queue.
• Real-time operating system in the embedded system: Since the size of
programs are small, RTOS can also be used in embedded systems like in
transport and others.
• Error Free: These types of systems are error-free.
• Memory Allocation: Memory allocation is best managed in these types of
systems.

Disadvantages of RTOS:
• Limited Tasks: Very few tasks run at the same time and their
concentration is very less on few applications to avoid errors.
• Use heavy system resources: Sometimes the system resources are not so
good and they are expensive as well.
• Complex Algorithms: The algorithms are very complex and difficult for
the designer to write on.
• Device driver and interrupt signals: It needs specific device drivers and
interrupts signals to respond earliest to interrupts.
• Thread Priority: It is not good to set thread priority as these systems are
very less prone to switching tasks.
Examples of Real-Time Operating Systems are: Scientific experiments,
medical imaging systems, industrial control systems, weapon systems, robots,
air traffic control systems, etc.

Tasks in Real Time systems

The system is subjected to real-time, i.e. response should be guaranteed within


a specified timing constraint or system should meet the specified deadline. For
example, flight control systems, real-time monitors, etc.

There are two types of tasks in real-time systems:


1. Periodic tasks
2. Dynamic tasks

• Periodic Tasks: In periodic tasks, jobs are released at regular intervals. A


periodic task is one that repeats itself after a fixed time interval. A periodic
task is denoted by four tuples: T = < Φ , P , e , D >
i i i i i

Where,
• Φ – is the phase of the task. Phase is the release time of the first
i

job in the task. If the phase is not mentioned then the release time
of the first job is assumed to be zero.
• P – is the period of the task i.e. the time interval between the
i

release times of two consecutive jobs.


• e – is the execution time of the task.
i

• D – is the relative deadline of the task.


i

For example: Consider the task T with period = 5 and execution time = 3
i

Phase is not given so, assume the release time of the first job as zero. So the
job of this task is first released at t = 0 then it executes for 3s and then the next
job is released at t = 5 which executes for 3s and then the next job is released
at t = 10. So, jobs are released at t = 5k where k = 0, 1, . . ., n
• Dynamic Tasks: It is a sequential program that is invoked by the
occurrence of an event. An event may be generated by the processes
external to the system or by processes internal to the system. Dynamically
arriving tasks can be categorized on their criticality and knowledge about
their occurrence times.
1. Aperiodic Tasks: In this type of task, jobs are released at arbitrary time
intervals i.e. randomly. Aperiodic tasks have soft deadlines or no
deadlines.
2. Sporadic Tasks: They are similar to aperiodic tasks i.e. they repeat at
random instances. The only difference is that sporadic tasks have hard
deadlines. A sporadic task is denoted by three tuples: T =(e , g , D )
i i i i

Where
e – the execution time of the task.
i

g – the minimum separation between the occurrence of two consecutive


i

instances of the task.


D – the relative deadline of the task.
i

You might also like