Operating System
Operating System
An operating system (OS) is a large and complex set of system programs that control the various
operations of a computer system and provide a collection of services to other (user) programs. It
is an intermediary component between the application programs and the hardware. The ultimate
purpose of an operating system is:
An Operating System is low-level software that enables a user and higher-level application
software to interact with a computer’s hardware. An OS performs basic tasks, such as recognizing
input from the keyboard, sending output to the display screen, keeping track of files and
directories on the disk, and controlling peripheral devices such as printers. The operating system
has the following roles in a computer system.
Operating System is the grandmaster of the computer system. It plays vital roles to control,
coordinate, instruct and operate the hardware and other software components. The following are
the major functions of the operating system.
1. Resource Management
The operating system is also considered a huge resource manager. It performs a variety of
services as efficiently as possible to ensure the desired performance of the system is
achieved. The most important active resource in the computer system is the CPU. Other
important resources are memory and I/O devices. Allocation and deallocation of all
2. Process Management
A process is a program in execution. A process needs certain resources, including CPU
time, memory, files, and I/O devices, to accomplish its task. The operating system is
responsible for creating and terminating processes, scheduling processes, and
communicating between the processes. Providing resources to each process and
managing them is done by the operating system.
3. Memory Management
Operating System is responsible for efficiently managing all memory resources including
RAM and virtual memory and allocating memory space to applications and processes as
needed. The memory manager of the operating system must keep track of all memory
addresses and what they are currently being used for. It must also protect those address
ranges, and the data and instructions stored in them, from data and instructions being
used by other processes. The operating system is also responsible for freeing up memory
when it is no longer being used so that other processes can use it.
4. File Management
Files are logical units of information created by processes. A disk will usually contain
thousands or even millions of them, each one independent of the others. Processes can
read existing files and create new ones if needed. These files are managed by the operating
system. How they are structured, named, accessed, used, protected, implemented, and
managed are determined by the operating system. An Operating system provides different
operations to create, retrieve and delete the files. Files are normally stored on disk, so the
management of disk space is another major function of the operating system. An
Operating system provides backup to the files providing a mechanism to retrieve and
restore the accidental deletion and corruption of the files.
5. I/O Management
An operating system must be capable to handle the inputs provided and the output
generated by the computer system. The operating system uses device controllers to
control I/O devices like printer, monitor, keyboard, mouse, joystick, etc. The operating
system also controls how data is transmitted to and from I/O devices. The operating
system handles all input and output requests and prioritizes them and carryout them
accordingly.
8. Power Management
The operating system plays a key role in energy management. It controls all the devices,
so it must decide what to shut down and when to shut it down. is responsible to turn off
parts of the computer which are currently not in use. The operating system automatically
adjusts the brightness level of display, provides power saving options and manages the
temperature of the device.
9. User Interface
An operating system provides a user interface to interact with the computer system. An
operating system provides a user-friendly interface using different graphical means or
non-graphical working environment to provide instructions and commands to the
computer.
Operating systems are featured with different sorts of capabilities. Based on how they act, process,
and they appear there are different categories of the operating system.
i. Based on the Processing Method
ii. Based on User Interface
iii. Based on the mode of user
Any program must be in execution state to perform some operation. These executing tasks could
initiate multiple processes. Based on how and when these processes are executed (processed)
there are different types of operating systems. They are:
1. Batch Processing OS
In Batch Operating System a set of jobs/processes is submitted in a sequence for
processing. These systems have a relatively long interval from job arrival time to
completion time for jobs. However, once the jobs start executing the transition from one
job to another does not require any intervention. The very first types of operating systems
were the simple batch operating systems in which users had to submit their jobs on
punched cards or tape. The computer operator grouped all the jobs in batches and stacked
these on the main input device and later processed one by one and the output was
published at once.
Features of CUI
• CUI operating system requires less memory space to get installed and to perform
operations.
• Computer system operation/command execution is faster.
Features of GUI
• GUI uses different graphical elements to represent different commands and execute
them.
• GUI makes operating computers easier; operations can be done with ease.
• Different input devices like the touchpad, touchscreen, sensors, mouse, keyboard, etc.
can be used while using GUI based OS.
• Features of the system can be explored by the user, as commands should not be
remembered.
• GUI OS provides an Interactive way to use computers. Changes in the system can be
noticed immediately by the user.
• GUI is capable of multiprogramming, multitasking, and multiuser handling.
• GUI OS requires a system with high memory.
• The high-end processor is required.
• Loading GUI based operation is slower and sometimes operating computer uses heavy
resources like memory, peripherals, and CPU.
Users can operate a computer as per their requirements. Based no. on the user operating on a
computer system at a time instance, there are two types of operating systems. They are:
Process
A program in execution is called process. A single program can create multiple processes.
Every process must have a program, input, output, and state. Any process may be in ready,
running (currently executing), suspended (paused) or committed (completed) state. For
example, when we write a program in C or C++ and compile it, the compiler creates binary
code. The original code and binary code are both programs. When we run the binary code, it
becomes a process.
Buffering
A buffer is a memory area that stores data while they are transferred between two devices or
between a device and an application. Buffering is done to cope with a speed mismatch
between the input and output of a data stream. Suppose, for example, that a file is being
received via modem for storage on the hard disk. The modem is about a thousand times
slower than the hard disk. So a buffer is created in main memory to accumulate the bytes
received from the modem. When an entire buffer of data has arrived, the buffer can be
transferred to a hard disk in a single operation. Another use of buffering is to adapt between
devices that have different data-transfer sizes.
Spooling
A spool is a buffer that holds output for a device, such as a printer, that cannot accept
interleaved data streams. Spooling stands for Simultaneous Peripheral Operations On-
line. It refers to putting jobs in a buffer, where a device can access them when it is
ready. Although a printer can serve only one job at a time, several applications may wish to
print their output at the same time, without having their output mixed. The operating system
solves this problem using the spooling technique. Each application's output is spooled(stored)
to a separate disk file. When an application finishes printing one request, then only the next
request is processed.
Scheduling
Every process that needs to be executed must reside in RAM and processes that need to be
executed must have CPU access. In single-processor systems, the CPU can handle only one
task at a time. So if there are too many processes that are ready to be executed, the operating
system then maintains the order to run process accordingly, so that the processor will be able
to execute all the processes. This process of maintaining order in which each process is
allowed to be executed in CPU is known as scheduling. A scheduler in an OS is responsible
to decide which process to execute next. A scheduling system allows one process to use the
CPU while another is waiting for I/O, thereby making full use of otherwise making CPU jobless.
Virtual Memory
The size of RAM is not enough to run all of the programs that most users expect to run at
once. So the system stores the copy of primary memory on secondary memory and caches
only the most frequently used data in RAM. This memory space at secondary memory where
the copy of primary memory is kept is known as virtual memory. Since the hard drive is much
slower than the RAM, data stored in virtual memory must be mapped back to real memory to
be used. Virtual memory allows us to run multiple programs at the same time and helps to
share files and memory by multiple processes.
Booting
Booting is the process of loading an operating system to the main memory from the secondary
memory when the power button of the computer is switched on. A boot sequence is the initial
set of operations that the computer performs when it is switched on.
i. Cold Booting: Switching on the computer when the computer system is in a shut-down
state.
ii. Warm Booting: Restarting the operating system when the computer system is on the
turned-on state.
DOS is an operating system that contains disk-oriented commands and uses disk devices for
permanent storage. DOS is a single-user, single-tasking operating system that uses the
Command-line User Interface. The DOS provides a command-based mechanism to create,
organize, read, write and delete files on the disk. DOS did not support mouse and other
peripherals as it was possible to provide commands only through keyboards. These
commands were text-based as no Graphical User Interface was provided. Each command is
executed by the DOS interpreter called COMMAND.COM.
Features of DOS
DOS Commands
i. Internal Commands
Internal commands are used to perform the frequent and important operation on the
computer system. Internal commands are built-in (preloaded or already provided)
commands loaded with the DOS interpreter called COMMAND.COM. Some internal
commands are:
COMMANDS ACTION
CD Change directory or display the current directory path.
CLS Clear the window.
DIR Display a list of contents of the current directory.
EXIT Exits or closes the DOS window.
MD or MKDIR Creates a directory
TYPE Displays the contents of a text file.
DEL Deletes one or more files
TIME Displays current time
DATE Displays current date
External commands are very powerful and can help to fix problems, improve
performance, or perform other actions. They are usually kept in a separate file and the
file is loaded whenever required. Some of the external commands are:
COMMANDS ACTION
EDIT Modify or change the data of a file
LABEL Create, change, or delete the volume label of a disk
CHKDSK Checks a disk and displays a status report.
Moves one or more files from one directory to another
MOVE
directory.
FIND Searches for a text string in a file or files.
HELP Displays a list of commands or help about a command.
Wildcard
If you want to carry out a task for a group of files whose names have something in common,
you can use wildcard characters to specify groups of files. DOS recognizes two wild card
symbols.
The asterisk (*) and question mark (?) are used as wildcard characters. The asterisk matches
any sequence of characters, whereas the question mark matches any single character.
DOS uses a hierarchical file system. Directories (Folders) and files can be nested inside a
directory at different levels. The drives, folders, and files are displayed in groups, which allows
the user to see only the files they're interested in seeing.
A File is a program or collection of information with a specific name and extension. For
example, autorun.exe is a file with name autorun and .exe extension. The extension of a
program describes the nature of the file and determines how it is executed.
Directory (Folder) is a repository that can hold several files and other sub-directories within
itself.
C is a drive name.
There are mainly five system files (including command file and configuration file) in DOS.
Windows is the multi-tasking, multi-processing, multi-user operating system with Graphical User
Interface developed by Microsoft Incorporation initially released in 1985. Windows is in this state,
going through several changes in a different version of its release. The Windows Operating
System is the most widely used licensed operating system. Most of the personal computers,
laptops come with preloaded Windows OS. It is widely used in different sectors, ranging from
home to high-level corporate organization and scientific research organization. The ease of use
of user interface attracted a lot of general users, and the capability to handle threads, processes
and errors made them popular among high-level users and companies.
1. The Windows GUI is easy to use for normal users and it is customizable. The use of icons,
menus, and pointer made the use of computers easier.
2. It supports multi-user and multi-tasking.
3. Windows OS comes with built-in drivers for most frequently used hardware components.
It provides greater hardware support.
4. Windows operating system has an advanced security feature, network management
capability, power management capability and more advanced features.
5. File Management and task management in Windows is easier.
6. Most of the software is developed for Windows OS. It provides greater software support.
Some of the elements of the User Interface of Windows operating system are:
ELEMENTS DESCRIPTIONS
The area on the display screen where icons are grouped each representing
DESKTOP
different files, folders or application programs.
WINDOW In each window, you can run a different program or display a different file.
Usually, the small angled arrow symbol that appears on the display screen
POINTER
and that you move to select objects and commands.
Note: Please refer to the text-book for file management and customization of Windows
OS.
Open Source operating system is an OS with source code made publicly available that anyone can
inspect, modify, and enhance. Programmers who have access to a computer program's source
code can improve that program by adding features to it as per their requirement and desire.
Unlike proprietory operating systems, Open Source OS is free to use. In general, Open Source
licenses grant computer users permission to use the Open Source operating system for any
purpose they wish. An open-source operating system must:
- Be freely distributable
- Have openly available source codes
- not be discriminating any group of users
- not restrict enhancement and modifications only to a specific system
UNIX
Unix is the original and most powerful and popular multi-user and multi-tasking Operating
System. UNIX was developed by AT&T in 1970. Unix operating systems run on a wide variety of
digital devices and are commonly used on web servers, mainframes, and supercomputers. Unix
was developed using a high-level programming language C, enabling its portability across
multiple computer platforms. UNIX can be used for any kind of processing environments. It can
work on a single-processor system or a multi-processing system. It provides a hierarchical file
structure that facilitates fast data access. It has built-in networking functions so that computers
can easily exchange information.
There are many different versions of UNIX, although they share common similarities. The most
popular varieties of UNIX are Sun Solaris, GNU/Linux, and macOS X.
Linux
Linux is the most popular open-source UNIX based operating system created by Linus Torvalds at
the University of Helsinki in 1991. The source code of Linux is opensource. The drastic
development of Linux is the result of continuous support from numerous volunteers and its large
community. Linux is multi-tasking, multi-processing, and multi-user operating system that has
been installed on a variety of platforms including mobile phones, tablets, video game consoles,
routers, and large servers. Currently, the world's largest and most powerful data centers and
scientific research centers use some different variants of Linux. Most major versions of Linux are
Linux, as it is opensource it is free to use and can be used for any purpose. It can be redistributed
any way you want to. Linux ensures better protection and security, standard file structure and
community support.