Professional Documents
Culture Documents
Chapter 1
Chapter 1
Definitions
An operating system is a program that acts as an interface between the user and the computer hardware
and controls the execution of all kinds of programs.
1. Process Management
A process is program or a fraction of a program that is loaded in main memory. A process
needs certain resources including CPU time, Memory, Files, and I/O devices to accomplish
its task. The process management component manages the multiple processes running
simultaneously on the Operating System.
The operating system is responsible for the following activities in connection with process
management:
• Create, load, execute, suspend, resume, and terminate processes.
• Switch system among multiple processes in main memory.
• Provides communication mechanisms so that processes can communicate with each other.
• Provides synchronization mechanisms to control concurrent access to shared data to keep
shared data consistent.
• One of the purposes of an operating system is to hide the peculiarities of specific hardware
devices from the user. I/O Device Management provides an abstract level of H/W devices
and keep the details from applications to ensure proper use of devices, to prevent errors,
and to provide users with convenient and efficient programming environment.
• Following are the tasks of I/O Device Management component:
• Hide the details of H/W devices
• Manage main memory for the devices using cache, buffer, and spooling
• Maintain and provide custom drivers for each device.
3. File Management
• File management is one of the most visible services of an operating system. Computers can
store information in several different physical forms; magnetic tape, disk, and drum are the
most common forms.
• A file is defined as a set of correlated information and it is defined by the creator of the
file. Mostly files represent data, source and object forms, and programs. Data files can be
of any type like alphabetic, numeric, and alphanumeric.
• A file is a sequence of bits, bytes, lines or records whose meaning is defined by its creator and
user.
• The operating system implements the abstract concept of the file by managing mass storage
device, such as types and disks. Also files are normally organized into directories to ease
their use. These directories may contain files and other directories and so on.
• The operating system is responsible for the following activities in connection with file
management:
• File creation and deletion
• Directory creation and deletion
• The support of primitives for manipulating files and directories
• Mapping files onto secondary storage
• File backup on stable (nonvolatile) storage media
4. Network Management
• Memory is a large array of words or bytes, each with its own address. It is a repository of
quickly accessible data shared by the CPU and I/O devices.
• Main memory is a volatile storage device which means it loses its contents in the case of
system failure or as soon as system power goes down.
• The main motivation behind Memory Management is to maximize memory utilization on the
computer system.
• The operating system is responsible for the following activities in connections with
memory management:
• Keep track of which parts of memory are currently being used and by whom.
• Decide which processes to load when memory space becomes available.
• Allocate and deallocate memory space as needed.
• The main purpose of a computer system is to execute programs. These programs, together
with the data they access, must be in main memory during execution. Since the main
memory is too small to permanently accommodate all data and program, the computer
system must provide secondary storage to backup main memory.
• Most modern computer systems use disks as the principle on-line storage medium, for both
programs and data. Most programs, like compilers, assemblers, sort routines, editors,
formatters, and so on, are stored on the disk until loaded into memory, and then use the
disk as both the source and destination of their processing.
• The operating system is responsible for the following activities in connection with disk
management:
• Free space management
• Storage allocation
• Disk Scheduling
7. Security Management
• The operating system is primarily responsible for all task and activities happen in the
computer system. The various processes in an operating system must be protected from
each other’s activities. For that purpose, various mechanisms which can be used to ensure
that the files, memory segment, cpu and other resources can be operated on only by those
processes that have gained proper authorization from the operating system.
• Security Management refers to a mechanism for controlling the access of programs, processes, or
users to the resources defined by a computer controls to be imposed, together with some means of
enforcement.
• For example, memory addressing hardware ensure that a process can only execute within
its own address space. The timer ensure that no process can gain control of the CPU without
relinquishing it. Finally, no process is allowed to do it’s own I/O, to protect the integrity of
the various peripheral devices.
• One of the most important component of an operating system is its command interpreter.
The command interpreter is the primary interface between the user and the rest of the
system.
• Command Interpreter System executes a user command by calling one or more number of
underlying system programs or system calls.
• Command Interpreter System allows human users to interact with the Operating System and
provides convenient programming environment to the users.
• Many commands are given to the operating system by control statements. A program which
reads and interprets control statements is automatically executed. This program is called
the shell and few examples are Windows DOS command window, Bash of Unix/Linux or
C-Shell of Unix/Linux.
• Allocate/de-allocate resources properly to prevent or avoid deadlock situation.
1. 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.
2. 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. How ever 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.
• A job is a single unit that consists of a preset sequence of commands, data, and programs.
• Processing takes place in the order in which they are received, i.e., first come, first serve.
• These jobs are stored in memory and executed without the need for manual information.
• When a job is successfully run, the operating system releases its memory.
Advantages:
There are various advantages of the Batch Operating System. Some of them are as follows:
• It isn't easy to forecast how long it will take to complete a job; only batch system processors
know how long it will take to finish the job in line.
• This system can easily manage large jobs again and again.
• The batch process can be divided into several stages to increase processing speed.
• When a process is finished, the next job from the job spool is run without any user
interaction.
Disadvantages:
There are various disadvantages of the Batch Operating System. Some of them are as follows:
• When a job fails once, it must be scheduled to be completed, and it may take a long time
to complete the task.
• Computer operators must have full knowledge of batch systems.
• The batch system is quite difficult to debug.
• The computer system and the user have no direct interaction.
• If a job enters an infinite loop, other jobs must wait for an unknown period of time.
Advantages:
The advantages of multiprogramming operating system are as follows −
• CPU utilization is high because the CPU is never goes to idle state.
• Memory utilization is efficient.
• CPU throughput is high and also supports multiple interactive user terminals.
Disadvantages:
The disadvantages of multiprogramming operating system are as follows −
• CPU scheduling is compulsory because lots of jobs are ready to run on CPU
simultaneously.
• User is not able to interact with jobs when it is executing.
• Programmers also cannot modify a program that is being executed.
Advantages:
Timesharing:
Time-sharing is the main concept and benefit of MOS. All tasks are given a suitable amount of
time and no waiting time occurs for the CPU.
Protected memory:
Memory is better managed in MOS. Unauthorized applications are not given permission to overuse
memory.
Disadvantages:
Limitation of memory:
When a computer user opens many programs at a time, the computer becomes slow. The reason
behind is that many programs are loaded into main memory and CPU cannot give good time for
each program and response time of completing the job becomes higher. Computers with low RAM
usually face this problem. One solution to this is to increase your RAM capacity.
4. Multiprocessor system:
Multiprocessor system means, there are more than one processor which work parallel to perform
the required operations. It allows the multiple processors, and they are connected with physical
memory, computer buses, clocks, and peripheral devices.
The main objective of using a multiprocessor operating system is to increase the execution
speed of the system and consume high computing power.
• In SMP, all processor are at the same level. They work in peers. There is no Master-
Slave relation in between the processor.
2. Asymmetric multi-processing:
• The processors in asymmetric multiprocessing have a master-slave relationship,
with one master processor controlling the other slave processors. The slave
processors may receive specified tasks from the master processor or receive
processes from the master processor. The master processor manages the data
structure. The master processor manages the scheduling of processes, I/O
processing, and other system operations.
• If a master processor fails, one of the slave processors assumes control of the
execution. If one slave processor fails, the other slave processor takes over. It is
simple since the data structure and a single processor controls all system actions.
Assume there are four CPUs named C1, C2, C3, and C4. C4 is the master processor
and allocates tasks to the other CPUs. If C1 is assigned process P1, C2 is assigned
process P2, and C3 is assigned process P3. Each processor will only work on the
processes that have been assigned to them.
Advantages:
• Increased reliability: Due to the multiprocessing system, processing tasks can be
distributed among several processors. This increases reliability as if one processor fails;
the task can be given to another processor for completion.
• Increased throughout: As several processors increase, more work can be done in less
• The economy of Scale: As multiprocessors systems share peripherals, secondary storage
devices, and power supplies, they are relatively cheaper than single-processor systems.
Disadvantages:
• Multi-processor system is more complex in both hardware and software.
• Additional CPU cycles are required to managed the co-operation so per-CPU efficiency
goes down.
Advantages:
• With resource sharing facility, a user at one site may be able to use the resources available
at another.
• Speedup the exchange of data with one another via electronic mail.
• Failure of one site in a distributed system doesn’t affect the others, the remaining sites can
potentially continue operating.
• Better service to the customers.
• Reduction of the load on the host computer.
• Reduction of delays in data processing.
Disadvantages:
• Security problem due to sharing
• Some messages can be lost in the network system
• Bandwidth is another problem if there is large data then all network wires to be replaced
which tends to become expensive
• Overloading is another problem in distributed operating systems
• If there is a database connected on local system and many users accessing that database
through remote or distributed way then performance become slow
• The databases in network operating is difficult to administrate then single user system
RTOS is used in real-time applications that must work within specific deadlines. Following are
the common areas of applications of Real-time operating systems are given below.
Android Architecture:
Android architecture contains different number of components to support any android device
needs. Android software contains an open-source Linux Kernel having collection of number of
C/C++ libraries which are exposed through an application framework services.
Among all the components Linux Kernel provides main functionality of operating system
functions to smartphones and Dalvik Virtual Machine (DVM) provide platform for running an
android application.
The main components of android architecture are following:
• Applications
• Application Framework
• Android Runtime
• Platform Libraries
• Linux Kernel
Linux kernel
Linux Kernel is heart of the android architecture. It manages all the available drivers such as
display drivers, camera drivers, Bluetooth drivers, audio drivers, memory drivers, etc. which are
required during the runtime.
The Linux Kernel will provide an abstraction layer between the device hardware and the other
components of android architecture. It is responsible for management of memory, power, devices
etc.
Libraries
On top of Linux kernel there is a set of libraries including open-source Web browser engine
WebKit, well known library libc, SQLite database which is a useful repository for storage and
sharing of application data, libraries to play and record audio and video, SSL libraries
responsible for Internet security etc.
Android Runtime
This is the third section of the architecture and available on the second layer from the bottom. This
section provides a key component called Dalvik Virtual Machine which is a kind of Java Virtual
Machine specially designed and optimized for Android.
The Dalvik VM makes use of Linux core features like memory management and multi-threading,
which is intrinsic in the Java language. The Dalvik VM enables every Android application to run
in its own process, with its own instance of the Dalvik virtual machine.
The Android runtime also provides a set of core libraries which enable Android application
developers to write Android applications using standard Java programming language.
Application Framework
The Application Framework layer provides many higher-level services to applications in the form
of Java classes. Application developers are allowed to make use of these services in their
applications.
The Android framework includes the following key services −
• Activity Manager − Controls all aspects of the application lifecycle and activity stack.
• Content Providers − Allows applications to publish and share data with other
applications.
• Resource Manager − Provides access to non-code embedded resources such as strings,
color settings and user interface layouts.
• Notifications Manager − Allows applications to display alerts and notifications to the
user.
• View System − An extensible set of views used to create application user interfaces.
Applications
You will find all the Android application at the top layer. You will write your application to be
installed on this layer only. Examples of such applications are Contacts Books, Browser, Games
etc.
It allows various applications to run It allows various apps to run on a single processor
simultaneously with little human intervention. system.
computers before Windows had arrived. It is a single-command operating system that cannot
handle multiple commands.
Features of DOS
1. It is a free OS.
2. It is a 16-bit OS.
3. It aids make file management, e.g., creating, editing, deleting files, etc.
4. It doesn't support GUI.
5. It is a single-user OS.
6. It has a text-based interface and operates completely on text and codes.
2. UNIX
The C and Assembly languages were used to develop the UNIX OS. UNIX was first introduced
on November 3, 1971. UNIX is a multi-purpose operating system that may be used on desktops,
laptops, and servers. UNIX offers a graphical user interface that is comparable to that of
Windows. The abbreviation for UNIX is UNICS, which stands for UNiplexed Information
Computing System. It began working on programming in the 1960s and became operational in
1971. UNIX is a powerful, multi-user, and multitasking operating system that was originally
developed at AT & T Bell Laboratories.
1. Microsoft Windows
Microsoft Windows is one of the most common GUI based operating systems. It is developed and
marketed by Microsoft. The current version of Microsoft Windows is Windows 10. Moreover, it
has several earlier versions like Windows XP, Windows 8, Windows 7, etc. Besides, the most
common editions for home computers are Windows Home (Win Home) and Windows
Professional (Win Pro or Windows Pro).
2. Linux
Linux is a popular operating system. It is not a part of any particular firm or organization. Rather,
it was developed by a programmer Linus Torvalds in 1991. It is an open-source operating system.
Today, LINUX is run in many organizations, private offices, on mobiles, supercomputers, over
the internet, etc.