You are on page 1of 13

PART- B

Q.No Questions Mar


ks
1. i.Enumerate the different operating system structure with neat sketch. (8) 16

Operating System Structure


 An operating system is a construct that allows the user application programs to
interact with the system hardware. Since the operating system is such a complex
structure, it should be created with utmost care so it can be used and modified easily.
 An easy way to do this is to create the operating system in parts. Each of these parts
should be well defined with clear inputs, outputs and functions.

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

System calls in Operating System:

 The interface between a process and an operating system is provided by system


calls. In general, system calls are available as assembly language instructions.
 They are also included in the manuals used by the assembly level programmers.
 System calls are usually made when a process in user mode requires access to a
resource. Then it requests the kernel to provide the resource via a system call.
A figure representing the execution of the system call is given as follows –

 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.

System Programs Purpose


 The system program serves as a part of the operating system. It traditionally lies
between the user interface and the system calls.
 The user view of the system is actually defined by system programs and not system
calls because that is what they interact with and system programs are closer to the
user interface.
An image that describes system programs in the operating system hierarchy is as follows –

 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.,

Step 4) The execution of user processes resumed in Kernel mode.

ii. Types of System Calls:

There are the five types of System Calls in OS:

 Process Control
 File Management
 Device Management
 Information Maintenance
 Communications

Types of System calls in OS

Process Control
This system calls perform the task of process creation, process termination, etc.
Functions:

 End and Abort


 Load and Execute
 Create Process and Terminate Process
 Wait and Signal Event
 Allocate and free memory

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:

 Request and release device


 Logically attach/ detach devices
 Get and Set device attributes

Information Maintenance
It handles information and its transfer between the OS and the user program.

Functions:

 Get or set time and date


 Get process and device attributes

Communication:
These types of system calls are specially used for interprocess communications.

Functions:

 Create, delete communications connections


 Send, receive message
 Help OS to transfer status information
 Attach or detach remote devices

4. What are the functions of Operating Systems? 16


Functions of Operating Systems:

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.

Functions of Operating Systems Diagram:

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

 Allows companies to scale their computing resources to handle increased demand


without having to buy new hardware.
 Client-server systems can be quickly reconfigured to meet the changing needs of an
organization.
 They also tend to be more reliable and easier to maintain than dedicated server
systems.
 Lower operating cost.
 More reliable and easier to maintain than dedicated server systems.

Disadvantages

 These OS need more sophisticated management and networking technologies, longer


startup times, and increased vulnerability to attack.
 Less secure than dedicated server systems.
 More challenging to scale than dedicated server systems.

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

 Sometimes manual interventions are required between two batches.


 The CPU utilization is low because the time taken in loading and unloading batches
is very high compared to execution time.
 Sometimes jobs enter into an infinite loop due to some mistake.
 If one job is taking too much time, other jobs have to wait.

6. Discuss multiprocessor systems in detail. 16


 Most computer systems are single processor systems i.e they only have one
processor.
 Multiprocessor or parallel systems are increasing in importance nowadays.
 These systems have multiple processors working in parallel that share the computer
clock, memory, bus, peripheral devices etc.

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.

Advantages of Multiprocessor Systems


There are multiple advantages to multiprocessor systems. Some of these are −
More reliable Systems
 In a multiprocessor system, even if one processor fails, the system will not halt.
 This ability to continue working despite hardware failure is known as graceful
degradation.
 For example: If there are 5 processors in a multiprocessor system and one of them
fails, then also 4 processors are still working. So the system only becomes slower
and does not ground to a halt.
Enhanced Throughput
 If multiple processors are working in tandem, then the throughput of the system
increases i.e. number of processes getting executed per unit of time increase.
 If there are N processors then the throughput increases by an amount just under N.
More Economic Systems
 Multiprocessor systems are cheaper than single processor systems in the long run
because they share the data storage, peripheral devices, power supplies etc.
 If there are multiple processes that share data, it is better to schedule them on
multiprocessor systems with shared data than have different computer systems with
multiple copies of the data.

Disadvantages of Multiprocessor Systems


There are some disadvantages as well to multiprocessor systems. Some of these are:
Increased Expense
 Even though multiprocessor systems are cheaper in the long run than using multiple
computer systems, still they are quite expensive.
Complicated Operating System Required
 There are multiple processors in a multiprocessor system that share peripherals,
memory etc. So, it is much more complicated to schedule processes and impart
resources to processes.than in single processor systems.
 Hence, a more complex and complicated operating system is required in
multiprocessor systems.
Large Main Memory Required
All the processors in the multiprocessor system share the memory. So a much larger pool of
memory is required as compared to single processor systems.

(Note:*Blooms Level (R – Remember, U – Understand, AP – Apply, AZ – Analyze, E – Evaluate, C –


Create)
PART A- Blooms Level : Remember, Understand, Apply
PART B- Blooms Level: Understand, Apply, Analyze, Evaluate(if possible)
Marks: 16 Marks, 8+8 Marks, 10+6 Marks)

Subject In charge Course Coordinator HOD IQAC


(Name & Signature) (Name & Signature)

You might also like