




Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Community
Ask the community for help and clear up your study doubts
Discover the best universities in your country according to Docsity users
Free resources
Download our free guides on studying techniques, anxiety management strategies, and thesis advice from Docsity tutors
A sample answer and evaluation scheme for the autumn mid semester examination-2024 in distributed operating systems (dos) for cse, it, csse, and csce students. It covers key concepts like fault tolerance, multiprocessor and multicomputer systems, open systems, clock synchronization, and client-server management in distributed systems. Detailed explanations, diagrams, and examples to illustrate the concepts.
Typology: Assignments
1 / 8
This page cannot be seen from the preview
Don't miss anything!
Semester: 4 th Sub & Code: OS & CS - 2009 Branch (s): CSE, IT, CSSE, CSCE Subject Name:- DOS & Code:- CS Branch (s): CSE
Time: 1 1 / 2 Hours Full Mark: 20 Sample answer & evaluation scheme Answer Any four questions including question No.1 which is compulsory. The figures in the margin indicate full marks. Candidates are required to give their answers in their own words as far as practicable and all parts of a question should be answered at one place only.
Semester: 4 th Sub & Code: OS & CS - 2009 Branch (s): CSE, IT, CSSE, CSCE Subject Name:- DOS & Code:- CS Branch (s): CSE d) What issue occurs in a non-blocking receive() primitive. How to fix it? Scheme of evaluation: Both the features should be mentioned [.5 + .5] Answer: The issue in a non-blocking receive() primitive is when a message arrives in the message buffer, how does the receiving process know? One of the following two procedures can be used for this purpose: Polling: In the polling method, the receiver can check the status of the buffer when a test primitive is passed in this method. The receiver regularly polls the kernel to check whether the message is already in the buffer. Interrupt: A software interrupt is used in the software interrupt method to inform the receiving process regarding the status of the message i.e. when the message has been stored into the buffer and is ready for usage by the receiver. e) What is the consequence of a process holding the token, but does not need to enter into the critical section? Answer: When a process holds the token but does not require the critical section, then the token is simply passed to the next process in the ring, using a token passing mechanism. This ensures that the token circulate1s and eventually reaches processes that require access to the critical section.
Semester: 4 th Sub & Code: OS & CS - 2009 Branch (s): CSE, IT, CSSE, CSCE Subject Name:- DOS & Code:- CS Branch (s): CSE Comparison Summary: Features Switched-based Multiprocessor Switched-based Multicomputer Memory Access Shared memory Local memory Communication Method Direct memory access Message passing Scalability Limited by shared memory architecture High scalability with independent nodes Fault Tolerance Limited; failure can affect shared memory Better; Individual nodes may fail without affecting others Example High performance server with shared RAM Cluster of independent servers for parallel processing in distributed system environment In summary, the choice between a switch-based multiprocessor and a switch-based multicomputer depends on the specific application needs, focusing on either shared resource efficiency or independent node scalability
Semester: 4 th Sub & Code: OS & CS - 2009 Branch (s): CSE, IT, CSSE, CSCE Subject Name:- DOS & Code:- CS Branch (s): CSE TCP/IP may not be suitable for Distributed systems because of the following reasons. Connection oriented may not be suitable for distributed system Less suitable for large dynamic distributed system Communication on-the-fly required for distributed system, may not be supported by TCP/IP Communication pattern of the distributed system requires publish/subscribe, message queues, which does not supported by TCP/IP (b) How to deal with Orphans, while a client crashes during RPC? [ 2.5 Marks ] Answer: When a client process crashes, then the orphan processes can be handled by four different methods. The methods are as below: Scheme of evaluation: [1. 0 +0.5 + 0.5+0.5 ] marks Method #1: Before a client stub sends an RPC message, it makes a log entry telling what it is about to do. The log is kept on disk or some other medium that survives crashes. After a reboot, the log is checked and the orphan is explicitly killed off. This solution is called extermination. The disadvantage of this scheme is the horrendous expense of writing a disk record for every RPC. Furthermore, it may not even work, since orphans themselves may do RPCs, thus creating grand orphans or further descendants that are impossible to locate. Finally, the network may be partitioned, due to a failed gateway, making it impossible to kill them, even if they can be located. Method #2: It is called reincarnation, all these problems can be solved without the need to write disk records. The way it works is to divide time up into sequentially numbered epochs. When a client reboots, 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. Of course, if the network is partitioned, some orphans may survive. However, when they report back, their replies will contain an obsolete epoch number, making them easy to detect. Method #3: It is a variant on this idea, but less Draconian. It is called 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 is the computation killed. Method #4: It is called as expiration, in which each RPC is given a standard amount of time, T, to do the job. If it cannot finish, it must explicitly ask for another quantum, which is a nuisance. On the other hand, if after a crash the server waits a time T before rebooting, all orphans are sure to be gone. The problem to be solved here is choosing a reasonable value of T in the face of RPCs with wildly differing requirements.
Semester: 4 th Sub & Code: OS & CS - 2009 Branch (s): CSE, IT, CSSE, CSCE Subject Name:- DOS & Code:- CS Branch (s): CSE (b) Discuss the problems and solutions of Cristian’s Algorithm used for clock synchronization in distributed systems. [ 2.5 Marks ] Scheme of evaluation: [1.0 +1.5 ] marks Problems of Cristian’s algorithm : 1.0 mark Solutions of Cristian’s algorithm:1.5 mark Answer: Cristian’s Algorithm is used for clock synchronization in distributed systems. The issues in this algorithm are as below: #1. The round-trip-time during message exchange can vary during communication which leads to inaccurate calculation and consequences drifting of synchronization time. #2. Due to single point failure, the relying nodes may not be synchronized with the time server. #3. The mechanical/hardware difference of the clocks make them drift. #4. The algorithm does not have built-in mechanisms for verifying the authenticity of the time messages, which may lead to chaos in time-sensitive applications #5. The algorithm is not suitable for large number of systems due to latency Solutions for the issues of Cristian’s Algorithm are as below: #1. The RTT measurement should be improved. #2. Multiple Server may be employed to avoid one-point failure of the time-server. #3. Periodic resynchronization would maintain consistency across distributed system #4. Some authenticate protocol should be integrated to ensure the authenticity fo the source of the message. #5. Some algorithm should be integrated to measure the clock drift so as to adjust the clock proactively.
Semester: 4 th Sub & Code: OS & CS - 2009 Branch (s): CSE, IT, CSSE, CSCE Subject Name:- DOS & Code:- CS Branch (s): CSE Disadvantages: Can lead to increased memory usage and context-switching overhead. #2. Asynchronous I/O: The server uses non-blocking I/O operations and event-driven programming to handle multiple requests. Advantages: Efficient resource use and scalability, as the server can handle many requests with a small number of threads. Disadvantages: More complex to implement and manage compared to multi-threading. #3. Process-based Concurrency: Each client request is handled by a separate server process. Advantages: Provides strong isolation between requests and fault tolerance. Disadvantages: Higher memory and process management overhead. (b) Suppose in a centralized approach to mutual exclusion in a distributed system, the coordinator crashes. Does this always bring the system down? If not, under what circumstances does this happen? [ 2.5 Marks ] Scheme of evaluation: [0.5 + 1.0 +1.0 ] marks Assertion about the statement : 0.5 mark Impact after the crash:1.0 mark Circumstance citation: 1.0 mark Answer: In a centralized approach to mutual exclusion in a distributed system, a single coordinator is responsible for granting access to the critical section. If this coordinator crashes, it doesn't necessarily bring the entire system down, but it does lead to significant issues. Impact of Coordinator crash: i. Blocking of requests: If the coordinator crashes, any process that requests access to the critical section will be blocked indefinitely because there is no one to grant or deny access. This could lead to a system halt as processes wait indefinitely. ii. System Down: The system might effectively be down in terms of its ability to perform critical operations that require mutual exclusion. However, other parts of the system might continue functioning if they don't require mutual exclusion. Some of the circumstances where the system doesn’t go down: i. No pending requests: If there are no current requests for the critical section when the coordinator crashes, the system may continue operating normally until a process requests access. ii. Redundancy or Backup Coordinator: If the system has mechanisms to detect the crash and Select a new coordinator or has a backup coordinator ready to take over, the impact can be minimized. ---: End of the Evaluation Scheme : ---