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

Name: Charles Kumar Singh Class: CSE (A) Class Roll: 172038144 University Roll No: 12500117083 Subject: Cs704a Date and Time: 09/10/2020 & 1:40 PM

1. The document provides information about a student named Charles Kumar Singh enrolled in class CSE(A) with roll number 172038144 and university roll number 12500117083. The document discusses mutual exclusion in distributed systems using algorithms like timestamp-based algorithm. It also discusses advantages of microkernel over monolithic kernel and advantages and disadvantages of distributed operating systems. Finally, it explains the working of remote procedure calls.

Uploaded by

Charles Singh
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
43 views

Name: Charles Kumar Singh Class: CSE (A) Class Roll: 172038144 University Roll No: 12500117083 Subject: Cs704a Date and Time: 09/10/2020 & 1:40 PM

1. The document provides information about a student named Charles Kumar Singh enrolled in class CSE(A) with roll number 172038144 and university roll number 12500117083. The document discusses mutual exclusion in distributed systems using algorithms like timestamp-based algorithm. It also discusses advantages of microkernel over monolithic kernel and advantages and disadvantages of distributed operating systems. Finally, it explains the working of remote procedure calls.

Uploaded by

Charles Singh
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 5

Name: Charles Kumar Singh

Class: CSE(A)
Class Roll: 172038144
University roll no: 12500117083
Subject: cs704A
Date and time: 09/10/2020 & 1:40 pm
Answer

1.
i) a
ii) b
iii) b
iv) b
v) c

2. Mutual exclusion: Mutual exclusion is a concurrency control property which is introduced to


prevent race conditions. It is the requirement that a process cannot enter its critical section while
another concurrent process is currently present or executing in its critical section i.e. only one
process is allowed to execute the critical section at any given instance of time.

Distributed approach for handling mutual exclusion:

Mutual Exclusion in Distributed System:


 Mutual Exclusion ensures that no other process will use shared resources at same time.
 Centralized Algorithm
 Distributed Algorithm
 Token Ring Algorithm.
 One process is elected as coordinator.
 Whenever process wants to enter a critical region, it sends request msg to coordinator
asking for permission.
 If no other process is currently in that critical region, the coordinator sends back a reply
granting permission.
 When reply arrives, the requesting process enters the critical region.
 If the coordinator knows that a different process is already in critical regions, so it cannot be
granted permission.

Distributed Algorithm:

 Timestamps are used for distributed mutual exclusion.


 Kieart & Agarwal’s Algorithm:
o When process wants to enter critical region, it builds message containing name of
critical region its process number and current time
o It sends msg to all including itself.
o If receiver if not in critical region and doesn’t want to enter it sends back Ok msg to
sender.
o If the receiver is already in critical region, it doesn’t reply, instead it queues request.
o If the receiver wants to enter critical region but has not yet done, so it compares the
timestamp in the incoming msg the lowest one wins.
o If its own msg has lower timestamp, the receiver queues the incoming request and
sends nothing.
 Drawbacks:
o If any process fails (Crashes), then it does not respond to request.
o It can be misinterpreted as denial of permission thus may cause blocking of all
processes.

4. The two advantages of microkernel over monolithic kernel are following:


a) Microkernel is more secure than monolithic kernel as if a service fails in microkernel the
operating system remains unaffected. On the other hands, if a service fails in monolithic kernel
entire system fails. Hence, microkernel is slow but secure while monolithic kernel is fast but less
secure as system crashes.

b) It is easy to extend microkernel because new service is to be added in user address space that is
isolated from kernel space, so the kernel does not require to be modified. Opposite is the case with
monolithic kernel if a new service is to be added in monolithic kernel then entire kernel needs to be
modified.

6. a) An operating system (OS) is basically a collection of software that manages computer


hardware resources and provides common services for computer programs. Operating system is a
crucial component of the system software in a computer system. 

Distributed Operating System is one of the important types of operating system.

Multiple central processors are used by Distributed systems to serve multiple real-time applications
and multiple users. Accordingly, Data processing jobs are distributed among the processors.
Processors communicate with each other through various communication lines (like high-speed
buses or telephone lines). These are known as loosely coupled systems or distributed systems.
Processors in this system may vary in size and function. They are referred as sites, nodes, computers,
and so on.

Advantages of distributed operating systems: -

With resource sharing facility, a user at one site may be able to use the resources available at
another.

Speedup the exchange of data with one another via electronic mail.

Failure of one site in a distributed system doesn’t affect the others, the remaining sites can
potentially continue operating.

Better service to the customers.

Reduction of the load on the host computer.

Reduction of delays in data processing.

Disadvantages of distributed operating systems: -

Security problem due to sharing.

Some messages can be lost in the network system.

Bandwidth is another problem if there is large data then all network wires to be replaced which
tends to become expensive.

Overloading is another problem in distributed operating systems.

If there is a database connected on local system and many users accessing that database through
remote or distributed way then performance become slow.

The databases in network operating is difficult to administrate then single user system.

Remote Procedure Call :


A remote procedure call is an interprocess communication technique that is used for client-server
based applications. It is also known as a subroutine call or a function call.
The sequence of events in a remote procedure call are given as follows −

 The client stub is called by the client.


 The client stub makes a system call to send the message to the server and puts the
parameters in the message.
 The message is sent from the client to the server by the client’s operating system.
 The message is passed to the server stub by the server operating system.
 The parameters are removed from the message by the server stub.
 Then, the server procedure is called by the server stub.

A diagram that demonstrates this is as follows −

Advantages of Remote Procedure Call

 Remote procedure calls support process oriented and thread-oriented models.


 The internal message passing mechanism of RPC is hidden from the user.
 The effort to re-write and re-develop the code is minimum in remote procedure calls.
 Remote procedure calls can be used in distributed environment as well as the local
environment.
 Many of the protocol layers are omitted by RPC to improve performance.

Disadvantages of Remote Procedure Call

 The remote procedure call is a concept that can be implemented in different ways. It is not a
standard.

 There is no flexibility in RPC for hardware architecture. It is only interaction based.


 There is an increase in costs because of remote procedure cal

You might also like