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

Chapter 1 Introduction To Operating System

Uploaded by

mrnirajbro
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
Download as pdf or txt
0% found this document useful (0 votes)
13 views18 pages

Chapter 1 Introduction To Operating System

Uploaded by

mrnirajbro
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
Download as pdf or txt
Download as pdf or txt
You are on page 1/ 18

1 Introduction to Operating System

1.1 Introduce Operating System.


An Operating System (OS) is an interface between a computer user and computer
hardware. An operating system is a software which performs all the basic tasks
like file management, memory management, process management, handling
input and output, and controlling peripheral devices such as disk drives and
printers.
An operating system (OS) is a collection of software that manages computer
hardware resources and provides common services for computer programs.
1.2 Describe Functions of an Operating System.
Following are the some important functions of operating system.
1. 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.
2. 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 health. This can help improve performance by
providing important information needed to troubleshoot problems.
3. Job accounting
Operating system Keeps track of time and resources used by various tasks
and users, this information can be used to track resource usage for a
particular user or group of users.
4. Error detecting aids
The operating system constantly monitors the system to detect errors and
avoid the malfunctioning of a computer system.
5. Coordination between other software and users –
Operating systems also coordinate and assign interpreters, compilers,
assemblers, and other software to the various users of the computer
systems.
6. 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 access to memory, 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.
7. 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.
8. Device Management –
An OS manages device communication via their 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 in an
effective and efficient way. Deallocates devices when they are no longer
required.
9. 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 and status
of every file, and more… These facilities are collectively known as the file
system.

1.3 Explain different types of Operating System (Based on


Processing method, Batch Operating System, Time sharing
Operating System, Multiprocessing Operating System,
Multitasking Operating System, Real time Operating System and
Distributed Operating System).
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.
Time sharing Operating System
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.
Advantages of Time-Sharing OS:
• Each task gets an equal opportunity
• Fewer chances of duplication of software
• CPU idle time can be reduced
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
Examples of Time-Sharing OSs are: Multics, Unix, etc.
Multiprocessing Operating 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.
Advantages
The advantages of multiprocessor systems are as follows −
• If there are multiple processors working at the same time, more
processes can be executed parallel at the same time. Therefore the
throughput of the system will increase.
• Multiprocessor systems are more reliable. Due to the fact that there
are more than one processor, in case of failure of any one
processor will not make the system come to a halt. Although the
system will become slow if it happens but still it will work.
• Electricity consumption of a multiprocessor system is less than the
single processor system.
Multitasking Operating System
The operating system that runs more than one task at a time is known
as a multitasking operating system (MOS). MOS can be desktop or
mobile operating system (OS).
Different tasks run in the OS are MS Word, MS Excel, email
application, browser, media player, OS services etc. End users use all
these programs at the same time. But OS takes this concept little
different. Let me explain this concept by a diagram.

Diagram of multitasking in operating system


As shown in the diagram above, three tasks are running on the
computer. CPU gives 10 nanoseconds to each task. Time is shared
between task 1, task 2 and task 3. If task 1 is not completed in 10
nanoseconds then task 1 have to wait until task 2 and task 3 are given
time.
Note that one processor (CPU) can only run one process (task) at a
time. CPU gives small time to each process and switch to another
process.
Now let me discuss some of the advantages and disadvantages of
MOS.
Advantages of the multitasking operating system (MOS)
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.
Handle multiple users:
Multiple users running multiple programs can be best handled by
MOS. All programs run smoothly without a glitch in performance. All
users of OS are given a suitable amount of time.
Protected memory:
Memory is better managed in MOS. Unauthorized applications are not
given permission to overuse memory.
Efficient virtual memory:
If any program has long waiting time due to any I/O interrupt, that
program is shifted to virtual memory. After completion of the I/O
operation, the program comes back to RAM. The process of virtual
memory management is nicely handled in MOS.
Programs can run in the background:
OS services and another type of background services are also given
some time to run in the OS. These programs are not visible to a
normal computer user. But these programs keep running to maintain
other programs run smoothly. Example of background programs is a
firewall, anti-virus protection programs etc.
Increase reliability:
OS runs smoothly in using multitasking. All type of computer users
become satisfied. Either user can run a single program or multiple
programs they don’t feel any fault in using a computer.
The user can use multiple programs:
Multiple programs like MS Word, MS Excel, Photoshop, browser,
games, and calculator can run at the same time. This is a big advantage
to MOS.
Best use of computer resources:
Computer resources like RAM, Processor, I/O devices, hard drive, and
Gaming consoles are better managed in MOS.
Disadvantages of the multitasking operating system (MOS)
There are some drawbacks of MOS also. Some of them are discussed
below:
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.
Limitation of the processor:
If the processor is slow in the computer then it can process programs
slow and manage multiple programs takes longer time. Some heavy
programs cannot run smoothly on the slow processor because they
need more processing powers.
CPU heat up:
By doing multitasking, the processor becomes busy all the time and
CPU heats up. To solve this problem you have to attach the cooling
system to your CPU. This normally happens when you play heavy
games on your PC.
Examples of multitasking operating system
• Unix
• Windows XP, Vista, 7, 8, 10

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 for time-constraint is less strict.

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.
Distributed Operating System
These types of the operating system is 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
1.4 Explain OS Based on User Interface (Command user Interface
and Graphical user interface).
Command user Interface
CLI is a command line program that accepts text input to execute operating system functions.
CLI is a text-based interface. CLI allows a user to perform tasks by entering commands. Its
working mechanism is very easy, but it is not user friendly.
Users enter the specific command, press “Enter”, and then wait for a response. After receiving
the command, the CLI processes it accordingly and shows the output/result on the same screen.
Compared with a graphical user interface, a command-line interface requires fewer system
resources to implement.
CLI is a platform or medium wherever users answer a visible prompt by writing a command and
get the response from the system, for this users have to be compelled to kind command or train
of command for performing the task.
Advantages and Disadvantages of CLI

Advantages Disadvantages

If the user knows the correct commands


For someone who has never used a CLI,
then this type of interface can be much
it can be very confusing.
faster than any other type of interface.

This type of interface needs much less Commands have to be typed precisely. If
memory (RAM) in order to use compared there is a spelling error the command will
to other types of user interfaces. fail.

This type of interface does not use as much If you mis-type an instruction, it is often
CPU processing time as others. necessary to start from scratch again.

There are a large number of commands


A low resolution, cheaper monitor can be
which need to be learned - in the case of
used with this type of interface.
Unix it can be hundreds.

You can't just guess what the instruction.


A CLI does not require Windows to run.
might be and you can't just 'have a go'.
Graphical user Interface
GUI stands for Graphical User Interface. It is a visual representation of communication presented
to the user for easy interaction with the machine. The actions in a GUI are usually performed
through direct manipulation of graphical elements like buttons and icons. Communication can be
performed by interacting with these icons rather than the usual text-based or command-based
communication.
There are different elements and objects that the user use to interact with the software to make a
user-friendly GUI.
o Button: A graphical representation of a button that acts as a program when pressed.
o Dialogue box: A type of window that displays additional information and tasks a user for
input.
o Icon: Small graphical representation of a program, features, or file.
o Menu: List of commands or choices offered to the user through the menu bar.
o Ribbon: Replacement for the file menu and toolbar that groups programs activities
together.
o Tab: Clickable area at the top of a window that shows another page or area.
o Toolbar: Row of buttons, often near the top of an application window, that controls
software functions.
o Window: Rectangular section of the computer's display that shows the program currently
being used.

Advantages and Disadvantages

Advantages Disadvantages

This type of user interface is easy to GUIs take up a much larger amount of hard
use, especially for a beginner disk space than other interfaces

It is easy to explore and find your


They need significantly more memory (RAM)
way around the system using a
to run than other interface types
WIMP/ GUI interface

You do not have to learn They use more processing power than other
complicated commands types of interface
Advantages and Disadvantages

Advantages Disadvantages

There are usually a reasonable 'help' They can be slow for experienced programmers
system included with WIMP to use. These people often find CLI interfaces
interfaces much faster to use

You get the benefits of WYSIWYG

They let you exchange data between


different software applications

Difference between CLI and GUI


S.NO CLI GUI
1. CLI is difficult to use. Whereas it is easy to use.
2. It consumes low memory. While consuming more memory.
3. In CLI we can obtain high While in it, low precision is obtained.
precision.
4. CLI is faster than GUI. The speed of GUI is slower than CLI.
5. CLI operating system needs only a While GUI operating system needs both a
keyboard. mouse and keyboard.
6. CLI’s appearance can not be While its appearance can be modified or
modified or changed. changed.
7. In CLI, input is entered only at a While in GUI, the input can be entered
command prompt. anywhere on the screen.
8. In CLI, the information is shown While in GUI, the information is shown or
or presented to the user in plain presented to the user in any form such as:
text and files. plain text, videos, images, etc.

1.5 Describe OS based on Mode of user (Single user and Multiuser).


Single User Operating System
In a single user operating system, a single user can access the computer system at
a time. These types of operating systems are commonly found in home
computers. There are two types of single user operating systems called single
user, single task operating system and single user, multi-task operating system.

Figure 1: OS
In a single user, single task operating system, a single user can perform only one
task at a time. Palm OS for Palm handheld computers is an example for a single
user, single task operating system. In a single user multitask system, a single user
can perform multiple tasks at the same time. Microsoft Windows and Apple Mac
OS allow a single user to work on multiple programs at the same time. For
example, a user can work on a word document and browser the World Wide Web
simultaneously. Most modern personal computers and laptops are single user
multi-tasking operating systems.
The advantages:
• simplicity.
• dedicated use of hardware
• easily debugged.
The disadvantages:
• Once an application starts getting complicated it starts needing to process
things in parallel. And that adds interrupts, and the loss of simplicity.
Multi-User Operating System
A multi-user operating system allows multiple users to access the computer at the
same time. The operating system manages the memory and resources among the
various users according to the requirements. The task of one user will not affect
the tasks of the other users. UNIX and Linux are two examples of multi-user
operating systems.
A time-sharing operating system allows multiple users in different locations to use
a particular computer system concurrently. In distributed operating system, the
data processing task is divided among the processors accordingly. It is also a
multiuser operating system.
Advantages
1. you would be able to run different programs on their native OS’s.
2. You also would have a great deal of versatility in what you can do with your
computer. (e.g. gaming and software development, Windows and Linux
software development on the same system, ect.)
3. You can also do things in one OS that you wouldn’t be able to do in your
main OS. (Linux/FreeBSD could give you more control than Win10)
4. If you use your computer for work, then you can also use it to separate
work and leisure. (very helpful)
Disadvantages
1. Both OS’s must have adequate hardware support to work properly. If they
don’t it can be a mess.
2. At some point you may find yourself spending all of your time on one OS,
making the dual-boot kind a waste.
3. Switching between OS’s is usually smooth, but in my experience, that isn’t
always the case.
4. It would take a bit more work to set up vs. just having one OS.
Comparison between Single User and Multi-User Operating System:

Single User Multi-User

A multi-user operating system has


A single user operating system provides
been designed for more than one
Definition facilities to be used on one computer by
user to access the computer at the
only one user.
same or different time.

Single user, single task: A single task is Time-sharing systems: These


performed by one user at a time. systems are multi-user systems in
Example- The Palm OS for Palm which CPU time is divided among
handheld computers. the users. The division is made on
Types the basis of a schedule.
Single user, multi-task: Several
programs are run at the same time by a Most batch processing systems for
single user. For example- Microsoft the mainframe computers can also
Windows. be considered as ‘multi-user.’

Attributes Simple Complex

Windows 95, Windows NT Workstation Unix, Linux, and mainframes such


Examples
and Windows 2000 professional. as the IBM AS400.

You might also like