Operating Systems.
An operating system is a program that manages the computer hardware. It also provides a basis for
application programs and acts as an intermediary between the computer user and the computer
hardware.Operating systems for hand held computers are designed to provide an environment in
which a user can easily interface with the computer to execute programs.
What Operating Systems Do. : A computer system can be divided roughly into four components:
1. hardware : the central processing unit (CPU), the memory, and the input/output (I/O) devices-
provides the basic computing resources for the system.
2. Application program : application programs-such as word processors, spreadsheets, compilers,
and Web browsers-define the ways in which these resources are used to solve users' computing
problems.
3. Operating system : The operating system controls the hardware and coordinates its use among
the various application programs for the various users.
4. Users. : users are accessing the same computer through other terminals. users sit at workstations
connected to networks of other workstations and servers.
the operating system's role view two points :
1. User View : The user's view of the computer varies according to the interface being used. Most
computer users sit in front of a PC, consisting of a monitor, keyboard, mouse, and system unit. Such
a system is designed for one user to monopolize its resources .The operating system in such cases is
designed to maximize resource utilization- to assure that all available CPU time, memory, and I/O are
used efficiently and that no individual user takes more than her fair share.
2. System View : the operating system is the program most intimately involved with the hardware. In
this context, we can view an operating system as a resource allocator. A computer system has many
resources that may be required to solve a problem: CPU time, memory space, file-storage space, I/O
devices, and so on. The operating system acts as the manager of these resources.
WHY DO WE NEED AN OPERATING SYSTEM ?
Operating systems were also developed with a similar objective. When a program written in a high
level language is executed by a computer, the following steps are followed:
(i) The compiler to translate the program is loaded in the memory.
(ii) The source program is read and loaded in the memory.
(iii) The source program is compiled into the object program. While compiling if any syntax errors are
detected in the program, appropriate messages are displayed or printed.
(iv) During compilation, machine language routines for reading and writing data required by the
program are brought from a library of routines stored in a secondary store and linked to the object
program. The resulting program is stored in the secondary memory (usually a disk).
(v). The compiler may now be removed from the main memory as its job is over and the space is
made available for the data and the compiled object program. The object program is now executed. If
any errors are detected during execution, the contents of various registers in the CPU at that time are
communicated to the user to aid him in correcting the program.
user of a computer does not merely interact with the physical hardware of the machine. He
interacts with hardware , operating system , compilers application programs. The Figure below
illustrates this fact. Thus, a user of a modern computer uses a virtual (or non-existent) machine with
features which include,besides those provided by its hardware, a number of functions provided by an
operating system.
s. It also allocates resources of a computer system to users efficiently when requested. Some of the
major functions of a modern operating system are to:
1. Ease interaction between humans and computers. This is known as human-computer interface.
This interface may be either a Graphical User Interface (GUI) or command lines.
2.Start the operation of a computer automatically when power is turned on. Load users' programs
along with the appropriate compiler.
3. Control input and output.
4.Control execution of programs.
5. Schedule processes.
6.Manage the use of various levels of memory, namely, the caches, the main memory and the disk.
7. Manage and manipulate files, that is, manage opening, writing, editing and closing named files.
8.Provide security to users' program and data files.
9.Account for the usage of the computer's resources.
10.Allow application programs to use some of the low level services of the OS, such as device drivers,
and function calls, through Application Programmer Interface (API).
11. Optimize the utilization of hardware resources of a computer.
Description of the services an operating system provides to users : An operating system provides the
environment within which programs are executed. Internally, operating systems vary greatly in their
makeup, since they are organized along many different lines. The design of a new operating system
is a major task. It is important that the goals of the system be well defined before the design begins.
These goals form the basis for choices among various algorithms and strategies.
Operating-System Services : An operating system provides an environment for the execution of
program It provides certain services to programs and to the users of those program The specific
services provided, of course, differ from one operating system another, but we can identify common
classes. These operating-system services are provided for the convenience of the programmer, to
make the programming task easier.
Figure 2 below shows one view of the various operating-system services and how they interrelate.
User interface : Almost all operating systems have a user interface (UI). This interface can take
several forms. One is a DTrace command-line interface (CLI), which uses text commands and a
method for entering them (say, a program to allow entering and editing of commands).
Program execution : The system must be able to load a program into memory and to run that
program. The program must be able to end its execution, either normally or abnormally (indicating
error).
I/O operations : A running program may require I/O, which may involve a file or an I/O device. For
specific devices, special functions may be desired (such as recording to a CD or DVD drive or blanking
a display screen).
: The file system is of particular interest. Obviously, programs need to read and write
File-system manipulation
files and directories. They also need to create and delete them by name, search for a given file, and
list file information.
Communications : There are many circumstances in which one process may occur between
processes that are executing on the needs to exchange information with another
process.Communications may be implemented via shared memory or through message passing, in
which packets are moved between processes by the operating system.
Error detection : The operating system needs to be constantly aware of possible errors. Errors may
occur in the CPU and memory hardware (such as a memory error or a power failure), in I/O devices
(such as a parity error on tape, a connection failure on a network, or lack of paper in the printer), and
in the user program (such as an arithmetic overflow, an attempt to access an illegal memory
location, or a too-great use of CPU time)
Systems with multiple users can gain efficiency by sharing the computer resources among the users.
Resource allocation : When there are multiple users or multiple jobs running at the same time,
resources must be allocated to each of them. Many different types of resources are managed by the
operating system. Some (such as CPU cycles, main memory, and file storage) may have special
allocation code, whereas others (such as I/O devices) may have much more general request and
release code.
Accounting : We want to keep track of which users use how much and what kinds of computer
resources. This record keeping may be used for accounting (so that users can be billed) or simply for
accumulating usage statistics.
Protection and security : The owners of information stored in a multiuser or networked computer
system may want to control use of that information. When several separate processes execute
concurrently, it should not be system itself. Protection involves ensuring that all access to system
possible for one process to interfere with the others or with the operating resources is controlled.
Security of the system from outsiders is also important
computer network : A computer network is a collection of autonomous computers interconnected by
a single technology. Two computers are said to be interconnected if they are able to exchange
information. The connection is made by using either copper wire; fiber optics, microwaves, infrared,
and communication satellites. Networks come in different sizes, shapes and forms.
three major types of computer networks :
1. Local Area Network (LAN)
2. Metropolitan Area Network (MAN)
3. Wide Area Network (WAN)
Local Area Network (LAN) : The communication lines interconnecting the computers in a LAN are
short. They are also localized to 'private' area and one need not use a public telephone network. As a
distance are small, and as fast communication between computers connected to a LAN is desirable,
high speed communication lines which can transmit around ten million to one billion bits per second
(abbreviated bps) are used in LANS.
Metropolitan Area Network (MAN) : A MAN (Metropolitan Area Network) covers a city. The best-
known examples of MANS are the cable television networks available in many cities. These systems
grew from earlier community antenna systems used in areas with poor over-the-air television
reception. In those early systems, a large antenna was placed on top of a nearby hill and a signal
was then piped to the subscribers' houses.
Wide Area Network (WAN) : wide area computer networks are mainly used to connect a number of widely dispersed computers. The main objective of such an
interconnection is to allow users of the network to access specialized library programs, databases, languages, and special facilities available in any of the computers in the network.
Internet : The Internet is a worldwide network of computer networks that uses a standard communication protocol. The computer networks are interconnected using the existing infrastructure
provided by Public Switched Telephone Networks (PSTNs)
OS (Operating System) Types comprise of:
Batch OS
Real-Time OS
Embedded OS
Mobile OS
Distributed OS
Network OS
Batch OS : When computers were first designed, during the early 1950s, they primarily had machine language and I/O using card readers or paper tape readers. There were switches on the front
panel of a computer which could be operated by the user. The contents of important registers were displayed using neon lamps. The user operated the computer when his/her program was
executed. Slots of time were booked by users for using a computer.
Algorithm of a batch monitor was as follows :
Repeat
begin
Read a program;
Compile the program;
if no errors found during compilation
then execute the object code
else give error message and take the next job;
if error detected during execution
then give error message and take the next job;
else take the next job
end
Real-Time OS : A real-time system is a computer system that requires not only that the computing
results be "correct" but also that the results be produced within a specified deadline period. Results
produced after the deadline has passed- even if correct-may be of no real value. To illustrate,
consider an autonomous robot that delivers mail in an office complex. If its vision-control system
identifies a wall after the robot has walked into it, despite correctly identifying the wall, the system
has not met its requirement.
Real-time computing is of two types: hard and soft. A hard real-time system has the most stringent
requirements, guaranteeing that critical real-time tasks be completed within their deadlines.
Safetycritical systems are typically hard real-time systems.
A soft real-time system is less restrictive, simply providing that a critical real-time task will receive
priority over other tasks and that it will retain that priority until it complete
Real Time System Characteristics
The following characteristics are typical of many real-time systems:
Single purpose
Small size
Inexpensively mass produced
Specific timing requirements
Embedded OS : An embedded operating system is a specialized operating system (OS) designed to
perform a specific task for a device that is not a computer. The main job of an embedded OS is to run
the code that allows the device to do its job. The embedded OS also makes the device's hardware
accessible to software that is running on top of the OS. Examples include computer systems in cars,
traffic lights, digital televisions, ATMs, airplane controls, point of sale (PoS) terminals, digital
cameras, GPS navigation systems, elevators and Smart meters.
How does an embedded OS work : An embedded OS enables an embedded device to do its job within
a larger system. It communicates with the hardware of the embedded system to perform a specific
function. For example, an elevator might contain an embedded system, such as a microprocessor or
microcontroller, that lets it understand which buttons the passenger is pressing. The embedded
software that runs on that system is the embedded OS.
Distributed OS & Network OS : A distributed system is a collection of physically separate, different
computer systems that are networked to provide the users with access to the various resources that
the system maintains. (Shared resources increase the computation speed, functionality, data
availability and reliability).
A network is basically a communication path between two or more systems. Distributed systems
depend on networking for their functionality. Networks vary by the protocol used, the distance
between nodes, and transport media.
Open Source and Non Open(Closed) Source Operating System
An Open Source Operating System is an operating system whose copyright holders or owners enable
the user to use, see, and edit the operating system's source code. We can create an operating system
according to our requirements by altering the source code of an open-source operating system.
What is an Open-Source Operating System?
An Operating System whose source code is open to all and anyone can use, view, or edit is called an
open source operating system.
How does an Open-Source Operating System Work : The Open-Source Operating System works
similarly to that any other closed operating system. The difference between the open-source
operating system and the closed-source operating system is that in the open-source operating
system, you can alter an open system according to your needs provided that you have enough
technical knowledge.
Difference between open source and non-open (closed) source operating system
Advantages of Open-Source Operating System
Cost efficient: Open source operating systems are usually free or sometimes less than the closed
source operating system.
Reliable and efficient : As the source code of the operating system is open for all, Anyone
around the globe can make changes to the source code and resolve any bugs or make some
improvements to the source code. Open-source operating systems are more efficient and
reliable because developers are also the users of the operating system and the bugs or issues are
resolved.
Flexibility : The source code of the open-source operating system is available for everyone. The
operating system can be modified or customized according to the requirements of the user.
Disadvantages of Open-Source Operating System
Security risk : The source code is available for everyone and anyone can analyze the source code and
search for vulnerabilities and break into the operating system easily.
Complicated : Using an open-source operating system requires a little technical knowledge as
compared to using a closed-source operating system such as Windows and Mac OS.
No support : As Open source operating systems are open-sourced and no company or organization
is responsible for the maintenance of the operating system, there will be no help desk to address the
problems encountered while using an open-source operating system.
Advantages of Closed Source Software/ Operating System :
Technical Support : Closed source operating system usually comes with professional technical
support, which can be helpful for organizations that need assistance with setup, configuration, or
troubleshooting.
Features : Closed source operating system typically has more features than open source software,
including advanced analytics, reporting, and data visualization tools.
Security : Closed source operating system often has built-in security features and can provide better
protection against cyber threats.
Integration : Closed source operating system/software is often designed to work seamlessly with
other enterprise software, making integration with existing systems easier.
Disadvantages of Closed Source Software/ Operating System:
Cost : Closed source software can be expensive, with licensing fees and maintenance costs that can
add up over time.
Vendor Lock-In : Organizations that use closed source software may become dependent on the
vendor and find it difficult to switch to another software.
Limited Customization : Closed source software may not be as customizable as open source
software, which can be a disadvantage for organizations with specific requirements.
Lack of Transparency : Since the source code is not available, users cannot see how the software
works or what data it collects, which may raise privacy concerns.
What is Open Source Software?
An open-source software refers to that computer software where the source is openmeaning, the
general public can easily access it and then use it. It is generally referred to as OSS, and the source
code of an OSS is public. It makes use of the code that is available on the internet for free. Other
organisations and users can modify this code. So it is available for every person to look at. An OSS
costs comparatively less, the user restrictions are very low on the basis of the modification and
usability of the software.
What is Closed Source Software?
It refers to that type of computer software in which the source code remains closedmeaning, the
public doesn’t have access to its source code. It is generally referred to as CSS, and the source is
protected in it. Thus, only the organisation/individual who has created this code has access to it for
making any changes. The overall price is comparatively high, and every user needs to have a licence
to access and use this software. This authentic licence also puts restrictions on its users on the basis
of modification and usability of the software.
Distributed Systems
A distributed system is a collection of processors that do not share memory or a clock. Instead, each
processor has its own local memory. The processors communicate with one another through various
communication networks, high-speed buses or telephone lines. A distributed system is a collection of
loosely coupled processors interconnected by a communication network. From the point of view of a
specific processor in a distributed system, the rest of the processors and their respective resources
are remote (geographically located somewhere else), whereas its own resources are local.
There are four major reasons for building distributed systems: resource sharing, computation
speedup, reliability, and communication. In this section, we briefly discuss each of them
Resource Sharing : If a number of different sites (with different capabilities) are connected to one
another, then a user at one site may be able to use the resources available at another
Computation Speed up : If a particular computation can be partitioned into sub-computations that
can run concurrently, then a distributed system allows us to distribute the sub-computations among
the various sites; the sub-computations can be run concurrently and thus provide computation
speedup.
Reliability : If one site fails in a distributed system, the remaining sites can continue operating, giving
the system better reliability. If the system is composed of multiple large autonomous installations
(that is, generalpurpose computers), the failure of one of them should not affect the rest.
Communication : When several sites are connected to one another by a communication network,
users at the various sites have the opportunity to exchange information. At a low level, messages are
passed between systems, much as messages are passed between processes in the single-computer
message system discussed in Section 3.4. Given message passing, all the higher-level functionality
found in standalone systems can be expanded to encompass the distributed system.
Types of Network Based Operating Systems
1. Network Operating Systems : A network operating system provides an environment in which
users, who are aware of the multiplicity of machines, can access remote resources by either logging
in to the appropriate remote machine or transferring data from the remote machine to their own
machines.
i.Remote Login : An important function of a network operating system is to allow users to login
remotely. The internet provides the telnet facility for this purpose.
ii. Remote File Transfer : Another major function of a network operating system is to provide a
mechanism for remote file transfer from one machine to another. In such an environment, each
computer maintains its own local file system.
2. Distributed Operating Systems : In a distributed operating system, users access remote resources
in the same way they access local resources.Data and process migration from one site to another is
under the control of the distributed operating system.
i. Data Migration : Suppose a user on site A wants to access data (such as a file) that reside at site B.
The system can transfer the data by one of two basic methods. One approach to data migration is to
transfer the entire file to site A. From that point on, all access to the file is local.
ii. Computation Migration : In some circumstances, we may want to transfer the computation, rather
than the data, across the system; this approach is called computation migration
iii. Process Migration : A logical extension of computation migration is process migration. When a
process is submitted for execution, it is not always executed at the site at which it is initiated