University of Okara, Okara: Department of Computer Science

You might also like

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 5

University of Okara, Okara

Department of Computer Science


Mid Term Examination – Spring-2020
Course Title: Distributed Computing Course Code: CS-Elec Credit Hours: 3
Course Instructor: Muhammad Tahir Mumtaz Program Name: BSCS
Semester: 8th Session 2016-2020 Shift: Morning + Evening Date: 06-12-20
Time Allowed: 01 Hour30 Minutes Marks: 10
Name M WAQAS Roll # 114

SQ.1 What are the limitaion of distribution system?

ANS:
LIMITATIONS :

 Fault tolerance
 Security problem due to sharing
 It is difficult to develop distributed software e.g FB etc
 Some messages can be lost in the network system due to network problem
 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
 Openess

SQ.2 What are characteristics of distributed system in given


assigment?

ANS:

The topic of my assignment is Facebook distribued system

Facebook Distributed System has the following characteristics:

© iiiUniversity iiiof iiiOkara


1
 Resource sharing
 Centralized data center at US to increase reliability and availability
 A single data center failure dose not effect others
 Biggest distributed system with 2.6 billion users
 It consists of several independent computers connected through communication network,
 The computers communicate with each other by exchanging message over a communication
network.
 Each computer has its own memory, clock and runs its own operating system.
 Each computer has its own resources, called local resources
 Remote resources are accessed through the network

SECTION II - Long Questions

Q1: What are the basic problems in challenges in distributed


system discuss in detail.
ANS:
Basic problems and challenges in distributed system

 Scalability
 Transparency
 Fault tolerance
 Concurrency
 Openness
 These challenges can also be seen as the goals or desired properties of a distributed system
Transparency:

 Concealment from the user and the application programmer of the separation of the
components of a distributed system
 Access Transparency - Local and remote resources are accessed in same way
 Location Transparency - Users are unaware of the location of resources
 Migration Transparency - Resources can migrate without name change
 Replication Transparency - Users are unaware of the existence of multiple copies of
resources
 Failure Transparency - Users are unaware of the failure of individual components
 Concurrency Transparency - Users are unaware of sharing resources with others

Scalability:

© iiiUniversity iiiof iiiOkara


2
 Addition of users and resources without suffering a noticeable loss of performance or
increase in administrative complexity
 Adding users and resources causes a system to grow:
Size - growth with regards to the number of users or resources
 System may become overloaded
 May increase administration cost
 Geography - growth with regards to geography or the distance between nodes
 Greater communication delays
 Administration – increase in administrative cost

Fault Tolerance:

 Hardware, software and networks fail


 Distributed systems must maintain availability even at low levels of hardware,
software, network reliability
 Fault tolerance is achieved by
Recovery
Redundancy
 Issues
Detecting failures
Recovery from failures
Redundancy

Concurrency :

 In a single system several processes are interleaved


 In distributed systems - there are many systems with one or more processors
 Many users simultaneously invoke commands or applications, access and
update shared data
 Mutual exclusion
 Synchronization
 No global clock

Openess :

 Whether the system can be extended in various ways without troublesome


existing system and services
 Hardware extensions
© iiiUniversity iiiof iiiOkara
3
 adding peripherals, memory, communication interfaces
 Software extensions
 Operating System features
 Communication protocols
 Openness is supported by:
 Public interfaces
 Standardized communication protocols

Q2: Define and discuss the following terms:

a) Mutual Exclusion b) Synchronization


c)Adaptability

ANS:
Mutual Exclusion:

Mutual exclusion is a concurrency control property which is introduced to


prevent race conditions. It is the requirement that a process can not 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.

Requirements of Mutual exclusion Algorithm:


 No Deadlock:
Two or more site should not endlessly wait for any message that will never arrive.
 No Starvation:
Every site who wants to execute critical section should get an opportunity to execute it in finite
time. Any site should not wait indefinitely to execute critical section while other site are
repeatedly executing critical section
 Fairness:
Each site should get a fair chance to execute critical section. Any request to execute critical
section must be executed in the order they are made i.e Critical section execution requests
should be executed in the order of their arrival in the system.
 Fault Tolerance:
In case of failure, it should be able to recognize it by itself in order to continue functioning
without any disruption.

(B)Synchronization:

© iiiUniversity iiiof iiiOkara


4
In the distributed system, the hardware and software components communicate and coordinate their
actions by message passing. Each node in distributed systems can share their resources with other
nodes. So, there is need of proper allocation of resources to preserve the state of resources and help
coordinate between the several processes. To resolve such conflicts, synchronization is used.
Synchronization in distributed systems is achieved via clocks. There are 2 types of clock
synchronization algorithms: Centralized and Distributed.

The clock synchronization can be achieved by 2 ways.


1.External clock synchronization 
2.Internal clock synchronization 

c)Adaptability :

Adaptability is the ability of a system to adapt itself efficiently and fast to changed circumstances.
An adaptive system is therefore an open system that is able to fit its behavior according to changes in
its environment or in parts of the system itself.
 Addition of users and resources without suffering a noticeable loss of performance or
increase in administrative complexity

 Adding users and resources causes a system to grow:
Size - growth with regards to the number of users or resources
 System may become overloaded
 May increase administration cost

 Geography - growth with regards to geography or the distance between nodes


 Greater communication delays
 Administration – increase in administrative cost

© iiiUniversity iiiof iiiOkara


5

You might also like