Thursday 9 May 2013

DISTRIBUTED COMPUTING QUESTION BANK

UNIT – I
PART-A

1.        Define distributed system. 
A distributed system is a collection of independent computers that appears to its users as a single coherent system.  A distributed system is one in which components located at networked communicate and coordinate their actions only by passing message.

2.        List the characteristics of distributed system?
Programs are executed concurrently
There is no global time
Components can fail independently (isolation, crash)
3.        Mention the examples of distributed system.
The Internet
Intranets
Mobile and ubiquitous computing

4.        What is mobile and ubiquitous computing?
Mobile: computing devices are being carried around.
Ubiquitous: little computing devices are all over the place.

5.        Mention the challenges in distributed system.
1. Heterogeneity
2. Openness
3. Security
4. Scalability
5. Failure handling
6. Concurrency
7. Transparency

6.        What are the Advantages of Distributed Systems?
Performance
Distribution
Reliability (fault tolerance)
Incremental growth
Sharing of data/resources
Communication

7.        What are the Disadvantages of Disadvantages of Distributed Systems?    
Difficulties of developing distributed software
Networking problems
Security problems

8.        Write the difference between mobile and ubiquitous computing.
Ubiquitous computing used in single environment such as home or hospital.
Mobile computing has advantage when using different devices such as laptops and printers.

9.        Why we need openness?
The degree to which a computer system can be extended and re-implemented.
IEEE = Institute of Electrical and Electronic Engineers
e.g., IEEE 802.11 WLAN, IEEE 802.3 Ethernet
W3C = World Wide Web Consortium
e.g., HTML Recommendations

10.        What are the security mechanisms used in distributed computing?
Encryption
 E.g. Blowfish, RSA
Authentication
E.g. password, public key authentication
Authorization
E.g. access control lists

11.        How we provide a security?
Confidentiality
 Protection against disclosure to unauthorized individual.
E.g. ACLs (access control lists) to provide authorized access to information.
Integrity
 Protection against alternation or corruption.
E.g. changing the account number or amount value in a money order
Availability
Protection against interference targeting access to the resources.  E.g. denial of service (DoS, DDoS) attacks
 Non-repudiation
 Proof of sending / receiving an information     E.g. digital signature

12.        Define Scalability.
System should work efficiently at many different scales, ranging from a small Intranet to the Internet.
Challenges of designing scalable distributed systems:
Cost of physical resources
Cost should linearly increase with system size
Performance Loss
For example, in hierarchically structure data, search performance loss due to data growth should not be beyond O(log n), where n is the size of data.
Preventing software resources running out
 Numbers used to represent Internet address (32 bit->64bit),Y2K like problem. Avoiding performance bottlenecks
Use decentralized algorithms (centralized DNS to decentralized)
13.        What are the different types of system model?
-Architecture model
-Fundamental model
Interaction model
Failure model
Security model

14.        What is the use of middleware?
Middleware a layer of software whose purpose is to mask heterogeneity and to provide a convenient programming model to application programmers. Middleware is represented by processes or objects in a set of computers that interact with each other to implement communication and resource sharing support for distributed applications.

15.        Define protocol.
The term protocol is used to refer to a well-known set of rules and formats to be used for communication between processes in order to perform a given task. The definition of a protocol has two important parts to it:
A specification of the sequence of messages that must be exchanged;
A specification of the format of the data in the messages.

16.        What is meant by internet protocol?
The IP protocol transmits datagram from one host to another, if necessary via intermediate routers. There are several header fields that are used by the transmission and routing algorithms.

17.        Define mobile IP.
     Mobile IP is an Internet Engineering Task Force (IETF) standard communications protocol that is designed to allow mobile device users to move from one network to another while maintaining their permanent IP address. Defined in Request for Comments (RFC) 2002, Mobile IP is an enhancement of the Internet Protocol (IP) that adds mechanisms for forwarding Internet traffic to mobile devices (known as mobile nodes) when they are connecting through other than their home network.

18.        What is the architectural model?
An architectural model defines the way in which the components of system interact with one another and the way in which they are mapped onto an underlying network of computers.

19.        What is the fundamental model?
Fundamental models that help to reveal key problems for the designers of distributed systems. Their purpose is to specify the design issues, difficulties and threats that must be resolved in order to develop distribute systems that fulfill their tasks correctly, reliably and securely. The fundamental mode provides abstract views of just those characteristics of distributed systems that affect the dependability characteristics - correctness, reliability and security.

20.        Write about the parts available in routing algorithm?
routing algorithm has two parts:
1.    It must make decisions that determine the route taken by each packet as it travels through the network. In circuit-switched network layers such as X.25 and frame relay networks such as ATM the route is determined whenever a virtual circuit or connection is established
In packet-switched network layers such as IP it is determined separately for each packet, and the algorithm must be particularly simple and efficient if it is not to degrade network performance.
2.    It must dynamically update its knowledge of the network based on traffic monitoring and the detection of configuration changes or failures. This activity is less time-critical; slower and more computation-intensive techniques can be used.



PART-B
1.        Explain distributed system with examples.

2.        Briefly discuss bout resource sharing.

3.        Mention the challenges in distributed system. Explain.

4.        With neat diagram explain about the architectural model.

5.        What is the purpose of fundamental model? Explain briefly.

6.        Write short note on IPv6.

7.        What is the function of firewall? Explain.

8.        Explain the various types of networks.

9.        Explain about the internet protocols.

10.        Case study on Ethernet. 

11.        Explain about IP addressing, IP protocol and IP routing.
12.        Briefly discuss about the network principles.
13.        What are the networking issues for distributed System?


UNIT II

1.        What is meant by interprocess Communication?
Inter process communication is concerned with the communication between processes in a distributed system, both in its own right and as support for communication between distributed objects.  The Java API for inter process communication in the internet provides both datagram and stream communication.
2.        What is the difference between RMI and RPC?
Remote Procedure Call or the RPC and the Remote Method Invocation or RMI are both message passing techniques in the Inter Process Communication(IPC). But there are two basic differences between the two methods:
1. RPC supports procedural programming. i.e.only remote procedures can be invoked. Whereas RMI is object-based. As the name suggests, it is invoked on remote objects.
2. In RPC, the parameters that are passed are ordinary data structures. Whereas in RMI, objects can be passed as parameters.
3.        Define Datagram.
A datagram is, to quote the Internet's Request for Comments 1594, "a self-contained, independent entity of data carrying sufficient information to be routed from the source to the destination computer without reliance on earlier exchanges between this source and destination computer and the transporting network." The term is used in several well-known communication protocols, including the User Datagram Protocol and AppleTalk.
4.        What is the use of UDP?
The Domain Name Service (DNS), which looks up DNS names in the Internet, is implemented over UDP. UDP datagram’s are sometimes an attractive choice because they do not suffer from overheads associated with guaranteed message delivery.
5.        What is meant by client server communication?
The client–server model of computing is a distributed application structure that partitions tasks or workloads between the providers of a resource or service, called servers, and service requesters, called clients.
6.        What is meant by group communication?
    Group communication is a multicast operation is more appropriate- this is an operation that sends a single message from one process to each of the members of a group of process, usually in such a way that the membership of the group is transparent to the sender. 
7.        What is the use of RMI registry?
    The RMI registry is used to store a list of available services. A client uses the registry to make it's proxy object, and the Registry is responsible for giving appropriate information to the client so that it can hook up with the server that implements the service.

8.        Difference between synchronous and asynchronous communication?
In synchronous form of communication, the sending and receiving processes synchronize at every message. In this case, both send and receive are blocking operations. Whenever a send is issued the sending process is blocked until the corresponding receive is issued. Whenever receive is issued, the process blocks until a message arrives.
In asynchronous form of communication, the use of the send operation is non-blocking in that the sending process is allowed to proceed as soon as the message has been copied to a local buffer and the transmission of the message proceeds in parallel with the sending process. The receive operation can have blocking and non-blocking variants.
9.        What is marshalling and unmarshalling?
Marshalling is the process of taking a collection of data items and assembling them into a form suitable for transmission in a message. Unmarshalling is the process of disassembling them on arrival to produce an equivalent collection of data items at the destination.
10.        What is CDR?
CORBA CDR is the external data representation defined with CORBA 2.0. CDR can represent all of the data types that can be used as arguments and return values in remote invocations in CORBA. It consists of 15 primitive types that include short (16-bit), long (32-bit), unsigned short, unsigned long, float (32-bit), double(64-bit), char, Boolean (TRUE or FALSE), octet (8-bit) and any constructed types.
11.        Define XML.
           XML stands for EXtensible Markup Language
XML is a markup language much like HTML
XML was designed to carry data, not to display data
XML tags are not predefined. You must define your own tags
XML is designed to be self-descriptive
XML is a W3C Recommendation


PART-B

1.        Explain the Communication between distributed objects.
2.        Explain in detail about Events and Notifications.
3.        Explain in detail about Remote Procedure call with a case study.
4.        Describe java RMI.
5.        Explain about the group communication.
6.        Describe about the client server communication.
7.        Explain characteristics of interprocess communication.
8.        Explain UDP datagram communication.
9.        Explain the various type communications.
10.        Explain about external data representation and marshalling concepts in detail.










UNIT III

1    Define operating system.
An Operating System is the layer between the hardware and software.
An Operating System is responsible for the following functions
•    Device management using device drivers
•    Process management using processes and threads
•    Inter-process communication
•    Memory management
•    File systems.
2    1.    List the core OS components with diagram?
Process manager: Handles the creation of and operations upon processes. A process is a unit of resource management, including an address space and one or more threads.
Thread manager: Thread creation, synchronization and scheduling. Threads are schedulable activities attached to processes .
Communication manager: Communication between threads attached to different processes on the same computer. Some kernels also support communication between threads in remote processes. Other kernels have no notion of other computers built into them, and an additional service is required for external communication.
Memory manager: Management of physical and virtual memory
Supervisor: Dispatching of interrupts, system call traps and other exceptions: control of memory management unit and hardware caches; processor and floating point unit register manipulations. This is known as the Hardware Abstraction Layer in Windows NT.

3    How kernel uses the address space?
Often the kernel code and data are mapped into every address space at the same location. When a process makes a system call or an exception occurs, there is no need to switch to a new set of address mappings.
4    What is system call trap? How it is implemented?
The invocation mechanism for resources manage dby the kernel A system call trap  is  implemented by a machine-level TRAP instructions, which puts the processor into supervisor mode and switches to the kernel address space.
5    What is execution environment? What it contains?
An execution environment is the unit of resource management: a collection of local kernel-managed resources to which its threads have access. An execution environment primarily consists of:
• an address space;
• thread synchronization and communication resources such as semaphores and communication interfaces (for example sockets);
• Higher-level resources such as open files and windows.

6    Illustrate the architectures for multi-threaded server?


7    List the two types of thread scheduling? Explain?
    There are two types of thread scheduling. They are
•    Preemptive scheduling:
A thread may be suspended at any point to make way for another thread, even when the preempted thread would otherwise continue running.
•    Non-preemptive scheduling:
A thread runs until it make a call to  the threading system, when the system may de-scheduled it and schedule another thread to run.

8    List the types of event that the kernel notifies to the user level scheduler?
 There are four types of event that the kernel notifies to the user level scheduler are:
•    Virtual processor allocated.
•    Scheduler Activation  blocked
•    Scheduler Activation unblocked
•    Scheduler Activation  preempted.
9     Difference between monolithic and micro kernel?
•    The microkernel based OS can provide ability to enforce modularity behind memory protection boundaries.
•    Microkernel-based OS, the number of bugs is less than the monolithic based system.
•    The monolithis-based OS can provide more efficiency with which operations can be invoked.
10     Write a note on LRPC with diagram?
An invocation of two process on the same machine is called as light weight Remote Procedure Call.
Shared memory regions are efficient for client server communication with a different region between the server and each of its local clients.
The same stack is used by client and server stub.

11     What is the goal of security? List the three broad classes of security threats?
    The main goal of security is to restrict access to information and resources to just those principles that are authorized to have success.
Security threads fall into three broad classes:
•    Leakage
•    Tampering
•    Vandalism
12     What are the two measures taken by JVM to protect the local environment?
    The two measures taken by JVM to protect the local environment are:
•    The downloaded classes are stored separately from local classes ,preventing them from replacing local classes with spurious versions .
•    The byte codes are checked for validity. Valid java byte code is composed of java virtual machine instructions from a specified set. The instructions are also checked to ensure that they will not produce certain errors when the program runs such as accessing illegal memory addresses.
13    What is cryptography? What is the use of it?
    Cryptography is the art of encoding information in a format that only the intended recipients can access.
Uses:
•    Secrecy and integrity
•    Authentication
•    Digital signatures.
14    Write a note on digital signature?
Requirement:
– To authenticate stored document files as well as messages
– To protect against forgery
– To prevent the signer from repudiating a signed document (denying their responsibility)
Encryption of a document in a secret key constitutes a signature
- impossible for others to perform without knowledge of the key
- strong authentication of document
- strong protection against forgery
- weak against repudiation (signer could claim key was compromised).
15    What are credentials?
 Credientials are a set of evidence provided by a principal when requesting access to  a resource.   
 It is convienient to require users to interact with the system and authenticate themselves each time their authority is required to perform an operation on a protected resources.
16    With diagram explain cipher block chaining?
 

17    What are stream ciphers?


A collection of files that can be located on any server or moved between servers while maintaining the same names.
    Simillar to a UNIX filesystem
    Helps with distributing the load of file serving between several servers.
    File groups have identifiers which are unique throughout the system.
    Used to refer file groups and files.


18     Draw the diagram for file attribute record structure?


19    What is a file group?
A collection of files that can be located on any server or moved between servers while maintaining the same names.
    Simillar to a UNIX filesystem
    Helps with distributing the load of file serving between several servers.
    File groups have identifiers which are unique throughout the system.
    Used to refer file groups and files.
20    Draw the diagram for file service architecture?

21     What are the major goals of Sun NFS?
An industry standard for file sharing on local networks since the 1980s
An open standard with clear and simple interfaces
Closely follows the abstract file service model defined above
Supports many of the design requirements already mentioned:
– transparency
– heterogeneity
– efficiency
– fault tolerance
Limited achievement of:
– concurrency
– replication
– consistency
– security
22    What is flat file service interface?
    It is  RPC interface used by client modules. It is not normally used directly by user level programs. A field is invalid if the file that it refers to is not present in the server processing the request or if its access permissions are inappropriate for the operation requested.
23     Write a note on Andrew file system?
 AFS provides transparent access to remote shared files for unix programs running on workstations. Access to AFS files is via the normal unix file primitives, enabling existing unix programs to access AFS file swithout modification or recompilation.




PART-B

1    Briefly explain about thread concept?
2    With suitable diagram explain the OS architecture?
3     Discuss about the different cryptographic algorithms?
4     Explain digital signature?
5    Write a case study on Sun network file system?
6    Briefly explain about the case study on Andrew file system?


UNIT IV

1    Write a note on X.500 directory service?
 It is a  directory service. It can be in the same way as a conventional name service  But it is primarily used to satisfy descriptive queries, designed to discover the names and attributes of other users or system resources.
2    What is name space?
 It is a collection of all valid names recognized by a particular service. For a name to be valid means that the service will attempt to look it up even though that name may prove not to correspond to any  object-to be unbound.
Example: The name “Two” could not possibly be the name of unix process, whereas the integer “2’ might be.

3    What is the use of iterative navigation?
DNS supports the model known as iterative navigation. To resolve a name, a client presents the name to the local name server, which attempts to resolve it. If the local name server has the name, it returns the result immediately.

4    Define multicast navigation?
     A client multicast the name to be resolved and the required object type to the group of name servers. Only the server that holds the named attributes respond to the request.
5    Write short notes on directory services?
A service that stores that stores collection of binding between names and attributes and that looks up entries that match attribute based specification is called directory service.
 Example: Microsofts active Directory services,X.500 and its cousin LDAP, Univers.
6    What is clock skew and clock drift?
    The instantaneous difference between the readings of any two clocks is called their skew.
     Clock drift means that they count time at different rates, and so diverge.

7    What are the two modes of synchronization? Write their format?
 The two modes are:
1.    External synchronization:
For a synchronization bound D>0, and for a source S of UTC time,|S(t) –Ci(t)|<T, for i=1,2,…N and for all real times t in I.
2.    Internal synchronization:
For a synchronization bound D>0,|Ci(t)-Cj(t)|<D, for i,j=1,2,…N. and for all real times t in I.

8    How the clock synchronization done in Christian’s method?
A single time server might fail, so they suggest the use of a group of synchronized servers .
It does not deal with faulty servers
9    List the design aims and features of NTP?
•    To provide a service enabling client across the internet to be synchronized accurately to UTC.
•    To provide a reliable service that can be survive lengthy losses of connectivity.
•    To enable clients to resynchronize sufficiently frequently to offset the rates of drift found in most computers.
•    To provide protection against interference with the time service whether malicious or accidental.
10    With example explain about happened-before relation?
The happened-before relation is a partial order on events that reflects a flow of information between them.
11    Write the rules for updating the clocks?
    The rules for updating the clocks are;
1.    Initially, Vi[j]=0, for i,j=1,2..N
2.    Just before pi timestamps an event, it sets Vi[i]:=Vi[i]+1.
3.    Pi includes the value t=Vi in  every message it sends.
4.    When pi receives a timestamp t in a message, it sets Vi[j] ;=max(Vi[j],t[j]),for j=1,2..N.
12    What are the issues resolved by Berkley’s algorithm?
    The collection of computers whose clocks are to be synchronized are categorized as masters and slaves. The averaging of the clock values cancels out the individuals clocks tendencies to run fast or slow.
This overcomes the uncertainty due to message transmission time introduced in the synchronized clock values returned by the master.
13    What is network partition?
    The network partition can be used to separate a group of replica managers into two or more sub groups.
 The members of same subgroup  communicate with one another but members of different subgroup cannot communicate with one another

14    Difference between reliable and unreliable failure detector?
    Reliable failure detector is one that is always accurate n detecting a process failure. It answers processes queries with either a response of unsuspected-which, as before can only be a hint-or failed.
    U Reliable failure detector may produce one of two values when given the identity of a process: Unsuspected or suspected. Both of these results are hints, which may or may not accurately reflect whether the process has actually failed.

15     Define election algorithm? Mention the different algorithm?
     An algorithm for choosing a unique process to play a particular role is called an election algorithm.
Ex: In a variant of  central server algorithm for mutual exclusion, the server is choosen from among the process .
The different algorithms are
•    Ring based election algorithm
•    Bully algorithm.
16    Define multicast communication?
    It is the implementation of group communication .Multicast communication requires coordination and agreement. The aim is for members of a group to receive copies of messages sent to the group . Many different delivery guarantees are possible
Example:. agree on the set of messages received or on delivery ordering .
17    List the requirements of consensus algorithm to hold for execution?
The requirements of consensus algorithm to hold for execution are:
•    Termination
•    Agreement
•    Integrity.
18    Write a note on bully algorithm?
    This algorithm allows process to crash during an election. Although it assumes that message delivery between process is reliable.  It assume sthat the system is synchronous – it uses timeouts to detect a process failure.
19    What is distributed debugging?
Distributed debugging is nothing but to check whether a transitory state, instead of a stable state has occurred in an actual execution .
This is done by recording a system global state.




PART-B

1    Write a case study on X.500 directory service?

2     Write a short notes on directory services?
3    Briefly explain about name services and domain name system?

4    Give a brief description about logical time and logical clocks?

5     What is global state? Explain in detail?

6    How to synchronize the physical clock? Explain the different methods in it?
7    Explain in detail about multicast communication?

8    Describe the Byzantine problem in synchronous system?

9    Write a short note on distributed mutual exclusion?

10    What is election algorithm? Explain briefly?



UNIT V

1    1.    Write the goal of transaction?
The goal of transactions is to ensure that all of the objects managed by a server remain in a consistent state when they are accessed by multiple transactions and in the presence of server crashes. A transaction is specified by the client as a set of operations on objects to be performed as an indivisible unit by the servers managing those subjects. Operations that are free from interface from concurrent operations being performed in other threads are called atomic operations.

2    What is dirty read?
Server must record the effects of all committed transaction and none of the effects of aborted transactions. They must therefore allow for the fact that a transaction may abort by preventing it affecting other concurrent transactions if it does so. These problems are called 'dirty reads' and 'premature writes', arid both of them can occur in the presence of serially equivalent executions of transactions. The 'dirty read' problem is caused by the interaction between a read operation in one transaction and an earlier write operation in another transaction on the same object.

3    Write any four rules for committing the nested transaction?
The following rules describe lock acquisition and release:
For a sub transaction to acquire a read lock on an object, no other active transaction can have a write lock on that object, and the only retainers of a write lock are its ancestors.
For a subtransaction to acquire a write lock on an object, no other active transaction can have a read or write lock on that object, and the only retainers of read and write locks on that object are its ancestors.
When a subtransaction commits, its locks are inherited by its parent, allowing the parent to retain the locks in the same mode as the child.
When a subtransaction aborts, its locks are discarded. If the parent already retains the locks it can continue to do so.
4    What is lock? Mention its usage?
When a process needs to read or write a data item as a part of a transaction, it requests the scheduler to grant it a lock for that data item. Likewise, when a data item is no longer needed, the scheduler is requested to release the lock. The task of the scheduler is to grant and release locks in such a way that only valid schedules result.

5    Mention the locking rules for nested transaction?

1. When an operation accesses an object within a transaction:
(a) If the object is not already locked, it is locked and the operation proceeds.
(b) If the object has a conflicting lock set by another transaction, the transaction must wait until it is unlocked.
(c) If the object has a non-conflicting lock set by another transaction, the lock is shared and the operation proceeds.
(d) If the object has already been locked in the same transaction, the lock will be promoted if necessary and the operation proceeds.
2. When a transaction is committed or aborted, the server unlocks all objects it locked for the transaction.
Locking rules for nested transactions: The aim of a locking scheme for nested transactions is to serialize access to objects so that:
1. Each set of nested transactions is a single entity that must be prevented from observing the partial effects of any other set of nested transactions.
2. Each transaction within a set of nested transactions must be prevented from observing the partial effects of the other transactions in the set.

6    How a deadlock can be detected?
Deadlock is a state in which each member of a group of transactions is waiting for some other member to release a lock. A wait-for-graph can be used to represent the waiting relationship between current transactions. In a wait-for graph the nodes represent transactions and the edges represent wait-for relationships between transactions

7    Difference between two version locking and hierarchical locking?
Two-version locking: This is an optimistic scheme that allows one transaction to write tentative versions of objects while other transactions read from the committed version of the same objects. Read operations only wait if another transaction is currently committing the same object. Transactions cannot commit their write operations immediately if other uncompleted transactions have read the same objects. Therefore, transactions that request to commit in such a situation are made to wait until the reading transactions have completed. Deadlock may occur when transactions are waiting to commit. Therefore transactions may need to be aborted when they are waiting to commit, to resolve deadlocks.
Hierarchic Locks: At each level, the setting of a parent lock has the same effect as setting all the equivalent child locks. This economizes on the number of locks to be set. In the banking example which we consider the branch is the parent and the accounts are
The operation to view a week would cause a read lock to be set at the top of this hierarchy, whereas the operation to enter an appointment would cause a write lock to be set on a time slot. The effect of a read lock on a week would be to prevent write operations on any of the substructures, for example the time slots for each day in that week.
Each node in the hierarchy can be locked - giving the owner of the lock explicit access to the node and implicit access to its children. Before a child node is granted a read/write lock, an intention to read/write lock is set on the parent node and its ancestors, if any. The intention locks is compatible with other intention locks but conflicts with read and write locks according to the usual rules.

8    Compare forward and backward validation?
•    In forward validation of the transaction T , the write set of T, is
compared with the read sets of all overlapping active transactions- those that.are still in their working phase
•    . Let the active transactions have (consecutive) transaction identifiers active, to activeN, the following program describes the algorithm for the forward validation of Tv:
boolean valid = true;
for (int Tid = active^ Tid < = activeN; Tid ++){
if (write set of Tv intersects read set of Tid) valid = false; }

Backward validation:
•    As all the read operations of earlier overlapping transactions won performed before the validation of Tv started, they cannot be affected by the writes of a current transaction. The validation of transaction Tv checks whether its read set with any of the write sets of earlier overlapping transactions T.. If there is any overlap. Hue validation fails.
•    Let start Tn be the biggest transaction number assigned at the time when transaction 1 started its working phase and finish Tn be the biggest transaction number assigned at 220
The when Tv entered the validation phase. The following program describes the algorithm 1 validation of Tv :
boolean valid = true;
for( int T, = startTn + 1; Ti <= finishTn; T,+ +){ if(read set of Tv intersects write set of Ti) valid = false;

9    Mention the rules for timestamp ordering?
To accept a write operation requested by transaction Tc on object D:
if (Tc>= maximum read timestamp on D &&
Tc> write timestamp on committed version of D)
perform write operation on tentative version of D with write timestamp Tc
else
Abort transaction Tc

10    Difference between flat and nested transaction?
•    In a flat transaction, a client makes requests to more than one server.
For example transaction T is a transaction that invokes operations on objects in servers X,Y and Z. A flat client transaction completes each of its requests before going on to the next one. Therefore, each transaction accesses, servers' objects sequentially. When servers use locking, a transaction can only be waiting for one object at a time.
•    In a nested transaction, the top-level transaction can open subtransactions, and each subtransaction can open further subtransactions down to any depth of nesting. A client's transaction T that opens two subtransactions T, and Ti open which access objects at servers X and Y. The subtransactions Tl and T2 open further subtransactions Tn, TJ2, T21 and T22, which access objects at servers M, N, and P. In the nested case, subtransactions at the same level can run concurrently, so T, and T2 are concurrent, and as they invoke objects in different servers, they can run in parallel. The four subtransactions TM, T12, T2I and Tn also run concurrently.

11    What is the role of coordinator in distributed transaction?
The coordinator that is contacted carries out the openTransaction and returns the resulting transaction identifier to the client. Transaction identifiers for distributed transactions must be unique within a distributed system.  The coordinator that opened the transaction becomes the coordinator for the distribute transaction and at the end is responsible for committing or aborting it. Each of the servers that manage an object accessed by a transaction is a participant in the transaction. During tie progress of the transaction, the coordinator records a list of references to the participant!, and each participant records a reference to the coordinator.
The method, join, is used whenever a new participant joins the transaction:
join(Trans, reference to participant)
Informs a coordinator that a new participant has joined the transaction


12    Write a note on two phase commit protocol?
The two-phase commit protocol is designed to allow any participant to abort its part of a transaction. Due to the requirement for atomicity, if one part of a transaction is aborted, then the whole transaction must also be aborted. The two phase commit protocol consists of a voting phase and a completion phase.

13    What is phantom deadlock?
A deadlock that is 'detected' but is not really a deadlock is called phantom deadlock. In distributed deadlock detection, information about wait-for relationships between transactions is transmitted from on server to another. If there is a deadlock, the necessary information will eventually be collected in one place and a cycle will be detected. Ja this procedure will take some time, there is a chance that one of the transactions that Holds a lock will meanwhile have released it, in which case the deadlock will no longer exist.

14    Write the algorithm steps in Edge-chasing?
Edge-chasing algorithms have three steps
 initiation,
 detection and
resolution.

15    What is distributed transaction and nested transaction?
The term distributed transactions to refer to a flat file or nested transaction that accesses objects managed by multiple servers. When a distributed transaction comes to an end, the atomicity property of transactions requires that either all of the servers involved commit the transaction or all role, which involves ensuring the same outcome at all of the servers. The manner in which the coordinator achieves this depends on the protocol chosen.
A nested transaction is constructed from a number of sub transactions. Transactions other than the top level transaction are called sub transactions. Since transactions can be nested arbitrarily deeply, considerable administration is needed to get everything right.
Several transactions may be started from within a transaction, allowing transactions to be regarded as modules that can be composed as required. The outermost transaction in a set of nested transactions is called the top-level transaction.

16    List the operation for two phase commit protocol?
In the first phase of the two-phase commit protocol the coordinator asks all the participants if they are prepared to commit; and in the second, it tells them to commit (or abort) the transaction. If a participant can commit its part of a transaction, it will agree as soon as it has recorded the changes and its status in permanent storage- and is prepared to commit.
At the end of the second step the coordinator and all the participants that voted Yes are prepared to commit. By the end of third step the transaction
is effectively completed.
17    What is working phase, validation phase and update phase?
Working phase:Each transaction has a tentative version of each of the objects that it updates. This is a copy of the most recently committed version of the object. Read operations are performed immediately- if a tentative version for that transaction already exists, a read operation accesses it; otherwise it accesses the most recently committed value of the object. Write operations record the new values of the objects as tentative values. When there are several concurrent transactions, several different tentative values of the same object may coexist.
Validation phase: When the close Transaction request is received, the transaction is validated to establish whether or not its operations on objects conflict with operations of other transactions on the same objects. If the validation is successful then the transaction can commit. If the validation fails, then some form of conflict resolution must be used and either the current transaction, or in some cases those with which it conflicts, will need to be aborted.
Update phase: If a transaction is validated, all of the changes recorded in tentative versions are made permanent.

18     List he properties of transaction?
Transactions are:
1. Atomic: To the outside world, the transaction happens indivisibly.
2. Consistent: The transaction does not violate system invariants.
3. Isolated: Concurrent transactions do not interfere with each other.
4. Durable: Once a transaction commits, the changes are permanent
19    What is replication?
Object replication , object distribution, object recompilation and object management and network resources are some of the design requirements that play a role in defining interserver.
20    What is meant by distributed multimedia systems?
If the multimedia systems are supported by multiuser system, then we call those multimedia systems as distributed multimedia systems.
A multi user system designed to support multimedia applications for a large number of users consists of a number of system components. A typical multimedia application environment consists of the following components:
1. Application software.
2. Container object store.
3. Image and still video store.
4. Audio and video component store.
5. Object directory service agent.
6. component service agent.
7. User interface and service agent.
8. Networks (LAN and WAN).

PART-B

1    Explain optimistic concurrency control in detail?
2    Explain the concept of locks with suitable example?
3    Discuss about timestamp ordering?
4    What is atomic commit protocol? Explain the different protocols?
5    How to control the concurrency in distributed system?
6    Explain how the transaction recovery can be made?
7    Explain about nested transaction?



No comments:

Post a Comment