Sunteți pe pagina 1din 6

DISTRIBUTED COMPUTING

UNIT-II 2 Marks

1. What is a mailbox?

A simple way of dealing with the buffer management is to define a new data structure
called mailbox. A mailbox is created by the kernel in buffer to receive messages and address is
specified to look for it in network places.

2. What are blocking primitives?

When a process calls send it specifies a destination and a buffer to send to that
destination. While the message is being sent, the sending process is blocked (i.e., suspended).
The instruction following the call to send is not executed until the message has been completely
sent. Such primitives are called as blocking or synchronous primitives.

3. What are non-blocking primitives?

When a process calls send it specifies a destination and a buffer to send to that
destination. If send is non-blocking, it returns control to the caller immediately, before the
message is being sent. So that sending process can continue computing in parallel with the
message transmission. Such primitives are called as non-blocking or asynchronous primitives.

4. What is request/reply protocol?

In the client server model, the client sends a request message to the server asking for
some service. The server does the work and returns the data requested or an error code indicating
why the work could not be performed. This is known as request/reply protocol.

5. Mention different methods for addressing a server.

• Hardwire machine. number into client code

• Let processes pick random addresses; locate them by broadcasting.

• Put ASCII server names in clients; look them up at run time.

6. What is remote procedure call?

When a process on machine A calls a procedure on machine B, the calling process on


A is suspended, and execution of the called procedure takes place on B. information can de
transported from the caller to callee in the parameters and can come back in the procedure result.
No message passing or I/O at all is visible to user. This method is known as remote procedure
call.
7. What is meant by registering a server?

When the server begins executing, the call to initialize outside the main loop
exports the server interface. (i.e.,) the server sends a message to a program called the binder, to
make its existence known. This process is referred to as registering the server.

8. What is an orphan?

A condition in which client sends a request to a server to do some work and crashes
before the server replies. At this point a computation is active and no parent is waiting for the
result is called an orphan.

9. What is reincarnation?

When a client reboots after a crash, it broadcasts a message to all machines


declaring the start of a new epoch. When such a broadcast comes in, all remote computations are
killed. This is known as reincarnation.

10. What is gentle reincarnation?

When an epoch broadcast comes in, each machine checks to see if it has any
remote computations, and if so, tries to locate their owner. Only if the owner cannot be found the
computation is killed.

11. What are sweep algorithms?

Algorithms that operate by periodically making a sequential pass through a table


are called sweep algorithms.

12. What are closed and open groups?

In closed group systems, the members of the group alone can send to the group.
Outsiders cannot send messages to the group as a whole, but can send messages to individual
members. The systems which do not have this property come under open group systems.

13. What is multicasting?

When a packet is sent to one of the addresses in a group, it is automatically


delivered to all machines listening to that address. This technique is called as multicasting.

13. How to make group addressing?

• To give each group unique address, much like a process address.


• In case of multicast network, the group address can be associated with multicast address,
so that every message sent to the group address can be multicast.

• If hardware supports broadcast but not multicast, the message can be broadcast. Every
kernel will then get it and extract from the group address.

• If neither broadcast nor multi cast is supported, the kernel of the sending machine will
have to have a list of machines that have processes of that group.

14. What is a loosely synchronous system?

A loosely synchronous system is one in which all events take a finite amount of
time but all events appear in the same order to all parties. (i.e.,) all processes receive all
messages in the same order.

15. What is a virtually synchronous system?

A virtually synchronous system one in which the ordering constraint has been
relaxed, but in such a way that under carefully selected circumstances, it does not matter.

16. What is a clock skew?

When a system has n computers, all n crystals (timer) will run at slightly different
rates, causing the (software) clocks gradually to get out of sync and give different values when
read out. This difference in time values is called clock skew.

17. Mention the properties of transaction

• Atomic- to the outside world, the transaction happens indivisibly.


• Consistent- the transaction does not violate system invariants.
• Isolated- concurrent transactions do not interfere with each other.
• Durable- once a transaction commits, the changes are permanent.

18. What is atomicity?

Atomicity ensures that each transaction either happens completely, or not at all,
and if happens in a single indivisible, instantaneous action. While a transaction is in progress,
other processes cannot see any intermediate states.

19. Explain Berkeley algorithm.

In this algorithm the time server is active, polling every machine periodically to
ask what time is there. Based on the answers, it computes an average time and tells all the other
machines to advance their clocks to the new time or slow their clocks down until some specified
reduction has been achieved. This method is suitable for a system in which no machine has a
WWV receiver.

20. What is mean solar second?

The length of the day is computed by measuring a large number of days and taking
the average before dividing by 86,400. The resulting quantity is called mean solar second.

21. Compare three mutual exclusion algorithms.

Algorithm Messages per Delay before entry problems


entry/exit (in message times)
Centralized 3 2 Coordinator crash
Distributed 2(n-1) 2(n-1) Crash of any process
Token ring 1 to α 0 to n-1 Lost token, process
crash

22. What is meant by election algorithms?

The election algorithms attempt to locate the process with the highest number
and designate it as coordinator. The algorithms differ in the way they do the location. The two
example election algorithms are Bully algorithm and Ring algorithm.

23. Give examples for transaction primitives.

• BEGIN_TRANSACTION: Mark the start of a transaction

• END_TRANSACTION: Terminate the transaction and try to commit.

• ABORT_TRANSACTION: Kill the transaction; restore the old values.

• READ: Read data from a file.

• WRITE: Write data to a file.

24. What is intentions list or writeahead log?

It is the other common method of implementing transactions. With this method,


files are actually modified in place, but before any block is changed, a record is written to the
writeahead log on stable storage telling which transaction is making the change, which file and
block is being changed, and what the old and new values are. Only after the log has been written
successfully is the change made to the file.

25. What is granularity of locking?


The unit of locking might be a smaller item, such as an individual record or
page, or a larger item, such as an entire database. The issue of how large an item to lock is called
the granularity of locking.

26. What is two-phase locking?

In two-phase locking, the process first acquires all the locks it needs during the
growing phase, and then releases them during the shrinking phase. If the process refrains from
updating any files until it reaches the shrinking phase, failure to acquire some lock can be dealt
by releasing all locks, waiting a little while, and starting all over.

27. Brief about Bully algorithm.

When a process notices that the coordinator is no longer responding to requests, it


initiates an election. A process P holds an election as follows

i) P sends an ELECTION message to all process with higher numbers.

ii) If no one responds, P wins the election and becomes coordinator

iii) If one of the higher-up answers, it takes over. P’s job is done.

28. What is At-Most-Once message delivery?

Using time, the algorithm is defined as follows: Every message carries a


connection identifier and a timestamp. For each connection, the server records in a table the most
recent timestamp it has seen. If any incoming message for a connection is lower than the
timestamp stored for that connection, the message is rejected as duplicate.

29. What is cascaded abort?

It is a method to undo a committed transaction because it saw a file it should not


have seen. Strict two-phase locking eliminates cascaded aborts.

30. What is optimistic concurrency control?

It is an approach to handle multiple transactions at the same time. It fits best with
the implementation based on private workspaces. That way, each transaction changes its files
privately without interference from the others. At the end, the new files are either committed or
released.

S-ar putea să vă placă și