Operating System Concept
Operating System Concept
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:
• 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:
• Reliability problem
• One must have to take care of the security and integrity of user programs
and data
• Data communication problem
• 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:
• 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: