Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
16 views

Ict-distributed Systems

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

Ict-distributed Systems

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

ICT- DISTRIBUTED SYSTEMS

End of First Semester Examinations- 2022/23 Academic Year.

Level 400

QUESTION ONE

We want to compare the performance of a single-threaded and a multi-threaded file server. The following

assumptions are made. It takes 10ms to get a request, dispatch it and do the rest of the necessary processing

involved in serving the file, assuming the file is cached in main memory. If the file is not cached, a disk

operation is needed in which case an additional 50ms is required, during which the thread sleeps. We

assume that for one third of all requests, the file can be served from the cache.

How many requests per second can the single-threaded sewer handle?

ANSWER

We know that for a third of the time, it will only take 1 Oms to serve the request; the other two thirds

of the time, it will take 60ms to serve the request. Determine how many requests (x) we can

service/second: (h) * lox + * (50 + 10)x = 1000

3.33x + 40x = 1000

43.33x = 1000 x

= 1000/43.33

x 23 requests/second

OR

We know that in three requests, we will have to get the request three times (10 * 3) and we will have

to perform a disk operation two times (50 * 2).

t = 10 * 3 + 50 * 2

t = 130ms
It will take 130ms to serve three requests; how many can we do in a second: n

= (1000/130) * 3 n 23 requests/second

QUESTION TWO

a) provide two examples of client-server applications in which using a multi-threaded client is

advantageous compared with a single threaded client. Explain?

ANSWER

An example would be in browsers; having multiple thread to download different images from the web

server, and processing them per/thread allows for more images to be processed. Another example would

be a game, a multi-threaded client would allow for multiple threads to handle drawing, while another is

receiving more data. Another example would be having multiple threads to handle different blocking

RPC.

b) Discuss pros and cons for centralized and distributed mutual exclusion algorithms?

ANSWER

Centralized

Pros

1. Easy to implement

2. Low message overhead

3. Fair (access requests are processed in order)

4. No starvation and guaranteed mutual exclusion.

Cons

1. Coordinator is a single point of failure


2. Coordinate can be performance bottleneck

Distributed

Pros

I. Solution is fair

2. Does not need a single coordinator

3. Mutual exclusion guaranteed without deadlock or starvation

Cons

1. All processes are involved in all decisions (slow process slows everyone)

2. Large number of messages required

3. Single point of failure replaced with n points of failure

4. Processes must have accurate group membership

QUESTION THREE

a) Many distributed algorithms require the use of a coordinating process. To what extent can such

algorithms be considered distributed? Discuss?

ANSWER

In a centralized algorithm, there is often one fixed process that acts as coordinator. Distribution comes from

the fact that the other processes run on different machines. In distributed algorithms with a non-fixed

coordinator, the coordinator is chosen (in a distributed fashion) among the processes that form part of the

algorithm. The fact that there is a coordinator does not make the algorithm less distributed.

b) Explain why Interface Definition Languages are needed in distributed computing platforms?

ANSWER
Because it keeps the distinction and separation between policy and mechanism. This allows the

mechanism to change but retains the same policy (interface). It also allows for RMI calls to be

dynamically invoked by retrieving the IDL from an implementation repository. Therefore, a server only

needs to publish its interfaces to the IDL for other servers/clients to communicate with them

QUESTION FOUR

Explain the sequence of actions taken in CORBA if a client invokes a method when the server

responsible for this object is not running?

ANSWER

Full procedure:

l. Client process calls remote method of object

a. IOR contains implementation repository address

2. Implementation repository checks its server table

a. Starts server in this case because it does not exist

3. If the server is first started, its address is returned

4. Implementation repository issues a location forward message

a. Informs the client of the server address

5. Client process issues remote method call to server

6. Server locates servant and calls appropriate method

7. Method results are returned to the client

a. Subsequent calls go directory to the server


QUESTION FIVE

a) Name 2 techniques to aid scalability of distributed systems. Provide an example for each?
ANSWER

1. Replication: For the Web, replicate copies of the hosting Web server objects and pages to
reduce latency and reduce server load. Akamai (and other CDN's) are examples.

2. Distribution: dividing up load among many different nodes, typically in a hierarchical fashion,
increasing scalability over a single, centralized server. Name resolution on the Internet, the

Domain Name Service (DNS), is an example.

b) Describe precisely what is meant by a scalable system?


ANSWER

A system is scalable with respect to either its number of components, geo-graphical size, or number

and size of administrative domains, if it can grow in one or more of these dimensions without an

unacceptable loss of performance.

QUESTION SIX

Explain what is meant by a virtual organization and give a hint on how such organizations could be

implemented?

ANSWER

A virtual organization (VO) defines a group of users/applications that have access to a specified group

of resources, which may be distributed across many different computers, owned by many different

organizations. In effect, a VO defines who has access to what. This also suggests that the resources

should keep an account of foreign users along with their access rights. This can often be done using

standard access control mechanisms (like the rwx bits in UNIX), although foreign users may need to

have a special account. The latter complicates matters considerably.


QUESTION SEVEN

Consider a chain of processes PI, P2, ..., Pn implementing multitiered client-server architecture.

Process Pi is client of process Pi+l, and Pi will return a reply to Pi—I only after receiving a reply

from Pi+l. What are the main problems with this organization when taking a look at the request

reply performance at process PI?

ANSWER

Performance can be expected to be bad for large n. The problem is that each communication

between two successive layers is, in principle, between two different machines. Consequently, the

performance between PI and P2 may also be determined by n — 2 request-reply interactions

between the other layers. Another problem is that if one machine in the chain performs badly or is

even temporarily unreachable, then this will immediately degrade the performance at the highest

level.

You might also like