Os Unit-I
Os Unit-I
UNIT - I
The following points indicate the need for the operating system:
1. More than one program runs at a time in a computer, and all of them
require your computer's CPU and memory. The operating system
manages resources for all those programs. That is why the operating
system is required.
2. Multitasking is a very critical feature of the OS. With its help, we can
run many programs simultaneously.
3. The operating system provides a platform to run any application
program in the computer.
4. It helps the user in file management. Through this, the user can save
the data according to his needs.
5. You use your mouse to open the application and click on the menu. All
this is possible due to the modern operating system. This operating
system allows you to do this with the help of GUI (Graphical user
interface).
6. The operating system creates a communication link between the user
and the computer, allowing the user to run any application program
and obtain the required output properly.
7. It is almost impossible for a user to use a computer system without
an operating system.
What is Computer?
What is a PC?
The PC is a general-purpose, cost-effective computer that stands for the personal
computer. It is When Ed Roberts introduced the MITS Altair 8800, he coined the term PC.
Alternatively, it is referred to as a single-user computer and a desktop that is designed to
be used by a single end-user. All PCs depend on the microprocessor technology that makes
it capable for PC makers to set the whole CPU (central processing unit) on a single chip.
PC contains a keyboard, mouse, monitor, and system unit. Most of the personal computers
have an Internet or a network connection, including ports for connecting peripheral devices
like external hard drives, scanners, printers, digital cameras, and more.
Personal computers are used to create spreadsheets, write papers, play games, track our
finances, account, run databases, and many other tasks. Also, at home, it is widely used for
playing PC games, multimedia entertainment, accessing the Internet and more. If your PC
is connected to the Internet, you can use it for communicating with friends via instant
messaging programs, browsing the Web, checking e-mail, and downloading data or files.
It is normal for a personal computer to create a network by connecting more than one PC
together, even though they are designed to use as single-user systems.
Personal Computer:
Personal computer operating systems are widely used for word processing,
spreadsheets, and Internet access.
You can say that your laptops, computer systems, tablets etc. are your
personal computers and the operating system such as windows 7, windows 10,
android, etc. are your personal computer operating system.
Operating System Components:
1. Process Management
2. Memory Management
3. File Management
4. Input/Output Management
Input/output Management: What output will come from the input given by
the user, the operating system runs this program. This management involves
coordinating various input and output devices. It assigns the functions of those
devices where one or more applications are executed.
Job Priority: The work of job priority is creation and promotion. It determines
what action should be done first in a computer system.
o The response time and throughput time of any process or program are
fast.
o It also offers a forum for various types of applications like system and
web application.
o It allows only a few tasks that can run at the same time.
o If any error occurred in the operating system; the stored data can be
destroyed.
o An unknown user can easily use any system without the permission of
the original user.
When the first electronic computer was developed in 1940, it was created without any
operating system.
The first operating system (OS) was created in the early 1950s and was known as GMOS.
General Motors has developed OS for the IBM computer.
The Third Generation (1965 - 1980) operating system designers were very capable of
developing a new operating system that could simultaneously perform multiple tasks in a
single computer program called multiprogramming.
The fourth generation of operating systems is related to the development of the personal
computer. A major factor related to creating personal computers was the birth of Microsoft and
the Windows operating system. Microsoft created the first window operating system in 1975. After
introducing the Microsoft Windows OS, Bill Gates and Paul Allen had the vision to take personal
computers to the next level. Therefore, they introduced the MS-DOS in 1981
Types of Operating Systems
Batch processing was very popular in the 1970s. The jobs were executed in
batches. People used to have a single computer known as a mainframe. Users
using batch operating systems do not interact directly with the computer. Each
user prepares their job using an offline device like a punch card and submitting
it to the computer operator. Jobs with similar requirements are grouped and
executed as a group to speed up processing.
The batch operating system grouped jobs that perform similar functions. These
job groups are treated as a batch and executed simultaneously. A computer
system with this operating system performs the following batch processing
activities:
2. Processing takes place in the order in which they are received, i.e., first
come, first serve.
3. These jobs are stored in memory and executed without the need for
manual information.
4. When a job is successfully run, the operating system releases its
memory.
There are mainly two types of the batch operating system. These are as follows:
The user did not directly interact with the computer system for job execution
in a simple batch operating system. However, the user was required to prepare
a job that included the program, control information, and data on the nature of
the job on control cards. The job was then submitted to the computer operator,
who was usually in the form of a punch card. The output appeared after some
time that could take days, hours, and minutes.
The operating system keeps the number of jobs in memory and performs them
one at a time. Jobs are processed in a first-come, first-served manner. Each
job set is defined as a batch. When a task is finished, its memory is freed, and
the work's output is transferred into an output spool for later printing or
processing. User interaction is limited in the batch operating system. When the
system takes the task from the user, user is free.
1. The CPU executes the jobs in the same sequence that they are sent to it
by the operator, which implies that the task sent to the CPU first will be
executed first. It's also known as the 'first come, first serve'
2. The word job refers to the command or instruction that the user and the
program should perform.
5. The user does not interface directly with the operating system in a batch
operating system; rather, all instructions are sent to the operator.
Advantages
1. 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.
2. This system can easily manage large jobs again and again.
4. When a process is finished, the next job from the job spool is run without
any user interaction.
Disadvantages
5. If a job enters an infinite loop, other jobs must wait for an unknown
period.
Disadvantages
Example:
What is a Real-Time operating system?
Real-time systems are used when there are time requirements that are
very strict like missile systems, air traffic control systems, robots, etc.
Types:
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 an 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.
Applications of Real-time operating system (RTOS):
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.
In Hard RTOS, all critical tasks must be completed within the specified time duration, i.e.,
within the given deadline. Not meeting the deadline would result in critical failures such as
damage to equipment or even loss of human life.
For Example,
Let's take an example of airbags provided by carmakers along with a handle in the driver's
seat. When the driver applies brakes at a particular instance, the airbags grow and prevent
the driver's head from hitting the handle. Had there been some delay even of milliseconds,
then it would have resulted in an accident.
Similarly, consider an on-stock trading software. If someone wants to sell a particular share,
the system must ensure that command is performed within a given critical time. Otherwise,
if the market falls abruptly, it may cause a huge loss to the trader.
Soft RTOS accepts a few delays via the means of the Operating system. In this kind of RTOS,
there may be a closing date assigned for a particular job, but a delay for a small amount of
time is acceptable. So, cut off dates are treated softly via means of this kind of RTOS.
For Example, This type of system is used in Online Transaction systems and Livestock price
quotation Systems.
In Firm RTOS additionally want to observe the deadlines. However, lacking a closing date
might not have a massive effect, however, may want to purposely undesired effects, like a
massive discount within the fine of a product.
For Example, this system is used in various forms of Multimedia applications.
o Easy to layout, develop and execute real-time applications under the real-time
operating system.
o The real-time working structures are extra compact, so those structures require
much less memory space.
o In a Real-time operating system, the maximum utilization of devices and systems.
o Focus on running applications and less importance to applications that are in the
queue.
o Since the size of programs is small, RTOS can also be embedded systems like in
transport and others.
o These types of systems are error-free.
o Memory allocation is best managed in these types of systems.
o Real-time operating systems have complicated layout principles and are very costly
to develop.
o Real-time operating systems are very complex and can consume critical CPU cycles.
Response The response is generated within The user must get the response
the second. within the specified time
constraint.
The major benefit of working with these types of 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.
Advantages of Distributed Operating System
Example:
Parallel Operating System
Disadvantages
These systems run on a server and provide the capability to manage data,
users, security, applications, and other networking functions.
One more important aspect of Network Operating Systems is that all the
users are aware of all other users within the network, their individual
connections, etc. and that’s why these computers are popularly known
as tightly coupled systems.
Multiprogramming OS
Advantages:
Disadvantages
1. It is highly complicated.
2. The CPU scheduling is required.
3. Memory management is needed in the operating system because all
types of tasks are stored in the main memory.
4. The harder task is to handle all processes and tasks.
User mode
A mode bit is added to the computer hardware to indicate the current mode:
kernel (0), user (1) The hardware allows privileged instructions to be executed
only in kernel mode.
Modes
Address Space
Interruptions
Restrictions
User interface
Program execution
I/O operations
File-system manipulation
Communications
Error detection
System Calls
System calls provide the interface between a running program and the
operating system.
Process control
File management
Device management
Information maintenance
Communications
Monolithic OS
1. List out the types of operating system and explain batch OS and time-
sharing OS in brief.
2. Explain about the distributed operating system in brief. (It may be any
type, like Batch OS, Time-Sharing, Real Time, Network, Multiprogram,
Parallel, Mobile OS)
3. Explain the various system calls are used in OS
4. Explain about the structure of OS.
5. Explain about the services of operating system
6. Explain about the need of OS with examples
7. Explain about the components of OS with examples
8. Explain about the Operations of OS with examples