Important Announcement
PubHTML5 Scheduled Server Maintenance on (GMT) Sunday, June 26th, 2:00 am - 8:00 am.
PubHTML5 site will be inoperative during the times indicated!

Home Explore MCA 635_Parallel and Distributed Computing

MCA 635_Parallel and Distributed Computing

Published by Teamlease Edtech Ltd (Amita Chitroda), 2020-12-14 08:50:28

Description: MCA 635_Parallel and Distributed Computing

Search

Read the Text Version

196 Parallel and Distributed Computing Continuous Media Observation All communication facilities discussed so far are essentially based on a discrete, that is time- independent exchange of information Continuous Media Characterized by the fact that values are time dependent: (a) Audio (b) Video (c) Animations (d) Sensor data (temperature, pressure, etc.) Transmission Modes Different timing guarantees with respect to data transfer: Asynchronous: no restrictions with respect to when data is to be delivered Synchronous: define a maximum end-to-end delay for individual data packets Isochronous: define a maximum end-to-end delay and maximum delay variance (jitter is bounded) Stream Definition A (continuous) data stream is a connection-oriented communication facility that supports isochronous data transmission. Some common stream characteristics: 1. Streams are unidirectional 2. There is generally a single source, and one or more sinks 3. Often, either the sink and/or source is a wrapper around hardware (e.g., camera, CD device, TV monitor) CU IDOL SELF LEARNING MATERIAL (SLM)

Communication 197 4. Simple stream: a single flow of data, e.g., audio or video 5. Complex stream: multiple data flows, e.g., stereo audio or combination audio/video. Figure 5.15: Stream Table 5.1: Message Oriented Communication and Stream Oriented Communication Message Oriented Communication Stream Oriented Communication UDP (user data gram protocol) uses manage TCP (transmission contact protocol) uses stream oriented communication oriented communication Data is sent by application in discrete packages Data is sent by with no particular structure. called message. Communication is connection less, data is sent Communication is oriented, connection established without any setup. before comm. It is unreliable best effort delivery without It is reliable, data acknowledged. acknowledgement. Re transmission is not performed. Lost data is reframe automatically. Low overhead. High overhead. No flow control. Flow control using sent protocol like sliding Transmission speed is very high as compared to Transmission speed is lower as compared to message stream-oriented. oriented. Suitable for applications like audio, video Suitable for applications like e-mail system where where speed is critical than loss of messages. data must be persistent through delivered late. CU IDOL SELF LEARNING MATERIAL (SLM)

198 Parallel and Distributed Computing 5.7 Summary Network Protocols are a set of rules governing exchange of information in an easy, reliable and secure way. Before we discuss the most common protocols used to transmit and receive data over a network, we need to understand how a network is logically organized or designed. The most popular model used to establish open communication between two systems is the Open Systems Interface (OSI) model proposed by ISO. Remote Procedure Call (RPC) is a protocol that one program can use to request a service from a program located in another computer on a network without having to understand the network's details. A procedure call is also sometimes known as a function call or a subroutine call. RPC uses the client-server model. The RMI (Remote Method Invocation) is an API that provides a mechanism to create distributed application in java. The RMI allows an object to invoke methods on an object running in another JVM. The RMI provides remote communication between the applications using two objects stub and skeleton. Stream-oriented communication: Support for continuous media. Streams in distributed systems. Stream management Continuous Media Observation All communication facilities discussed so far are essentially based on a discrete that is time- independent exchange of information. Continuous Media Characterized by the fact that values are time dependent: Audio, Video, Animations, Sensor data (temperature, pressure, etc.) CU IDOL SELF LEARNING MATERIAL (SLM)

Communication 199 5.8 Key Words/Abbreviations  Physical Layer: Transmission and reception of raw bit streams over a physical medium.  Data-Link Layer: Reliable transmission of data frames between two nodes connected by a physical layer.  Network Layer: Structuring and managing a multi-node network, including addressing, routing and traffic control.  Transport Layer: Reliable transmission of data segments between points on a network, including segmentation, acknowledgement and multiplexing.  Session Layer: Managing communication sessions, i.e., continuous exchange of information in the form of multiple back-and-forth transmissions between two nodes.  Presentation Layer: Translation of data between a networking service and an application; including character encoding, data compression and encryption/decryption.  Application Layer: High-level APIs, including resource sharing, remote file access. 5.9 Learning Activity 1. What is communication? ----------------------------------------------------------------------------------------------------------- ----------------------------------------------------------------------------------------------------------- 2. How does remote procedure call work? ----------------------------------------------------------------------------------------------------------- ----------------------------------------------------------------------------------------------------------- 3. What is meant by remote procedure call? ----------------------------------------------------------------------------------------------------------- ----------------------------------------------------------------------------------------------------------- CU IDOL SELF LEARNING MATERIAL (SLM)

200 Parallel and Distributed Computing 5.10 Unit End Questions (MCQ and Descriptive) A. Descriptive Type Questions 1. What is remote procedure call (RPC)? 2. What is Client Stub in remote procedure call ? 3. What is Server Stub in remote procedure call? 4. What is marshaling in remote procedure call? 5. Explain the difference between remote procedure call and local calls? 6. Why remote procedure call (RPC) doesn’t fit in OSI model? 7. List some remote procedure call (RPC) issues. 8. Which transport protocol is used by remote procedure call (RPC)? 9. What is the main goal of remote procedure call (RPC)? 10. What is meant by Message Oriented Communication? 11. What is Stream Oriented Communication? B. Multiple Choice Questions and Answers (MCQs) 1. Remote Procedure Calls are used ____________. (a) for communication between two processes remotely different from each other on the same system (b) for communication between two processes on the same system (c) for communication between two processes on separate systems (d) none of the mentioned 2. To differentiate the many network services a system supports ____________ are used. (a) Variables (b) Sockets (c) Ports (d) Service names CU IDOL SELF LEARNING MATERIAL (SLM)

Communication 201 3. RPC provides a(an) ____________ on the client side, a separate one for each remote procedure. (a) stub (b) identifier (c) name (d) process identifier 4. What is stub? (a) transmits the message to the server where the server side stub receives the message and invokes procedure on the server side (b) packs the parameters into a form transmittable over the network (c) locates the port on the server (d) all of the mentioned 5. To resolve the problem of data representation on different systems RPCs define ____________. (a) machine dependent representation of data (b) machine representation of data (c) machine-independent representation of data (d) none of the mentioned 6. What is the full form of RMI? (a) Remote Memory Installation (b) Remote Memory Invocation (c) Remote Method Installation (d) Remote Method Invocation 7. The remote method invocation ____________. (a) allows a process to invoke memory on a remote object (b) allows a thread to invoke a method on a remote object (c) allows a thread to invoke memory on a remote object (d) allows a process to invoke a method on a remote object CU IDOL SELF LEARNING MATERIAL (SLM)

202 Parallel and Distributed Computing 8. A process that is based on IPC mechanism which executes on different systems and can communicate with other processes using message based communication, is called ____________. (a) Local Procedure Call (b) Inter Process Communication (c) Remote Procedure Call (d) Remote Machine Invocation Answers 1. (c), 2. (c), 3. (a), 4. (d), 5. (c), 6. (d), 7. (b), 8.(c). 5.11 References References of this unit have been given at the end of the book. CU IDOL SELF LEARNING MATERIAL (SLM)

Resource Management 205 UNIT 6 RESOURCE MANAGEMENT Structure: 6.0 Learning Objectives 6.1 Introduction 6.2 Desirable Features of global Scheduling Algorithm 6.3 Task Assignment Approach 6.4 Load-balancing Approach 6.5 Load Sharing Approach 6.6 Summary 6.7 Key Words/Abbreviations 6.8 Learning Activity 6.9 Unit End Questions (MCQ and Descriptive) 6.10 References CU IDOL SELF LEARNING MATERIAL (SLM)

206 Parallel and Distributed Computing 6.0 Learning Objectives After studying this unit, you will be able to:  Able to List the desirable features of global scheduling algorithm  Describe the task assignment approach  Explain load balancing approach  Describe load sharing approach 6.1 Introduction  A resource can be a logical, such as a shared file, or physical, such as a CPU (a node of the distributed system). One of the functions of a distributed operating system is to assign processes to the nodes (resources) of the distributed system such that the resource usage, response time, network congestion, and scheduling overhead are optimized.  Resource manager of a distributed system schedules the processes to optimize combination of resources usage, response time, network congestion, scheduling overhead  There are three techniques for scheduling processes of a distributed system: 1. Task Assignment Approach, in which each process submitted by a user for processing is viewed as a collection of related tasks and these tasks are scheduled to suitable nodes so as to improve performance. 2. Load-balancing approach, in which all the processes submitted by the users are distributed among the nodes of the system so as to equalize the workload among the nodes. 3. Load-sharing approach, which simply attempts to conserve the ability of the system to perform work by assuring that no node is idle while processes wait for being processed.  The task assignment approach has limited applicability to practical situations because it works on the assumption that the characteristics (e.g., execution time, IPC costs etc.) of all the processes to be scheduled are known in advance CU IDOL SELF LEARNING MATERIAL (SLM)

Resource Management 207 6.2 Desirable Features of Global Scheduling Algorithm No a priori knowledge about the processes: Scheduling algorithms that operate based on the information about the characteristics and resource requirements of the processes pose an extra burden on the users who must provide this information while submitting their processes for execution.  Dynamic in nature: Process assignment decisions should be dynamic, I.e., be based on the current load of the system and not on some static policy. It is recommended that the scheduling algorithm possess the flexibility to migrate a process more than once because the initial decision of placing a process on a particular node may have to be changed after some time to adapt to the new system load.  Quick decision making capability: Heuristic methods requiring less computational efforts (and hence less time) while providing near-optimal results are preferable to exhaustive (optimal) solution methods.  Balanced system performance and scheduling overhead: Algorithms that provide near-optimal system performance with a minimum of global state information (such as CPU load) gathering overhead are desirable. This is because the overhead increases as the amount of global state information collected increases. This is because the usefulness of that information is decreased due to both the aging of the information being gathered and the low scheduling frequency as a result of the cost of gathering and processing the extra information.  Stability: Fruitless migration of processes, known as processor thrashing, must be prevented. E.g., if nodes n1 and n2 observe that node n3 is idle and then offload a portion of their work to n3 without being aware of the offloading decision made by the other node. Now if n3 becomes overloaded due to this it may again start transferring its processes to other CU IDOL SELF LEARNING MATERIAL (SLM)

208 Parallel and Distributed Computing nodes. This is caused by scheduling decisions being made at each node independently of decisions made by other nodes.  Scalability: A scheduling algorithm should scale well as the number of nodes increases. An algorithm that makes scheduling decisions by first inquiring the workload from all the nodes and then selecting the most lightly loaded node has poor scalability. This will work fine only when there are few nodes in the system. This is because the inquirer receives a flood of replies almost simultaneously, and the time required to process the reply messages for making a node selection is too long as the number of nodes (N) increase.  Fault tolerance: A good scheduling algorithm should not be disabled by the crash of one or more nodes of the system. Also, if the nodes are partitioned into two or more groups due to link failures, the algorithm should be capable of functioning properly for the nodes within a group.  Fairness of service: Global scheduling policies that blindly attempt to balance the load on all the nodes of the system are not good from the point of view of fairness of service. This is because in any load-balancing scheme, heavily loaded nodes will obtain all the benefits while lightly loaded nodes will suffer poorer response time than in a stand-alone configuration. A fair strategy that improves response time of the former without unduly affecting the latter is desirable. Hence load-balancing has to be replaced by the concept of load sharing, that is, a node will share some of its resources as long as its users are not significantly affected. 6.3 Task Assignment Approach Each process is viewed as a collection of tasks. These tasks are scheduled to suitable processor to improve performance. This is not a widely used approach because:  It requires characteristics of all the processes to be known in advance.  This approach does not take into consideration the dynamically changing state of the system. CU IDOL SELF LEARNING MATERIAL (SLM)

Resource Management 209 In this approach, a process is considered to be composed of multiple tasks and the goal is to find an optimal assignment policy for the tasks of an individual process. The following are typical assumptions for the task assignment approach:  Minimize IPC cost (this problem can be modeled using network flow model)  Efficient resource utilization  Quick turnaround time  A high degree of parallelism 6.4 Load-balancing Approach Type of Load-balancing Algorithms Static versus Dynamic Static algorithms use only information about the average behavior of the system Static algorithms ignore the current state or load of the nodes in the system Dynamic algorithms collect state information and react to system state if it changed Static algorithms are much more simpler Dynamic algorithms are able to give significantly better performance Load-balancing Approach Type of Static Load-balancing Algorithms Deterministic versus Probabilistic Deterministic algorithms use the information about the properties of the nodes and the characteristic of processes to be scheduled Probabilistic algorithms use information of static attributes of the system (e.g., number of nodes, processing capability, topology) to formulate simple process placement rules Deterministic approach is difficult to optimize Probabilistic approach has poor performance. Load-balancing Approach Type of Dynamic Load-balancing Algorithms Centralized versus Distributed Centralized approach collects information to server node and makes assignment decision Distributed approach contains entities to make decisions on a predefined set of nodes Centralized CU IDOL SELF LEARNING MATERIAL (SLM)

210 Parallel and Distributed Computing algorithms can make efficient decisions, have lower fault-tolerance Distributed algorithms avoid the bottleneck of collecting state information and react faster. Load-balancing Approach Type of Distributed Load-balancing Algorithms Cooperative versus Non-cooperative In Non-cooperative algorithms entities act as autonomous ones and make scheduling decisions independently from other entities. In Cooperative algorithms distributed entities cooperate with each other Cooperative algorithms are more complex and involve larger overhead Stability of Cooperative algorithms are better. Issues in Designing Load-balancing Algorithms 1. Load estimation policy: determines how to estimate the workload of a node. 2. Process transfer policy: determines whether to execute a process locally or remote. State information exchange policy: determines how to exchange load information among nodes. Location policy: determines to which node the transferable process should be sent. Priority assignment policy: determines the priority of execution of local and remote processes. Migration limiting policy: determines the total number of times a process can migrate. Load Estimation Policy I. for Load-balancing Algorithms  To balance the workload on all the nodes of the system, it is necessary to decide how to measure the workload of a particular node.  Some measurable parameters (with time and node dependent factor) can be the following:  Total number of processes on the node.  Resource demands of these processes.  Instruction mixes of these processes. CU IDOL SELF LEARNING MATERIAL (SLM)

Resource Management 211  Architecture and speed of the node’s processor.  Several load-balancing algorithms use the total number of processes to achieve big efficiency. Load Estimation Policy II. for Load-balancing Algorithms In some cases the true load could vary widely depending on the remaining service time, which can be measured in several way: Memory less method assumes that all processes have the same expected remaining service time, independent of the time used so far Past repeats assumes that the remaining service time is equal to the time used so far Distribution method states that if the distribution service times is known, the associated process’s remaining service time is the expected remaining time conditioned by the time already used. Load Estimation Policy III. for Load-balancing Algorithms None of the previous methods can be used in modern systems because of periodically running processes and daemons An acceptable method for use as the load estimation policy in these systems would be to measure the CPU utilization of the nodes Central Processing Unit utilization is defined as the number of CPU cycles actually executed per unit of real time It can be measured by setting up a timer to periodically check the CPU state (idle/busy). Process transfer policy I. for Load-balancing algorithms Most of the algorithms use the threshold policy to decide on whether the node is lightly-loaded or heavily-loaded Threshold value is a limiting value of the workload of node which can be determined by: Static policy: predefined threshold value for each node depending on processing capability. Dynamic policy: threshold value is calculated from average workload and a predefined constant. Below threshold value node accepts processes to execute, above threshold value node tries to transfer processes to a lightly-loaded node Single-threshold policy may lead to unstable algorithm because under loaded node could turn to be overloaded right after a process migration To reduce instability double-threshold policy has been proposed which is also known as high-low policy. CU IDOL SELF LEARNING MATERIAL (SLM)

212 Parallel and Distributed Computing Process Transfer Policy III. for Load-balancing Algorithms  Double threshold policy.  When node is in overloaded region new local processes are sent to run remotely, requests to accept remote processes are rejected.  When node is in normal region new local processes run locally, requests to accept remote processes are rejected.  When node is in under loaded region new local processes run locally, requests to accept remote processes are accepted. Location Policy I. for Load-balancing Algorithms  Threshold method  Policy selects a random node, checks whether the node is able to receive the process, and then transfers the process. If node rejects, another node is selected randomly. This continues until probe limit is reached.  Shortest method  L distinct nodes are chosen at random, each is polled to determine its load. The process is transferred to the node having the minimum value unless its workload value prohibits to accept the process.  Simple improvement is to discontinue probing whenever a node with zero load is encountered. Location Policy II. for Load-balancing Algorithms  Bidding method  Nodes contain managers (to send processes) and contractors (to receive processes).  Managers broadcast a request for bid, contractors respond with bids (prices based on capacity of the contractor node) and manager selects the best offer.  Winning contractor is notified and asked whether it accepts the process for execution or not.  Full autonomy for the nodes regarding scheduling. CU IDOL SELF LEARNING MATERIAL (SLM)

Resource Management 213  Big communication overhead.  Difficult to decide a good pricing policy. Location Policy III. for Load-balancing Algorithms  Pairing  Contrary to the former methods the pairing policy is to reduce the variance of load only between pairs.  Each node asks some randomly chosen node to form a pair with it.  If it receives a rejection it randomly selects another node and tries to pair again.  Two nodes that differ greatly in load are temporarily paired with each other and migration starts. State Information Exchange Policy I. for Load-balancing Algorithms Dynamic policies require frequent exchange of state information, but these extra messages arise two opposite impacts:  Increasing the number of messages gives more accurate scheduling decision.  Increasing the number of messages raises the queuing time of messages. State information policies can be the following:  Periodic broadcast  Broadcast when state changes  On-demand exchange  Exchange by polling State information exchange policy II. for Load-balancing algorithms  Periodic broadcast  Each node broadcasts its state information after the elapse of every T units of time.  Problem: heavy traffic, fruitless messages, poor scalability since information exchange is too large for networks having many nodes. CU IDOL SELF LEARNING MATERIAL (SLM)

214 Parallel and Distributed Computing  Broadcast when state changes  Avoids fruitless messages by broadcasting the state only when a process arrives or departures.  Further improvement is to broadcast only when state switches to another region (double- threshold policy). State Information Exchange Policy III. for Load-balancing Algorithms  On-demand exchange  In this method a node broadcast a State-Information-Request message when its state switches from normal to either underloaded or overloaded region.  The pair is broken as soon as the migration is over.  A node only tries to find a partner if it has at least two processes.  On receiving this message other nodes reply with their own state information to the requesting node.  Further improvement can be that only those nodes reply which are useful to the requesting node.  Exchange by polling To avoid poor scalability (coming from broadcast messages) the partner node is searched by polling the other nodes on by one, until poll limit is reached. Load Balancing  Load balancing is a concept that aims to make a network more efficient.  Load balancing distributes of traffic load evenly across a network with multiple-paths, in order to get optimal resource utilization, maximize throughput and minimize response time.  Thus load-balancing will split the traffic down the configured paths equally towards the destination.  E.g., with two 768 kpbs links and 800 kpbs traffic at any point, conceptually with load- balancing each path should have 400 kpbs worth of traffic. CU IDOL SELF LEARNING MATERIAL (SLM)

Resource Management 215  Load balancing is an attempt to process traffic evenly across a network with multiple links.  The reason this term is less preferred than load sharing is because it is difficult to achieve perfect load balancing.  With load balancing, if I looked at two traffic graphs, I’d expect to see two identical amounts of bandwidth being used on each path to the destination.  Because of the different ways I can achieve load balancing it can be difficult to achieve true load balancing across each of the paths.  Load balancing means distributing the traffic evenly and dynamically among different paths to avoid link congestion and saturation.  This can be done in a packet-by-packet basis or per destination in a round-robin fashion.  The packets sent by a host follow different paths to the same destination. All paths belong to all hosts. 6.5 Load Sharing Approach  Load sharing means one can split the traffic from a network to be transported by different routers (paths).  That’s exactly what Cisco does with MHSRP. The document on Configuring Multichassis Multilink PPP states that when it tells it to configure half of the hosts with one default gateway and the second half with the other.  Load sharing is inherent to the forwarding process of a router to share the forwarding of traffic, if the routing table has multiple paths to a destination.  If equal paths, the forwarding process will decide the manner of forwarding and forward packets based on the load-sharing algorithm used.  This still bears the possibility of unbalanced forwarding.  If unequal paths, the traffic is distributed inversely proportionally to the cost of the routes. CU IDOL SELF LEARNING MATERIAL (SLM)

216 Parallel and Distributed Computing  That is, paths with lower costs (metrics) are assigned more traffic, and paths with higher costs are assigned less traffic.  Load sharing is a term used when attempting to share some of the traffic across multiple links.  A good example of load sharing is when having two devices connect using two links of different speed. Let’s say link one is 9Mbit/s, and the other is 3Mbit/s.  For every three packets we send through the 9Mbit link, we would want to send one packet down the 3Mbit/s link.  The result is that the 9Mbit/s link would send a higher proportion of traffic than the 3Mbit/s link. 6.6 Summary (A) Task Assignment Approach Each process is viewed as a collection of tasks. These tasks are scheduled to suitable processor to improve performance. This is not a widely used approach because: It requires characteristics of all the processes to be known in advance. This approach does not take into consideration the dynamically changing state of the system. In this approach, a process is considered to be composed of multiple tasks and the goal is to find an optimal assignment policy for the tasks of an individual process. The following are typical assumptions for the task assignment approach: Minimize IPC cost (this problem can be modeled using network flow model).Efficient resource utilization. Quick turnaround time. A high degree of parallelism (B) Approach Load – Balancing In this, the processes are distributed among nodes to equalize the load among all nodes. The scheduling algorithms that use this approach are known as Load Balancing or Load Leveling Algorithms. These algorithms are based on the intuition that for better resource utilization, it is desirable for the load in a distributed system to be balanced evenly. This a load balancing CU IDOL SELF LEARNING MATERIAL (SLM)

Resource Management 217 algorithm tries to balance the total system load by transparently transferring the workload from heavily loaded nodes to lightly loaded nodes in an attempt to ensure good overall performance relative to some specific metric of system performance. We can have the following categories of load balancing algorithms: Static: Ignore the current state of the system. E.g. if a node is heavily loaded, it picks up a task randomly and transfers it to a random node. These algorithms are simpler to implement but performance may not be good. Dynamic: Use the current state information for load balancing. There is an overhead involved in collecting state information periodically; they perform better than static algorithms. Deterministic: Algorithms in this class use the processor and process characteristics to allocate processes to nodes. Probabilistic: Algorithms in this class use information regarding static attributes of the system such as number of nodes, processing capability, etc. Centralized: System state information is collected by a single node. This node makes all scheduling decisions. Distributed: Most desired approach. Each node is equally responsible for making scheduling decisions based on the local state and the state information received from other sites. Cooperative: A distributed dynamic scheduling algorithm. In these algorithms, the distributed entities cooperate with each other to make scheduling decisions. Therefore they are more complex and involve larger overhead than non-cooperative ones. But the stability of a cooperative algorithm is better than of a non-cooperative one. Non-Cooperative: A distributed dynamic scheduling algorithm. In these algorithms, individual entities act as autonomous entities and make scheduling decisions independently of the action of other entities. CU IDOL SELF LEARNING MATERIAL (SLM)

218 Parallel and Distributed Computing (C) Load – Sharing Approach Several researchers believe that load balancing, with its implication of attempting to equalize workload on all the nodes of the system, is not an appropriate objective. This is because the overhead involved in gathering the state information to achieve this objective is normally very large, especially in distributed systems having a large number of nodes. In fact, for the proper utilization of resources of a distributed system, it is not required to balance the load on all the nodes. It is necessary and sufficient to prevent the nodes from being idle while some other nodes have more than two processes. This rectification is called the Dynamic Load Sharing instead of Dynamic Load Balancing. The design of a load sharing algorithms require that proper decisions be made regarding load estimation policy, process transfer policy, state information exchange policy, priority assignment policy, and migration limiting policy. It is simpler to decide about most of these policies in case of load sharing, because load sharing algorithms do not attempt to balance the average workload of all the nodes of the system. Rather, they only attempt to ensure that no node is idle when a node is heavily loaded. The priority assignments policies and the migration limiting policies for load-sharing algorithms are the same as that of load-balancing algorithms. 6.7 Key Words/Abbreviations A Taxonomy of Load-Balancing Algorithms  Load-balancing approach: Load balancing is the process of distributing the load among various nodes of a distributed system.  Load-balancing algorithms.  Dynamic: Use the current state information for load balancing.  Static: Static algorithms use only information about the average behavior of the system.  Deterministic: Algorithms in this class use the processor and process characteristics to allocate processes to nodes.  Probabilistic: Algorithms in this class use information regarding static attributes of the system such as number of nodes, processing capability. CU IDOL SELF LEARNING MATERIAL (SLM)

Resource Management 219  Centralized: System state information is collected by a single node.  Distributed: Each node is equally responsible for making scheduling decisions based on the local state and the state information received from other sites.  Cooperative: A distributed dynamic scheduling algorithm.  Non-cooperative: In these algorithms, individual entities act as autonomous entities and make scheduling decisions independently of the action of other entities. 6.8 Learning Activity 1. What are the approaches for load balancing? ----------------------------------------------------------------------------------------------------------- ----------------------------------------------------------------------------------------------------------- 2. How is load balancing done? ----------------------------------------------------------------------------------------------------------- ----------------------------------------------------------------------------------------------------------- 3. What is load balancing in it? ----------------------------------------------------------------------------------------------------------- ----------------------------------------------------------------------------------------------------------- 6.9 Unit End Questions (MCQ and Descriptive) A. Descriptive Type Questions 1. What Is Server Load Balancing? 2. When Load Balancing To A Real Server, Which Server Will Be Accessed First? 3. What Is Global Server Load Balancing (Gslb)? 4. What Load Balancing Methods Are Supported With Array Network Gslb? 5. Define Resource Management? 6. What is meant by Desirable Features of global Scheduling algorithm? Give example CU IDOL SELF LEARNING MATERIAL (SLM)

220 Parallel and Distributed Computing 7. What is Task assignment approach? 8. What is the Load balancing approach? Give example 9. What are the advantages of load sharing approach? 10. What is meant by load sharing approach? B. Multiple Choice/Objective Type Questions 1. To quickly grid-enable a method on a bean using GridGain. (a) @Gridify (b) @Grid (c) @GridGain (d) None of the mentioned 2. GridGain provides: (a) load balancing (b) fault tolerance (c) routing (d) all of the mentioned 3. To build a parallelized solution for a problem that’s intrinsically better-suited to parallelization or that, for want of resources, needs to be chunked. (a) map (b) reduce (c) all of the mentioned (d) none of the mentioned 4. GridGain works with a GridTask, which specifies how to handle the main unit of work of the interface type: (a) Grid (b) GridGain (c) GridJob (d) All of the mentioned 5. GridGain lets you start up nodes using the startup script in the: (a) etc (b) opt (c) bin (d) all of the mentioned 6. To hoist a grid node into existence. (a) GridLoader (b) GridLoad (c) Grid (d) GridGain CU IDOL SELF LEARNING MATERIAL (SLM)

Resource Management 221 7. When you use the script that comes with the distribution is the class: (a) GridCommandLine (b) GridCommandLineLoader (c) GridCommand (d) All of the mentioned 8. A GridLoader instance is responsible for many things such as: (a) GridFactory.start (b) GridFactory.stop (c) All of the mentioned (d) None of the mentioned 9. GridFactory.start can take as its first parameter a: (a) GridConfiguration object (b) Spring application context (c) All of the mentioned (d) None of the mentioned Answers 1. (a), 2. (d), 3. (c), 4. (c), 5. (c), 6. (a), 7. (b), 8. (c), 9. (c). 6.10 References References of this unit have been given at the end of the book. CU IDOL SELF LEARNING MATERIAL (SLM)

222 Parallel and Distributed Computing UNIT 7 PROCESS MANAGEMENT Structure: 7.0 Learning Objectives 7.1 Introduction 7.2 Process States 7.3 Operations on the Process 7.4 Process Migration 7.5 Threads 7.6 Virtualization 7.7 Clients and Servers 7.8 Code Migration 7.9 Summary 7.10 Key Words/Abbreviations 7.11 Learning Activity 7.12 Unit End Questions (MCQ and Descriptive) 7.13 References CU IDOL SELF LEARNING MATERIAL (SLM)

Process Management 223 7.0 Learning Objectives After studying this unit, you will be able to:  Define process management  Explain process migration and threads  Describe code migration  Able to understand Clients, Servers Communication  Describe various type of Virtualization 7.1 Introduction A Program does nothing unless its instructions are executed by a CPU. A program in execution is called a process. In order to accomplish its task, process needs the computer resources. There may exist more than one process in the system which may require the same resource at the same time. Therefore, the operating system has to manage all the processes and the resources in a convenient and efficient way. Some resources may need to be executed by one process at one time to maintain the consistency otherwise the system can become inconsistent and deadlock may occur. The operating system is responsible for the following activities in connection with Process Management. 1. Scheduling processes and threads on the CPUs. 2. Creating and deleting both user and system processes. 3. Suspending and resuming processes. 4. Providing mechanisms for process synchronization. 5. Providing mechanisms for process communication. CU IDOL SELF LEARNING MATERIAL (SLM)

224 Parallel and Distributed Computing Attributes of a Process The Attributes of the process are used by the Operating System to create the process control block (PCB) for each of them. This is also called context of the process. Attributes which are stored in the PCB are described below. 1. Process ID When a process is created, a unique id is assigned to the process which is used for unique identification of the process in the system. 2. Program Counter A program counter stores the address of the last instruction of the process on which the process was suspended. The CPU uses this address when the execution of this process is resumed. 3. Process State The Process, from its creation to the completion, goes through various states which are new, ready, running and waiting. We will discuss about them later in detail. 4. Priority Every process has its own priority. The process with the highest priority among the processes gets the CPU first. This is also stored on the process control block. 5. General Purpose Registers Every process has its own set of registers which are used to hold the data which is generated during the execution of the process. 6. List of Open Files During the Execution, Every process uses some files which need to be present in the main memory. OS also maintains a list of open files in the PCB. 7. List of Open Devices OS also maintain the list of all open devices which are used during the execution of the process. CU IDOL SELF LEARNING MATERIAL (SLM)

Process Management 225 Figure 7.1: Process Attributes 7.2 Process States State Diagram Figure 7.2: State Diagram CU IDOL SELF LEARNING MATERIAL (SLM)

226 Parallel and Distributed Computing The process, from its creation to completion, passes through various states. The minimum number of states is five. The names of the states are not standardized although the process may be in one of the following states during execution. 1. New A program which is going to be picked up by the OS into the main memory is called a new process. 2. Ready Whenever a process is created, it directly enters in the ready state, in which, it waits for the CPU to be assigned. The OS picks the new processes from the secondary memory and put all of them in the main memory. The processes which are ready for the execution and reside in the main memory are called ready state processes. There can be many processes present in the ready state. 3. Running One of the processes from the ready state will be chosen by the OS depending upon the scheduling algorithm. Hence, if we have only one CPU in our system, the number of running processes for a particular time will always be one. If we have n processors in the system then we can have n processes running simultaneously. 4. Block or Wait From the Running state, a process can make the transition to the block or wait state depending upon the scheduling algorithm or the intrinsic behavior of the process. When a process waits for a certain resource to be assigned or for the input from the user then the OS move this process to the block or wait state and assigns the CPU to the other processes. 5. Completion or Termination When a process finishes its execution, it comes in the termination state. All the context of the process (Process Control Block) will also be deleted the process will be terminated by the Operating system. CU IDOL SELF LEARNING MATERIAL (SLM)

Process Management 227 6. Suspend Ready A process in the ready state, which is moved to secondary memory from the main memory due to lack of the resources (mainly primary memory) is called in the suspend ready state. If the main memory is full and a higher priority process comes for the execution then the OS have to make the room for the process in the main memory by throwing the lower priority process out into the secondary memory. The suspend ready processes remain in the secondary memory until the main memory gets available. 7. Suspend wait Instead of removing the process from the ready queue, it's better to remove the blocked process which is waiting for some resources in the main memory. Since it is already waiting for some resource to get available hence it is better if it waits in the secondary memory and make room for the higher priority process. These processes complete their execution once the main memory gets available and their wait is finished. 7.3 Operations on the Process 1. Creation Once the process is created, it will be ready and come into the ready queue (main memory) and will be ready for the execution. 2. Scheduling Out of the many processes present in the ready queue, the Operating system chooses one process and start executing it. Selecting the process which is to be executed next, is known as scheduling. 3. Execution Once the process is scheduled for the execution, the processor starts executing it. Process may come to the blocked or wait state during the execution then in that case the processor starts executing the other processes. CU IDOL SELF LEARNING MATERIAL (SLM)

228 Parallel and Distributed Computing 4. Deletion/killing Once the purpose of the process gets over then the OS will kill the process. The Context of the process (PCB) will be deleted and the process gets terminated by the Operating system. Process Schedulers Operating system uses various schedulers for the process scheduling described below. 1. Long-term Scheduler Long-term scheduler is also known as job scheduler. It chooses the processes from the pool (secondary memory) and keeps them in the ready queue maintained in the primary memory. Long-term scheduler mainly controls the degree of Multiprogramming. The purpose of long term scheduler is to choose a perfect mix of IO bound and CPU bound processes among the jobs present in the pool. If the job scheduler chooses more IO bound processes then all of the jobs may reside in the blocked state all the time and the CPU will remain idle most of the time. This will reduce the degree of Multiprogramming. Therefore, the Job of long term scheduler is very critical and may affect the system for a very long time. 2. Short-term scheduler Short-term scheduler is also known as CPU scheduler. It selects one of the Jobs from the ready queue and dispatch to the CPU for the execution. A scheduling algorithm is used to select which job is going to be dispatched for the execution. The Job of the short term scheduler can be very critical in the sense that if it selects job whose CPU burst time is very high then all the jobs after that, will have to wait in the ready queue for a very long time. This problem is called starvation which may arise if the short term scheduler makes some mistakes while selecting the job. CU IDOL SELF LEARNING MATERIAL (SLM)

Process Management 229 3. Medium term scheduler Medium term scheduler takes care of the swapped out processes.If the running state processes needs some IO time for the completion then there is a need to change its state from running to waiting. Medium term scheduler is used for this purpose. It removes the process from the running state to make room for the other processes. Such processes are the swapped out processes and this procedure is called swapping. The medium term scheduler is responsible for suspending and resuming the processes. It reduces the degree of multiprogramming. The swapping is necessary to have a perfect mix of processes in the ready queue. Various Times Related to the Process 1. Arrival Time The time at which the process enters into the ready queue is called the arrival time. 2. Burst Time The total amount of time required by the CPU to execute the whole process is called the Burst Time. This does not include the waiting time. It is confusing to calculate the execution time for a process even before executing it hence the scheduling problems based on the burst time cannot be implemented in reality. 3. Completion Time The Time at which the process enters into the completion state or the time at which the process completes its execution, is called completion time. 4. Turnaround Time The total amount of time spent by the process from its arrival to its completion, is called Turnaround time. 5. Waiting Time The Total amount of time for which the process waits for the CPU to be assigned is called waiting time. CU IDOL SELF LEARNING MATERIAL (SLM)

230 Parallel and Distributed Computing 6. Response Time The difference between the arrival time and the time at which the process first gets the CPU is called Response Time. 7.4 Process Migration Migration of a process from one node to another node is known as process migration. There are 2 techniques for migration. 1. Pre preemptive: Also called “process migration” The migration is done in between the process of execution. 2. Non-pre preemptive: Also called “code migration” The migration is done before the process begins execution. The reason for source migration could be: 1. Because the source machine is not having resource. OR. 1. The source machine is over loaded and hence requires clock to be executed. Figure 7.3: Process Migration CU IDOL SELF LEARNING MATERIAL (SLM)

Process Management 231 A process involves code segment + resources segment + execution segment. Binding can be initiated by sender or receiver. In sender initiated code is with sender sends a query to data server is an example of sender initiated in which process binds to resource. In receiver initiated : Receiver gets process migrated on demand.  Process migration is the relocation of a process from its source node to another destination node.  The way a process migrates from one node to another is shown in the figure below. Figure 7.4: Preemptive Process Migration  A process can either be migrated before it starts execution on its source node which is called as non-preemptive process or during the course of its execution that is known as preemptive process migration.  Preemptive process migration is more costly compared to non-preemptive because the process environment must accompany the process to its new node.  Steps involved in process migration: CU IDOL SELF LEARNING MATERIAL (SLM)

232 Parallel and Distributed Computing (i) Process is selected for migration. (ii) Select destination node for the process to be migrated. (iii) Transfer of selected process to the destination node.  Migration policy is responsible for first two steps while third step is handles by migration mechanism.  Migration of a process is complex that involves handling various activities to meet the requirements for a good process migration.  The sub activities involved are: (i) Freezing the process on its source node and restaring it on destination node. (ii) Transferring the processes address space from restarting from its source to destination node. (iii) Forwarding messages meant for the migrant process. (iv) Handling communication between processes that have been placed at different nodes.  A preemptive process migration facility allows the transfer of an executing process from one node to another. On the other hand, in system supporting only non-preemptive migration facility, a process can only be transferred prior to beginning its execution.  Preemptive process migration is costlier than non-preemptive process migration since the process state, which must accompany the process to its new node, becomes much more complex after execution begins. 7.5 Threads Life Cycle of a Thread (Thread States) A thread can be in one of the five states. According to sun, there is only 4 states in thread life cycle in java new, runnable, non-runnable and terminated. There is no running state. But for better understanding the threads, we are explaining it in the 5 states. CU IDOL SELF LEARNING MATERIAL (SLM)

Process Management 233 The life cycle of the thread in java is controlled by JVM. The java thread states are as follows: 1. New 2. Runnable 3. Running 4. Non-Runnable (Blocked) 5. Terminated Figure 7.5: Thread States CU IDOL SELF LEARNING MATERIAL (SLM)

234 Parallel and Distributed Computing 1. New: The thread is in new state if you create an instance of Thread class but before the invocation of start() method. 2. Runnable: The thread is in runnable state after invocation of start() method, but the thread scheduler has not selected it to be the running thread. 3. Running: The thread is in running state if the thread scheduler has selected it. 4. Non-runnable (Blocked): This is the state when the thread is still alive, but is currently not eligible to run. 5. Terminated: A thread is in terminated or dead state when its run() method exits. Difference between Preemptive Scheduling and Time Slicing Under preemptive scheduling, the highest priority task executes until it enters the waiting or dead states or a higher priority task comes into existence. Under time slicing, a task executes for a predefined slice of time and then reenters the pool of ready tasks. The scheduler then determines which task should execute next, based on priority and other factors. 7.6 Virtualization Server Virtualization is the partitioning of a physical server into number of small virtual servers, each running its own operating system. These operating systems are known as guest operating systems. These are running on another operating system known as host operating system. Each guest running in this manner is unaware of any other guests running on the same host. Different virtualization techniques are employed to achieve this transparency. Types of Server Virtualization 1. Hypervisor: A Hypervisor or VMM(virtual machine monitor) is a layer that exits between the operating system and hardware. It provides the necessary services and features for the smooth running of multiple operating systems. 2. It identifies traps, responds to privileged CPU instructions and handles queuing, dispatching and returning the hardware requests. A host operating system also runs on top of the hypervisor to administer and manage the virtaul machines. CU IDOL SELF LEARNING MATERIAL (SLM)

Process Management 235 3. Para Virtualization: It is based on Hypervisor. Much of the emulation and trapping overhead in software implemented virtualisation is handled in this model. The guest operating system is modified and recompiled before installation into the virtual machine. Due to the modification in the Guest operating system, performance is enhanced as the modified guest operating system communicates directly with the hypervisor and emulation overhead is removed. Example: Xen primarily uses Para virtualisation, where a customised Linux environment is used to supportb the administrative environment known as domain 0. Figure 7.6: Types of Server Virtualization Advantages:  Easier  Enhanced Performance  No emulation overhead Limitations:  Requires modification to guest operating system Full Virtualization It is very much similar to Para virtualisation. It can emulate the underlying hardware when necessary. The hypervisor traps the machine operations used by the operating system to perform CU IDOL SELF LEARNING MATERIAL (SLM)

236 Parallel and Distributed Computing I/O or modify the system status. After trapping, these operations are emulated in software and the status codes are returned very much consistent with what the real hardware would deliver. This is why unmodified operating system is able to run on top of the hypervisor. Example: VMWare ESX server uses this method. A customised Linux version known as Service Console is used as the administrative operating system. It is not as fast as Para virtualisation. Figure 7.7: Full Virtualization Advantages:  No modification to Guest operating system required. Limitations:  Complex  Slower due to emulation  Installation of new device driver difficult. Hardware Assisted Virtualization – It is similar to Full Virtualisation and Para virtualisation in terms of operation except that it requires hardware support. Much of the hypervisor overhead due to trapping and emulating I/O operations and status instructions executed within a guest OS is dealt by relying on the hardware extensions of the x86 architecture. CU IDOL SELF LEARNING MATERIAL (SLM)

Process Management 237 Unmodified OS can be run as the hardware support for virtualisation would be used to handle hardware access requests, privileged and protected operations and to communicate with the virtual machine. Examples: AMD – V Pacifica and Intel VT Vanderpool provides hardware support for virtualisation. Advantages:  No modification to guest operating system required.  Very less hypervisor overhead Limitations:  Hardware support Required Kernel Level Virtualization Instead of using a hypervisor, it runs a separate version of the Linux kernel and sees the associated virtual machine as a user – space process on the physical host. This makes it easy to run multiple virtual machines on a single host. A device driver is used for communication between the main Linux kernel and the virtual machine. Processor support is required for virtualisation (Intel VT or AMD – v). A slightly modified QEMU process is used as the display and execution containers for the virtual machines. In many ways, kernel level virtualization is a specialised form of server virtualization. Examples: User – Mode Linux (UML) and Kernel Virtual Machine (KVM) CU IDOL SELF LEARNING MATERIAL (SLM)

238 Parallel and Distributed Computing Figure 7.8: Kernel Level Virtualization Advantages:  No special administrative software required.  Very less overhead Limitations:  Hardware Support Required System Level or OS Virtualization Runs multiple but logically distinct environments on a single instance of operating system kernel. Also called shared kernel approach as all virtual machines share a common kernel of host operating system. Based on change root concept “chroot”. chroot starts during boot up. The kernel uses root filesystems to load drivers and perform other early stage system initialisation tasks. It then switches to another root filesystem using chroot command to mount an on -disk file system as its final root filesystem, and continue system initialization and configuration within that file system. The chroot mechanism of system level virtualisation is an extension of this concept. It enables the system to start virtual servers with their own set of processes which execute relative to their own filesystem root directories. CU IDOL SELF LEARNING MATERIAL (SLM)

Process Management 239 The main difference between system level and server virtualisation is wether different operating systems can be run on different virtual systems. If all virtual servers must share the same copy of operating system it is system level virtualisation and if different servers can have different operating systems ( including different versions of a single operating system) it is server virtualisation. Examples: FreeVPS, Linux Vserver and OpenVZ are some examples. Figure 7.9: OS Virtualization Advantages:  Significantly light weight than complete machines(including a kernel)  Can host many more virtual servers  Enhanced Security and isolation Limitations:  Kernel or driver problem can take down all virtual servers. 7.7 Clients and Servers Client/Server communication involves two components, namely a client and a server. They are usually multiple clients in communication with a single server. The clients send requests to the server and the server responds to the client requests. There are three main methods to client/server communication. These are given as follows: CU IDOL SELF LEARNING MATERIAL (SLM)

240 Parallel and Distributed Computing Sockets Sockets facilitate communication between two processes on the same machine or different machines. They are used in a client/server framework and consist of the IP address and port number. Many application protocols use sockets for data connection and data transfer between a client and a server. Socket communication is quite low-level as sockets only transfer an unstructured byte stream across processes. The structure on the byte stream is imposed by the client and server applications. A diagram that illustrates sockets is as follows: Figure 7.10: Clients and Servers Remote Procedure Calls These are interprocess communication techniques that are used for client-server based applications. A remote procedure call is also known as a subroutine call or a function call. A client has a request that the RPC translates and sends to the server. This request may be a procedure or a function call to a remote server. When the server receives the request, it sends the required response back to the client. A diagram that illustrates remote procedure calls is given as follows: CU IDOL SELF LEARNING MATERIAL (SLM)

Process Management 241 Figure 7.11: Remote Procedure Calls Pipes These are interprocess communication methods that contain two end points. Data is entered from one end of the pipe by a process and consumed from the other end by the other process. The two different types of pipes are ordinary pipes and named pipes. Ordinary pipes only allow one way communication. For two way communication, two pipes are required. Ordinary pipes have a parent child relationship between the processes as the pipes can only be accessed by processes that created or inherited them. Named pipes are more powerful than ordinary pipes and allow two way communication. These pipes exist even after the processes using them have terminated. They need to be explicitly deleted when not required anymore. A diagram that demonstrates pipes are given as follows: Figure 7.12: Pipes CU IDOL SELF LEARNING MATERIAL (SLM)

242 Parallel and Distributed Computing 7.8 Code Migration There are situations in which passing programs, sometimes even while they are being executed, simplifies the design of a distributed system. To start with by considering different approaches to code migration, followed by a discussion on how to deal with the local resources that a migrating program uses. Traditionally, code migration in distributed systems took place in the form of process migration in which an entire process was moved from one machine to another. Moving a running process to a different machine is a costly and intricate task, and there had better be a good reason for doing so. That reason has always been performance. The basic idea is that overall system performance can be improved if processes are moved from heavily-loaded to lightly-loaded machines. Load is often expressed in terms of the CPU queue length or CPU utilization, but other performance indicators are used as well. Support for code migration can also help improve performance by exploiting parallelism, but without the usual intricacies related to parallel programming. A typical example is searching for information in the Web. It is relatively simple to implement a search query in the form of a small mobile program, called a mobile agent that moves from site to site. By making several copies of such a program, and sending each off to different sites, we may be able to achieve a linear speedup compared to using just a single program instance. CU IDOL SELF LEARNING MATERIAL (SLM)

Process Management 243 Figure 7.13: Code Migration 7.9 Summary A Program does nothing unless its instructions are executed by a CPU. A program in execution is called a process. In order to accomplish its task, process needs the computer resources. There may exist more than one process in the system which may require the same resource at the same time. Therefore, the operating system has to manage all the processes and the resources in a convenient and efficient way. Some resources may need to be executed by one process at one time to maintain the consistency otherwise the system can become inconsistent and deadlock may occur. Migration of a process from one node to another node is known as process migration. There are 2 techniques for migration. 1. Pre preemptive: Also called \"process migration\" The migration is done in between the process of execution. 2. Non-pre preemptive: Also called “code migration “The migration is done before the process begins execution. A thread can be in one of the five states. According to sun, there are only 4 states in thread life cycle in java new, runnable, non-runnable and terminated. There is no running state. Server Virtualization is the partitioning of a physical server into number of small virtual servers, each running its own operating system. These operating systems are known as guest operating systems. These are running on another operating system known as host operating CU IDOL SELF LEARNING MATERIAL (SLM)

244 Parallel and Distributed Computing system. Each guest running in this manner is unaware of any other guests running on the same host. Different virtualization techniques are employed to achieve this transparency. 7.10 Key Words/Abbreviations  Process ID: When a process is created, a unique id is assigned to the process  Ready: Whenever a process is created, it directly enters in the ready state  New: The thread is in new state if you create an instance of Thread class.  Runnable: The thread is in runnable state after invocation of start () method,  Running: The thread is in running state if the thread scheduler has selected it.  Non-Runnable (Blocked): This is the state when the thread is still alive.  Terminated: A thread is in terminated or dead state when its run() method exits. 7.11 Learning Activity 1. What is distributed process management? ----------------------------------------------------------------------------------------------------------- ----------------------------------------------------------------------------------------------------------- 2. What is process migration in distributed? ----------------------------------------------------------------------------------------------------------- ----------------------------------------------------------------------------------------------------------- 3. What do you mean by Process Management? ----------------------------------------------------------------------------------------------------------- ----------------------------------------------------------------------------------------------------------- CU IDOL SELF LEARNING MATERIAL (SLM)

Process Management 245 7.12 Unit End Questions (MCQ and Descriptive) A. Descriptive Type Questions 1. What is Thread? 2. What is difference between Process and Thread? 3. What are the advantages of Process management? 4. What is meant by Virtualization? Give example 5. What is Code Migration? 6. Define Process management? 7. Define process migration? 8. What are the Clients, Servers? B. Multiple Choice/Objective Type Questions 1. The systems which allow only one process execution at a time, are called ____________. (a) uniprogramming systems (b) uniprocessing systems (c) unitasking systems (d) none of the mentioned 2. In operating system, each process has its own ____________. (a) address space and global variables (b) open files (c) pending alarms, signals and signal handlers (d) all of the mentioned 3. In Unix, Which system call creates the new process? (a) fork (b) create (c) new (d) none of the mentioned 4. A process can be terminated due to ____________. (a) normal exit (b) fatal error (c) killed by another process (d) all of the mentioned CU IDOL SELF LEARNING MATERIAL (SLM)

246 Parallel and Distributed Computing 5. What is the ready state of a process? (a) when process is scheduled to run after some execution (b) when process is unable to run until some task has been completed (c) when process is using the CPU (d) none of the mentioned 6. What is interprocess communication? (a) communication within the process (b) communication between two process (c) communication between two threads of same process (d) none of the mentioned 7. A set of processes is deadlock if ____________. (a) each process is blocked and will remain so forever (b) each process is terminated (c) all processes are trying to kill each other (d) none of the mentioned 8. A process stack does not contain ____________. (a) Function parameters (b) Local variables (c) Return addresses (d) PID of child process 9. Which system call returns the process identifier of a terminated child? (a) wait (b) exit (c) fork d) get 10. The address of the next instruction to be executed by the current process is provided by the ____________. (a) CPU registers (b) Program counter (c) Process stack (d) Pipe Answers 1. (b), 2. (d), 3. (a), 4. (d), 5. (a), 6. (b), 7. (a), 8. (d), 9. (a), 10. (b). CU IDOL SELF LEARNING MATERIAL (SLM)

References 247 References 1. Tanenbaum, Andrew S.; Steen, Maarten van (2002). Distributed systems: principles and paradigms. Upper Saddle River, NJ: Pearson Prentice Hall. ISBN 0-13-088893- 2. Parallel and Distributed Computing Handbook 1st Edition by Albert Y. Zomaya 3. Distributed Operating Systems: Concepts and Design by Sinha. 4. Savage, J.E. (1998). Models of Computation: Exploring the Power of Computing. Addison Wesley. p. 209. ISBN 9780201895391. 5. Andrews, Gregory R. (2000), Foundations of Multithreaded, Parallel, and Distributed Programming, Addison–Wesley, ISBN 978-0-201-35752-3. 6. Introduction to Parallel Computing (Blaise Barney). 7. Godfrey, Bill (2002). \"A primer on distributed computing. 8. Coulouris, George; et al. (2011), Distributed Systems: Concepts and Design (5th Edition), Addison-Wesley ISBN 0-132-14301-1. 9. Faber, Jim (1998), Java Distributed Computing, O'Reilly: Java Distributed Computing by Jim Faber, 1998. 10. Garg, Vijay K. (2002), Elements of Distributed Computing, Wiley-IEEE Press I SBN: 0-471-03600-5. 11. Tel, Gerard (1994), Introduction to Distributed Algorithms, Cambridge University Press. 12. “Elements of Distributed Computing” by Vijay K. Garg. 13. An Introduction to High-Performance Parallel Computing 1st Edition by Duane Storti Mete Yurtoglu. 14. Parallel Computing for Real-time Signal Processing and Control, M. Osman Tokhi, M. Alamgir Hossain, M. Hasan Shaheed. 15. Distributed Systems, 3rd Edition (Maarten van Steen, et al). CU IDOL SELF LEARNING MATERIAL (SLM)


Like this book? You can publish your book online for free in a few minutes!
Create your own flipbook