Professional Documents
Culture Documents
Simple Structure
There are many operating systems that have a rather simple structure. These started
as small systems and rapidly expanded much further than their scope.
A common example of this is MS-DOS. It was designed simply for a niche amount
for people.
There was no indication that it would become so popular.
An image to illustrate the structure of MS-DOS is as follows –
It is better that operating systems have a modular structure, unlike MS-DOS.
That would lead to greater control over the computer system and its various
applications.
The modular structure would also allow the programmers to hide information as
required and implement internal routines as they see fit without changing the outer
specifications.
Layered Structure
One way to achieve modularity in the operating system is the layered approach. In
this, the bottom layer is the hardware and the topmost layer is the user interface.
An image demonstrating the layered approach is as follows −
As seen from the image, each upper layer is built on the bottom layer. All the layers
hide some structures, operations etc from their upper layers.
One problem with the layered structure is that each layer needs to be carefully
defined. This is necessary because the upper layers can only use the functionalities
of the layers below them.
ii.Describe about parallel Operating System.(8)
Parallel Processing Systems are designed to speed up the execution of programs by
dividing the program into multiple fragments and processing these fragments
simultaneously.
Such systems are multiprocessor systems also known as tightly coupled systems.
Parallel systems deal with the simultaneous use of multiple computer resources that
can include a single computer with multiple processors, a number of computers
connected by a network to form a parallel processing cluster or a combination of
both.
Parallel computing is an evolution of serial computing where the jobs are broken
into discrete parts that can be executed concurrently.
Each part is further broken down to a series of instructions.
Instructions from each part execute simultaneously on different CPUs.
Parallel systems are more difficult to program than computers with a single
processor because the architecture of parallel computers varies accordingly and the
processes of multiple CPUs must be coordinated and synchronized.
Several models for connecting processors and memory modules exist, and each
topology requires a different programming model.
The three models that are most commonly used in building parallel computers
include synchronous processors each with its own memory, asynchronous
processors each with its own memory and asynchronous processors with a common,
shared memory.
Flynn has classified the computer systems based on parallelism in the instructions
and in the data streams. These are:
1. Single instruction stream, single data stream (SISD).
2. Single instruction stream, multiple data stream (SIMD).
3. Multiple instruction streams, single data stream (MISD).
4. Multiple instruction stream, multiple data stream (MIMD).
The above classification of parallel computing system is focused in terms of two
independent factors: the number of data streams that can be simultaneously
processed, and the number of instruction streams that can be simultaneously
processed.
Even though Flynn has classified the computer ‘systems into four types based on
parallelism but only two of them are relevant to parallel computers.
These are SIMD and MIMD computers.
SIMD computers are consisting of ‘n’ processing units receiving a single stream of
instruction from a central control unit and each processing unit operates on a
different piece of data. Most SIMD computers operate synchronously using a single
global dock.
The block diagram of SIMD computer is shown below:
MIMD computers are consisting of ‘n’ processing units; each with its own stream of
instruction and each processing unit operate on unit operates on a different piece of
data.
MIMD is the most powerful computer system that covers the range of
multiprocessor systems. The block diagram of MIMD computer is shown.
The SIMD systems are easier to program because it deals with single thread of
execution. On the hand, the MIMD machines are more efficient because you can
utilize the full machine power.
Parallel operating systems are primarily concerned with managing the resources of
parallel machines.
A parallel computer is a set of processors that are able to work cooperatively to
solve a computational problem. So, a parallel computer may be
a supercomputer with hundreds or thousands of processors or may be a network of
workstations.
A few years ago, parallel computers could be found only in research laboratories
and they were used mainly for computation intensive applications like numerical
simulations of complex systems.
Today, there are a lot of parallel computers available in the market; used to execute
both data intensive applications in commerce and computation intensive applications
in science and engineering.
Today, new applications arise and demand faster computers. Commercial
applications are the most used on parallel computers.
A computer that runs such an application; should be able to process large amount of
data in sophisticated ways.
These applications include graphics, virtual reality, and decision support, parallel
databases, medicine diagnosis and so on.
We can say with no doubt that commercial applications will define future parallel
computers architecture but scientific applications will remain important users of
parallel computing technology.
Concurrency becomes a fundamental requirement for algorithms and programs. A
program has to be able to use a variable number of processors and also has to be
able to run on multiple processors computer architecture.
2. Explain system calls and system programs with its purpose in Operating Systems. 16
As can be seen from this diagram, the processes execute normally in the user mode
until a system call interrupts this.
Then the system call is executed on a priority basis in the kernel mode. After the
execution of the system call, the control returns to the user mode and execution of
user processes can be resumed.
In general, system calls are required in the following situations −
If a file system requires the creation or deletion of files. Reading and writing from
files also require a system call.
Creation and management of new processes.
Network connections also require system calls. This includes sending and receiving
packets.
Access to a hardware devices such as a printer, scanner etc. requires a system call.
System Program:
System programs provide an environment where programs can be developed and
executed. In the simplest sense, system programs also provide a bridge between the
user interface and system calls.
In reality, they are much more complex. For example, a compiler is a complex
system program.
In the above image, system programs as well as application programs form a bridge
between the user interface and the system calls.
So, from the user view the operating system observed is actually the system
programs and not the system calls.
3. Explain about i.How System Calls Works ii. Types of System Calls. 16
Steps for System Call in OS:
Architecture of the System Call
Step 1) The processes executed in the user mode till the time a system call interrupts it.
Step 2) After that, the system call is executed in the kernel-mode on a priority basis.
Step 3) Once system call execution is over, control returns to the user mode.,
Process Control
File Management
Device Management
Information Maintenance
Communications
Process Control
This system calls perform the task of process creation, process termination, etc.
Functions:
File Management
File management system calls handle file manipulation jobs like creating a file, reading, and
writing, etc.
Functions:
Create a file
Delete file
Open and close file
Read, write, and reposition
Get and set file attributes
Device Management
Device management does the job of device manipulation like reading from device buffers,
writing into device buffers, etc.
Functions:
Information Maintenance
It handles information and its transfer between the OS and the user program.
Functions:
Communication:
These types of system calls are specially used for interprocess communications.
Functions:
The main operation performed by operating system is to carries out is the allocation of
resources and services, such as allocation of the following −
Memory
Devices
Processors
Information
The operating system includes programs that are helpful to manage these resources, such as
a traffic controller, a scheduler, memory management module, I/O programs, and a file
system.
Security
The operating system uses a password protection to protect user data it also prevents
unauthorized access to programs and user data, but for external functionality we need to
install malware software to protect the system.
Control over system performance
The operating system monitors overall system setup to help in improving the
performance and it also records the response time between service requests and
system response so that it has a complete view of the system.
This can help improve performance by providing important information that is
needed at the time of troubleshooting problems.
Job Accounting
Operating systems always keep track of time and resources that are used by various tasks
and users, this information can be used to track resource usage for a particular user or a
group of users.
Error detecting aids
Operating systems constantly monitor the system which helps us to detect errors and also
avoid the malfunctioning of computer systems.
Coordination between other software and users
Operating systems help in coordinate and assign interpreters, compilers, assemblers, and
other software to the various users of the computer systems.
Memory Management
The operating system controls the primary memory or main memory.
Primary memory is a large array of bytes or words where each byte or word is
assigned a certain address.
It is a fast storage, and it can be accessed directly by the CPU which is present inside
the system. If a program wants to be executed, it should be first loaded in the main
memory.
The following activities are performed by operating system for memory management −
It keeps track of primary memory.
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 for how long the process must stay and the
order in which processes are granted access to memory.
It allocates the memory to a process when the process requests it and deallocates the
memory when the process has terminated.
Processor Management
The OS manages the order in which processes have access to the processor, and how
much processing time that each process must stay in the multiprogramming
environment.
This is called process scheduling.
The following activities are performed by operating system for processor management −
Keeps track of the status of processes.
The program to track the status is known as traffic controller.
It allocates the CPU and deallocates the processor when it is not required.
Device Management
An OS manages device communication through respective drivers.
The following activities are performed by the operating system for device management.
Keeping track of all devices connected to the system.
The OS designates a program that is responsible for every device which is called the
Input/output controller.
It decides which process gets access to which device and for how long. It then
allocates the devices in an effective and efficient way and de-allocates devices when
they are not required.
File Management
A file system is arranged into directories for efficient navigation and usage. These
directories contain other directories and other files.
The following activities are performed by operating system for file management activities −
It keeps track of where information is stored, user access settings and status of every
file and more.These facilities are called the file system.
16
5. Explain Client/Server Operating System and Batch Operating System in detail.
Client/server network OS
Client/server network operating systems are those networks that contain two types of
nodes, the servers, and clients.
The servers host the applications or services for users while clients use these
applications.
In a client/server system, both the server and client computers must have certain
software installed to connect to each other securely over a network connection.
Client-server networks are a type of computer network in which two or more
computer systems are linked through a telecommunications network.
Clients are the computers that use the network to access services provided by the
server.
Servers are the computers that provide the services to the network. Client/server
networks are commonly used in business and government applications.
Advantages
Disadvantages
Batch OS
There are different users and each user prepares their work in a standalone device
such as punch cards in batch operating systems and sends them to a computer
operator.
The various systems split and distribute similar tasks in batches to facilitate
computing and faster responses.
A single operator takes similar types of jobs that share similar needs and
requirements, then groups them in various batches .
Advantages
The overall time taken by the system to execute all the programs will be reduced.
Less time to execute all programs.
These operating systems are shared between multiple users.
Suitable for small-scale businesses.
It can work in offline mode also.
Can give specific time to the computer, and when a computer is idle can process the
jobs.
Disadvantages
Types of Multiprocessors
There are mainly two types of multiprocessors i.e. symmetric and asymmetric
multiprocessors. Details about them are as follows −
Symmetric Multiprocessors
In these types of systems, each processor contains a similar copy of the operating
system and they all communicate with each other.
All the processors are in a peer to peer relationship i.e. no master - slave relationship
exists between them.
An example of the symmetric multiprocessing system is the Encore version of Unix
for the Multimax Computer.
Asymmetric Multiprocessors
In asymmetric systems, each processor is given a predefined task.
There is a master processor that gives instruction to all the other processors.
Asymmetric multiprocessor system contains a master slave relationship.
Asymmetric multiprocessor was the only type of multiprocessor available before
symmetric multiprocessors were created. Now also, this is the cheaper option.