Вы находитесь на странице: 1из 9

Operating System

Introduction to Operating System


An operating system is a program that acts as an interface between the
user and the computer hardware and controls the execution of all kinds
of programs.

An operating system (OS) is the program that, after being initially


loaded into the computer by a boot program, manages all the other
programs in a computer. The other programs are called applications or
application programs. The application programs make use of the
operating system by making requests for services through a defined
application program interface (API). In addition, users can interact
directly with the operating system through a user interface such as a
command line or a graphical user interface (GUI).
Introduction to System programs
System program are those programs that controls some aspect of the
operation of a computer (opposed to application program).
System programs are made through system programming. System
programming is an essential and important foundation in any
computers application development, and always evolving to
accommodate changes in the computer hardware. This kind of
programming requires some level of hardware knowledge and is
machine dependent.
System programs are usually written in a low-level programming
language which is able to operate efficiently in a resource-constrained
environment, and with little runtime overhead using a small library, or
none at all. The low-level language enables direct control over memory
access and allows the program to be written directly in an assembly
language. The majority of programs are written using assembly
languages such as C, C++ and C#.
System programming leads to the development of computer system
software that manages and controls the computer operations.
Typical system programs include the operating system and firmware,
programming tools such as compilers, assemblers, I/O routines,
interpreters, scheduler, loaders and linkers as well as the runtime
libraries of the computer programming languages.
Evolution of operating System
The first computers used batch operating systems, in which the
computer ran batches of jobs without stop. Programs were punched
into cards that were usually copied to tape for processing. When the
computer finished one job, it would immediately start the next one on
the tape. To speed up processing, jobs with similar needs are batched
together and run as a group. The programmers leave their programs
with the operator and the operator then sorts the programs with similar
requirements into batches.
The problems with Batch Systems are as follows
1. Lack of interaction between the user and the job.
2. CPU is often idle, because the speed of the mechanical I/O devices is
slower than the CPU.
Time-shared operating systems: A Time-Shared Operating System
allows the many users to share the computer simultaneously. Users
interacted directly with the computer via a printing terminal. Several
users shared the computer at the same time, and it spent a fraction of a
second on each one's job before moving on to the next. A fast computer
could work on many user's jobs at the same time, while creating the
illusion that they were receiving its full attention.
Advantages of Timesharing operating systems are as follows
1. Provides the advantage of quick response.
2. Avoids duplication of software.
3. Reduces CPU idle time.
Disadvantages of Time-sharing operating systems are as follows
1. Problem of reliability.
2. Question of security and integrity of user programs and data.

Multi programming operating System : In


this type of Operating System, more than one program will reside into
main memory. The Operating System picks and begins to execute one of
the jobs in the memory. Eventually, the job may have to wait for some
task, the Operating System simply switches to and executes another
job. When the first job finishes waiting and gets the CPU back. As long
as there is always some job to execute, the CPU will never be idle.
Multi tasking Operating system: Multitasking operating system execute
more than one task simultaneously on a single processor machine. Though
we say so but in reality no two tasks on a single processor machine can be
executed at the same time. Actually CPU switches from one task to the next
task so quickly that appears as if all the tasks are executing at the same
time. More than one task/program/job/process can reside into the same
CPU at one point of time.

Multi processing OS: Multiprocessor operating system execute execute


more than one process simultaneously on a multi processor machine. In
this, a computer uses more than one CPU at a time.
Multiprocessor Operating System refers to the use of two or more central
processing units (CPU) within a single computer system. These multiple
CPUs are in a close communication sharing the computer bus, memory and
other peripheral devices. These systems are referred as tightly coupled
systems.
These types of systems are used when very high speed is required to
process a large volume of data. These systems are generally used in
environment like satellite control, weather forecasting etc

Real Time Operating System: Definition A real-time operating system


(RTOS) is an operating system that guarantees a certain capability within a
specified time constraint.
Real-time systems are used when there are rigid time requirements on the
operation of a processor or the flow of data and real-time systems can be
used as a control device in a dedicated application.
For example Scientific experiments, medical imaging systems, industrial
control systems, weapon systems, robots.
Two types of RTOS-
1. Soft real time operating system: Soft real time OS is a type of OS where
certain deadlines may be missed, they will respond at a time t=0+.
Soft real time systems are not constrained to extreme rules. The critical
time of the soft real time may be delayed to some extent. The expected
latency between the tasks and time constraints may be deviated.
The preemption period for a soft real time task is about few milliseconds.
Examples: Digital camera, online data base etc.
2. Hard Real time operating system: Hard real time OS is a type of OS we
can predict the deadline, they will respond at a time t=0. Hard real time
systems are constrained to predicted time constraints, deadlines and
latency.
The preemption period for hard real time system is almost less than few
microseconds.
Examples: Air bag control in cars, anti-lock brake, engine control system etc.
Distributed Operating System: A distributed operating system is a software
over a collection of independent, networked, communicating, and
physically separate computational nodes.
A distributed OS provides the essential services and functionality required
of an OS but adds attributes and particular configurations to allow it to
support additional requirements such as increased scale and availability. To
a user, a distributed OS works in a manner similar to a single-node,
monolithic operating system. That is, although it consists of multiple nodes,
it appears to users and applications as a single-node.
Features:
1. The OS distributes computation logics among several physical processors.
2. The processors do not share memory or a clock. Instead, each processor
has its
own local memory.
3. The OS manages the communications between the processors. They
communicate with each other through various communication lines.
Network Operating System: A network operating system provides services
for computers connected to a network. Examples include shared file access,
shared applications, and printing capabilities. A NOS may either be a peer-
to-peer (P2P) OS, which is installed on each computer, or a client-server
model, where one machine is the server and others have client software
installed.
Client-server network operating systems include Novell NetWare and
Windows Server.
Peer to per NOS include latest versions of windows and osx.

Difference between Distributed os and Networked os


Network Operating System Distributed Operating System
1. A network operating system is made 1. A distributed operating system is an
up of software and associated protocols ordinary centralized operating system
that allow a set of computer network to but runs on multiple independent CPUs.
be used together.

2. Users are aware of multiplicity of 2. Users are not aware of multiplicity of


machines. machines.
3. Execute an entire process, or parts of 3. Execute an entire process, or parts of
it, at the remote server. it, at different sites.
4. Run process remotely, and needs to 4. Run process remotely, rather than
transfer all the data to the server for transfer all data locally.
processing.
5. Employs a client-server model 5. Employs a master-slave model.

Bare Machine: Bare machine (or bare metal), in computer parlance, means
a computer executing instructions directly on logic hardware without an
intervening operating system.
The Bare machine is a type of environment in which there is no operating
system between the user and the system. Eventually, all the user
applications are executed and installed directly on the top of the hardware
resource using the machine language. The program has the full control of
the system due to the absence of operating system.
The use of a bare machine was cumbersome and inefficient since all the
tasks have to be done manually.
Today it is mostly applicable to embedded systems and firmware generally
with time-critical latency requirements, while conventional programs are
run by a runtime system overlaid on an operating system.
Clustered Systems: Clustered computers share storage and are closely
limked via Local Area Network(LAN) or faster interconnection.
Clustered system combines the best feature of distributed os and multi
processor system.
A computer cluster is a set of loosely or tightly connected computers that
work together so that, in many respects, they can be viewed as a single
system.
Example of cluster operating systems UnixWare, MOSIX and GLUnix.

Handheld Operating System: Handheld operating Systems are used for


small computing devices.
1. Since handheld operating systems are designed to run on machines that
have lower speed processors and less memory, they were
designed to use less memory and require fewer resources.
2.Handheld operating systems are also designed to work with different
types of hardware than standard desktop operating systems. This is
because the power requirements for standard CPU's and memory far
exceed the power that handheld devices.
Example: Android, IOS
Operating System services
Following are the five services provided by an operating systems :
1. Program Execution: The purpose of a computer systems is to allow the
user to execute programs. So the operating systems provides an
environment where the user can conveniently run programs.
Following are the major activities of an operating system with respect to
program management
Loads a program into memory.
Executes the program.
Handles program's execution.
Provides a mechanism for process synchronization.
Provides a mechanism for process communication.
Provides a mechanism for deadlock handling.
2. I/O Operations: A program which is currently executing may require I/O,
which may involve file or other I/O device. For efficiency and protection,
users cannot directly govern the I/O devices. So, the OS provide a means to
do I/O Input / Output operation which means read or write operation with
any file.
3. File System Manipulation: Programs need has to be read and then write
them as files and directories. File handling portion of operating system also
allows users to create and delete files by specific name along with
extension, search for a given file and / or list file information. Some
programs comprise of permissions management for allowing or denying
access to files or directories based on file ownership.
4. Communications: Process needs to swap over information with other
process. Processes executing on same computer system or on different
computer systems can communicate using operating system support.
Communication between two processes can be done using shared memory
or via message passing.
5. Error Detection: Errors may occur within CPU, memory hardware, I/O
devices and in the user program. For each type of error, the OS takes
adequate action for ensuring correct and consistent computing.
6. Protection and Security: Protection includes in ensuring all access to
system resources in a controlled manner. For making a system secure, the
user needs to authenticate him or her to the system before using (usually
via login ID and password).
Operating System Structures
Monolithic Operating System: The components of monolithic operating
system are organized haphazardly and any module can call any other
module without any reservation. The applications in monolithic OS are
separated from each other by placing them at different hardware addresses
and the operating system itself is also separated from applications. That is,
the operating system code runs in a privileged processor mode (referred to
as kernel mode), with access to system data and to the hard-ware;
applications run in a non-privileged processor mode (called the user mode),
with a limited set of interfaces available and with limited access to system
or data.
The monolithic operating system is the earliest and most common
operating system architecture. Every component of the operating system is
contained in the kernel and can directly communicate with any other (i.e.,
simply by using function calls). The kernel typically executes with
unrestricted access to the computer system (Fig. 1.3). OS/360, VMS and
Linux are broadly characterized as monolithic operating systems.106 Direct
intercommunication between components makes monolithic operating
systems highly efficient. Because monolithic kernels group components
together.

The monolithic structure does not enforce data hiding in the operating
system. It delivers better application performance, but extending such a
system can be difficult work because modifying a procedure can introduce
bugs in seemingly unrelated parts of the system. Example Systems: CP/M
and MS-DOS
Layered Operating System: As operating systems became larger and more
complex, purely monolithic designs became unwieldy. The layered approach
to operating systems attempts to address this issue by grouping
components that perform similar functions into layers. Each layer
communicates exclusively with those immediately above and below it.
Lower- level layers provide services to higher-level ones using an interface
that hides their implementation.
Layered operating systems are more modular than monolithic operating
systems, because the implementation of each layer can be modified
without requiring any modification to other layers.A modular system has
self-contained componen that can be reused throughout the system. Each
component hides how it performs.
or The components of layered operating system are organized into modules
and layers them one on top of the other. Each module provides a set of
functions that other module can call. Interface functions at any particular
level can invoke services provided by lower layers but not the other way
around.
One advantage of a layered operating system structure is that each layer of
code is given access to only the lower-level interfaces (and data structures)
it requires, thus limiting the amount of code that wields unlimited power.
That is in this approach, the Nth layer can access services provided by the
(N-1)th layer and provide services to the (N+1)th layer. This structure also
allows the operating system to be debugged starting at the lowest layer,
adding one layer at a time until the whole system works correctly. Layering
also makes it easier to enhance the operating system; one entire layer can
be replaced without affecting other parts of the system. Layered operating
system delivers low application performance in comparison to monolithic
operating system.
Example Systems:
VAX/VMS, Multics, UNIX

3. Virtual Machine: Most computers consist of multiple layers of hardware


and software that operate together as a system. Hardware resources
typically include a central processor, display, storage, networking, and other
peripheral devices. Device drivers installed in the operating system control
hardware resources, translating operating-system instructions into the
specific device control language. Device drivers assume exclusive device
ownership. For example, it is assumed that a video driver owns the video
adapter exclusively. Any software application that calls the video adapter
must interact with the hardware through the video driver.
Exclusive device ownership typically precludes running more than one
operating system simultaneously on a
computer. Virtual machine technology overcomes this limitation by
redirecting interactions with device resources to lower system levels in such
a way that higher-level application layers are unaffected. The Virtual Server
2005 virtual machine technology allows you to run multiple operating
systems simultaneously on a single physical computer.
4. Client Server Operating System: The idea is to divide the operating
system into several processes, each of which implements a single set of
services - for example, I/O servers, memory server, process server, threads
interface system. Each server runs in user mode, provides services to the
requested client. The client, which can be either another operating system
component or application program, requests a service by sending a
message to the server. An OS kernel (or microkernel) running in kernel
mode delivers the message to the appropriate server; the server performs
the operation; and microkernel delivers the results to the client in another
message. Eg: PARAS operating system developed by C-CAC.

Вам также может понравиться