0% found this document useful (0 votes)
3 views

Operating System Concept

An operating system (OS) serves as an intermediary between users and computer hardware, enabling efficient program execution. The document outlines the evolution of OS through four generations, detailing their characteristics and functionalities, including batch systems, time-sharing, distributed, network, and real-time operating systems. It also covers the need for an OS, its functions such as memory and file management, booting processes, and the importance of system calls.

Uploaded by

hiranshi05112004
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views

Operating System Concept

An operating system (OS) serves as an intermediary between users and computer hardware, enabling efficient program execution. The document outlines the evolution of OS through four generations, detailing their characteristics and functionalities, including batch systems, time-sharing, distributed, network, and real-time operating systems. It also covers the need for an OS, its functions such as memory and file management, booting processes, and the importance of system calls.

Uploaded by

hiranshi05112004
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 55

OPERATING

SYSTEM
CONCEPT
 What is Operating System?
 An operating system acts as an intermediary between the user of a
computer and the computer hardware.
 The purpose of an operating system is to provide an environment in which
a user can execute programs in a convenient and efficient manner.
 Definition:
 An operating system is a program that controls the execution of application
programs and acts as an interface between the user of a computer and the
computer hardware.
EVOLUTION OF OPERATING SYSTEM:

 Operating Systems, has evolved in past years. It went through several


changes before getting its original form.
 These changes in the operating system are known as the evolution of
operating systems. The evolution of the operating system went through
four generations.
 First Generation:

• This phase is considered from 1945-1955. Earlier mechanical systems were


used which involved the use of large machines whose parts were manually
handled by workers.
• The limited capacity to work of a human and the tendency to commit an
error by a person often lead to problems. Thus electronic machines were
introduced to do the work.
• Though these machines did not use an OS at all still this phase is regarded
as the beginning of the Operating Systems era.
 The electronic machines supplied instructions that were to be executed by
the machine immediately because if an error occurred, the whole process
was to be restarted again.
 The calculation speed in these machines was limited and still errors could
occur if there was any error in the instruction provided to the machine.
 These systems were referred to as serial processing systems.
 Second Generation:
 The phase from 1955 to 1965 marked the second generation of Operating
Systems. The systems in this generation were regarded as Batch Systems.
 These were known as batch operating systems as the jobs to be done
were supplied in a batch to the machine.
 A Batch referred to a set of similar tasks or jobs. Job Control Language was
used to create the instructions to execute the job.
 The instructions were punched on a card which was then loaded onto a
tape that had several such cards and then it was finally sent to the
processor.
 The second generation of OS ensured that the machines remained as busy
as possible so that maximum efficiency could be obtained.
 The machine took up a job, process the instructions, and then move to the
next job that was present on the card loaded onto the tape.
 If an error occurred during a particular job, then the job needs to be
restarted again.
• These systems made it possible to execute multiple jobs on a single
machine and laid the foundation for multitasking.
• These systems had a drawback in that when the I/O operations were
carried out, the processor had to remain idle.
 Third Generation:

• The phase from 1965-1980 is considered as the third generation of OS. It


saw the rise of multi-programmed batched systems.
• These systems were very similar to the batched operating systems. These
systems had the ability of multitasking and multiprogramming where the
tasks of multiple users could be run simultaneously.
• Users could connect to the machine and submit their tasks through an
online terminal.
• The OS held all the tasks in the main memory and managed the tasks to
be executed using various scheduling algorithms such as FCFS, SJF, LJF,
etc. This also ensured that the tasks or jobs do not suffer from starvation.
 Fourth Generation:

• 1980 onwards, the generation of OS is known as the fourth generation.


With the development of computer networking and various networking
protocols, these operating systems allowed the users to know the
existence of other users on the network.
• The operating systems in this generation saw the use of a Graphical User
Interface (GUI) which made it very easy to interact with the operating
system and in turn with the hardware.
 The fourth generation of operating systems saw the invention of time-
shared operating systems and the Macintosh operating systems.
NEED OF AN OPERATING
SYSTEM
• 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.
• Multitasking is a very critical feature of the OS. With its help,
we can run many programs simultaneously.
• The operating system provides a platform to run any
application program in the computer. Due to which we can do
our work with the help of that application.
• It helps the user in file management. Through this, the user
can save the data according to his needs.
• 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).
• 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.
• It is almost impossible for a user to use a computer system
without an operating system. Many processes run
simultaneously when a program is executed, which is not
easy for a person to manage.
TYPES OF OS
 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 Systems –
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.


 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
 Examples of Distributed Operating System are- LOCUS, etc.
 Network Operating System –
These systems run on a server and provide the capability to manage data,
users, groups, security, applications, and other networking functions.
 These types of operating systems allow shared access of files, printers,
security, applications, and other networking functions over a small private
network.
 One more important aspect of Network Operating Systems is that all the
users are well aware of the underlying configuration, of all other users
within the network, their individual connections, etc.
 and that’s why these computers are popularly known as tightly coupled
systems.
 Advantages of Network Operating System:

• Highly stable centralized servers


• Security concerns are handled through servers
• New technologies and hardware up-gradation are easily integrated into the
system
• Server access is possible remotely from different locations and types of
systems
 Disadvantages of Network Operating System:

• Servers are costly


• User has to depend on a central location for most operations
• Maintenance and updates are required regularly

 Examples of Network Operating System are: Microsoft Windows


Server 2003, Microsoft Windows Server 2008, UNIX, Linux, Mac OS X,
Novell NetWare, and BSD, etc.
 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.
 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.
BOOTING
 Booting is the process of starting a computer. It can be initiated by
hardware such as a button press or by a software command.
 Sequencing of Booting
 Booting is a start-up sequence that starts the operating system of a
computer when it is turned on. A boot sequence is the initial set of
operations that the computer performs when it is switched on. Every
computer has a boot sequence.
 Boot Loader: Computers powered by the central processing unit can only
execute code found in the system's memory.
 Modern operating systems and application program code and data are
stored on nonvolatile memories.
 When a computer is first powered on, it must initially rely only on the code
and data stored in nonvolatile portions of the system's memory. The
operating system is not really loaded at boot time, and the computer's
hardware cannot perform many complex systems actions.
 The program that starts the chain reaction that ends with the entire
operating system being loaded is the boot loader or bootstrap loader. The
boot loader's only job is to load other software for the operating system to
start.
 Boot Devices:
 The boot device is the device from which the operating system is loaded. A
modern PC BIOS (Basic Input/Output System) supports booting from
various devices.
 These include the local hard disk drive, optical drive, floppy drive, a
network interface card, and a USB device. The BIOS will allow the user to
configure a boot order. If the boot order is set to:
• CD Drive
• Hard Disk Drive
• Network
 The BIOS will try to boot from the CD
 drive first, and if that fails, then it will try to boot from the hard disk drive
 , and if that fails, then it will try to boot from the network, and if that fails,
then it won't boot at all.
 Boot Sequence:
 There is a standard boot sequence that all personal computers use.
 First, the CPU runs an instruction in memory for the BIOS. That instruction
contains a jump instruction that transfers to the BIOS start-up program.
 This program runs a power-on self-test (POST) to check that devices the
computer will rely on are functioning properly.
 Then, the BIOS goes through the configured boot sequence until it finds a
bootable device.
 Once BIOS has found a bootable device, BIOS loads the bootsector and
transfers execution to the boot sector.
 If the boot device is a hard drive, it will be a master boot record (MBR).
 The MBR code checks the partition table for an active partition. If one is
found, the MBR code loads that partition's boot sector and executes it.
 The boot sector is often operating system specific, and however, in most
operating systems, its main function is to load and execute the operating
system kernel, which continues start-up.
 Suppose there is no active partition, or the active partition's boot sector is
invalid.
 In that case, the MBR may load a secondary boot loader which will select a
partition and load its boot sector, which usually loads the corresponding
operating system kernel.
FUNCTION OF OS
 Instruction:
 The operating system establishes a mutual understanding between the
various instructions given by the user.

 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
 Memory Management:
 The operating system handles the responsibility of storing any data,
system programs, and user programs in memory.
 This function of the operating system is called memory management.

 File Management:
 The operating system is helpful in making changes in the stored files and
in replacing them.
 It also plays an important role in transferring various files to a device.
 Processor Management:
 The processor is the execution of a program that accomplishes the
specified work in that program.
 It can be defined as an execution unit where a program runs.

 Job Priority:
 The work of job priority is creation and promotion.
 It determines what action should be done first in a computer system.
 Special Control Program:
 The operating systems make automatic changes to the task through
specific control programs.
 These programs are called Special Control Program.

 Job accounting:
 It keeps track of time & resources used by various jobs and users.
 Scheduling of resources and jobs:
 The operating system prepares the list of tasks to be performed for the
device of the computer system.
 The operating system decides which device to use for which task. This
action becomes complicated when multiple tasks are to be performed
simultaneously in a computer system.
 The scheduling programs of the operating system determine the order in
which tasks are completed.
 It performs these tasks based on the priority of performing the tasks given
by the user.
 It makes the tasks available based on the priority of the device.
 Security:
 Computer security is a very important aspect of any operating system. The
reliability of an operating system is determined by how much better
security it provides us.
 Modern operating systems use a firewall for security.
 A firewall is a security system that monitors every activity happening in the
computer and blocks that activity in case of any threat.
 Monitoring activities:
 The operating system takes care of the activities of the computer system
during various processes.
 This aborts the program if there are errors. The operating system sends
instant messages to the user for any unexpected error in the input/output
device.
 It also provides security to the system when the operating system is used
in systems operated by multiple users. So that illegal users cannot get data
from the system.
INTERRUPT AND SYSTEM
CALL, DATA BUS AND
ADDRESS BUS
 What is a System Call?
 A system call is a method for a computer program to request a service
from the kernel of the operating system on which it is running.
 A system call is a method of interacting with the operating system via
programs.
 A system call is a request from computer software to an operating system's
kernel.
 The Application Program Interface (API) connects the operating
system's functions to user programs.
 It acts as a link between the operating system and a process, allowing user-
level programs to request operating system services.
 The kernel system can only be accessed using system calls.
 System calls are required for any programs that use resources.
 What is Interrupt in OS?
 An interrupt is a signal emitted by hardware or software when a process or
an event needs immediate attention.
 It alerts the processor to a high-priority process requiring interruption of
the current working process.
 In I/O devices, one of the bus control lines is dedicated for this purpose
and is called the Interrupt Service Routine (ISR).
 As a CPU needs to communicate with the various memory and input-output
devices (I/O) as we know data between the processor and these devices
flow with the help of the system bus.
 Address Bus:

• Used to carry the address to memory and IO.


• Unidirectional.
• Based on width of a address bus we can determine the capacity of a main
memory
• Data Bus:
• Used to carry the binary data between the CPU, memory and IO.
• Bidirectional.
• Based on the width of a data bus we can determine the word length of a
CPU.
• Based on the word length we can determine the performance of a CPU.

You might also like