M362 2009 Exam Flashcards

1
Q

Coulouris et al identify the following three characteristics of distributed systems:
• Necessarily concurrent
• Possibility of independent failure
• Lack of a global clock
Explain these three characteristics.

A

Necessarily concurrent – distributed systems are also concurrent systems. Each node in a distributed system may be carrying out processing at the same time as one or more other nodes.

Possibility of independent failure – a distributed system contains a number of distinct components at different locations and it is quite possible for one of these distinct components to fail hence independent failure is possible.

Lack of global clock – each component within the distributed system maintains its own value of current time. Even if all components at some initial point had the same current time, over time this will drift slightly so the components are no longer synchronised.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Consider a number of processes and their arrival and service times as given in Table 1. Figure 1 shows part of the execution of these processes using the round robin scheduling policy. In terms of queuing, you may assume that arrivals join the back of the queue, and a process that has just run goes to the back of the queue, behind all other processes including arrivals if any.

(a) Roughly sketch (or accurately describe) a figure showing the completed execution of the processes.
(b) For what type of system, is the round robin scheduling policy particularly useful? Why is this so?

A

a) (see pic) The time values (horizontal row of integers) relate to vertical line to left of number
b) interactive systems

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

A Java thread can be in a number of different thread states. Describe under what circumstances a Java thread would progress through the following sequence of thread states:

New, Runnable, Blocked, Runnable, Waiting, Runnable, Terminated.

A

New – thread that has not yet started

A thread that starts executing will be placed in the Runnable state.

A thread that attempts to execute a synchronized method will enter the Blocked state until it has acquired the lock associated with the object.

Once the lock is released by a thread completing the synchronized method the thread can acquire the lock and proceed and enter the Runnable state.

Condition synchronisation may have a condition on the object that the method is being executed on that is false which will cause the thread to enter a Waiting state.

The notify method will awaken the thread and provided the condition is now true for the object that the method is being executed on the thread can enter the Runnable state.

A thread leaving the synchronized method will enter the Terminated state.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Explain two shortcomings of the built-in Java concurrency support which were the motivation for the Java 1.5 concurrency utility libraries.

A

Two limitations are:

1) Java monitors have a single anonymous condition variable which makes it impossible to distinguish which threads are waiting for the same lock on different conditions.
2) A thread cannot state how long it is willing to block when waiting for a lock to become available, which can lead to a thread been blocked indefinitely if there is a deadlock.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

In a client-server system that uses multiple servers, explain the difference between data replication and data partitioning. For data replication give one example of where it might be used and why. For data
partitioning give two different examples of where and why it might be used.

A

Data partitioning is dividing the data resources of a system and storing them on several servers which are distributed with each server being responsible for maintaining its own partition. Data replication on the other hand is the duplication of data and storing of data on several servers such that multiple backup copies exist.

Data replication may be used to protect data from server failure, meaning a more reliable service is possible.

Data partitioning may be used for example to allow Ebay to hold customer account details for customers on a local server to each country, and on Amazon to hold the availability of items for that country locally. Both give better performance.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Explain how RMI (Remote Method Invocation) uses names to access remote objects and why it uses this approach. Briefly outline the relation of RMI to JNDI
(Java Naming and Directory Interface).

A

After a remote object has been created and exported it is bound to a name in a registry. The registry contains a stub object, and a binding process puts a name-stub pair in the registry. When the client looks up the name in a registry it gets back the associated stub object on which it can make method calls.

Names are more convenient and flexible than specifying the full details of a resource or its location. It is also possible to change the location of the resource without the need to modify any components that access the resource, as long as the resource name remains the same.

The JNDI is provided by the javax.naming package which includes the Context interface which provides bind, rebind, list and lookup operations like the RMI registry

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Briefly discuss when you would use each of the following approaches in a web application: pure HTML web pages, JavaServer Pages (JSP) and servlets.

A

Servlets are useful for more complex processing, where the static content of the response is very limited or is delegated to another component.

JSP is suited to constructing dynamic web pages in situations where the output is predominantly static HTML or XML.

Pure HTML web pages are used for static web pages.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Authorisation is one of the Java platform security features. On what basis is it possible to assign code permissions in order to give authorisation to use code?

A

Code permissions may be assigned according to:

1) where code originated
2) an identity associated with code
3) a digital signature associated with the code

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Explain how the object request broker (ORB) model can be used to deal with language heterogeneity in distributed systems.

A

Client object obtains a reference to a servant object by requesting a naming service looks up the object associated with a name (called resolving the name).

Client invokes operation on resolved reference, using stub that communicates with an ORB to interact with the CORBA server and return results.

An object adaptor uses a skeleton to marshal an operation invocation into a language-specific operation, and also provides a standard interface to an ORB

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Besides being a technological advancement, mobile systems have wide-ranging economic and social effects. Briefly describe two examples of such social and/or economic effects.

A

1) increased productivity (can work anytime, and anywhere)
2) social media (everyone now potential to report on news, etc)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly