0% found this document useful (0 votes)
29 views7 pages

Assignment I - 875

This document contains an assignment for an Advanced Operating Systems course. It provides 5 questions related to distributed systems topics like distributed system characteristics, differences between cluster and grid computing, monitors, clock synchronization algorithms, and vector clock algorithms. Students are instructed to submit their answers on Blackboard before the deadline and avoid copying from other students.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
29 views7 pages

Assignment I - 875

This document contains an assignment for an Advanced Operating Systems course. It provides 5 questions related to distributed systems topics like distributed system characteristics, differences between cluster and grid computing, monitors, clock synchronization algorithms, and vector clock algorithms. Students are instructed to submit their answers on Blackboard before the deadline and avoid copying from other students.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 7

OM OF SAUDI ARABIA | JAZAN UNIVERSITY

COLLEGE OF COMPUTER SCIENCE & INFORMATION SYSTEMS


ASSIGNMENT - 2022-23, Second Semester

Academic Year 2022-2023 Semester Second

Course with COMP 332 – ADVANCED OPERATING


Section
code SYSTEMS

Type of
Individual Marks 10
Assignment

Date of
15/9/2022 Deadline 18/01/2023
Announcement

ASSIGNMENT PROBLEM STATEMENT


Instructions:

1. Submit your assignment on BLACKBOARD before deadline.

2. Source can be searched in internet but strictly avoid copying from friends.

3. Questions are from Chapter 1, 2 and 3. Each question carries TWO marks.

Questions:

1. What is distributed system and its characteristics?

A distributed system is a collection of independent computers that appear to the users of

the system as a single coherent system. The key characteristics of a distributed system

are as follows:

Concurrency of components: The components in a distributed system

worksimultaneously, which makes it possible for the system to process multiple requests

simultaneously.

No global clock: There is no global clock in a distributed system, which means that the

system does not rely on a single clock to synchronize the components.

Independent failure: Each component in a distributed system can fail independently,

which means that the failure of one component does not necessarily lead to the failure of

the entire system.

Heterogeneity: Distributed systems can consist of a variety of different types of

components, including different types of hardware and software.

Transparency: The users of a distributed system should be unaware of the location and

nature of the resources they are accessing.

Scalability: Distributed systems should be able to scale easily to accommodate more

users or more data.

Openness: Distributed systems should be open to communication with other systems.


2. Explain the difference between cluster computing and grid computing.

cluster computing

Cluster computing systems became popular when the price/performance ratio of personal

computers and workstations improved.

cluster computing is used for parallel programming in which a single (compute intensive)

program is run in parallel on multiple machines.

• the underlying hardware consists of a collection of similar workstations or PCs, closely

connected by means of a highspeed local-area network.

• In addition, each node runs the same operating system.

•Cluster computing is mainly used to increase the performance and availability of a single

system, while Grid computing is mainly used to solve large-scale computational problems

by harnessing the spare processing power of multiple, geographically distributed systems.

Grid computing:

• often constructed as a federation of computer systems, where each system may fall

under a different administrative domain, and may be very different when it comes to

hardware, software, and deployed network technology.

• Grid computing, on the other hand, is a type of distributed computing in which a group of

computers work together to solve a single problem or perform a single task. The

computers in a grid may be located in different locations and may be connected by a wide

area network (WAN). The main goal of grid computing is to utilize the spare processing

power of multiple computers to solve large-scale problems that would be impractical or

impossible to solve with a single computer


3. What is monitor in distributed system

A monitor is a software module consisting of one or moreprocedures, an initialization

sequence, and local data. The chief characteristics of a monitor are the following:

1.The local data variables are accessible only by the monitor’s procedures and not by any

external procedure.

2. A process enters the monitor by invoking one of its procedures.

3. Only one process may be executing in the monitor at a time;any other processes that

have invoked the monitor are blocked, waiting for the monitor to become available. A

monitor supports synchronization by the use of condition variables that are contained

within the monitor and accessible only

within the monitor. Condition variables are a special data type in monitors, which are

operated on by two functions:

• cwait(c) : Suspend execution of the calling process on condition

c . The monitor is now available for use by another process.

• csignal(c) : Resume execution of some process blocked after a

cwait on the same condition. If there are several such processes,choose one of them; if

there is no such process, do nothing. The monitor includes two condition variables

(declared with the construct cond ): notfull is true when there is room to add at least one

character to the buffer, and notempty is true when there is at least one character in the

buffer.
4. What is clock synchronization? Synchronize the network given below when the

server advances 10 second using Berkeley algorithm.

Server

2:35

2:00 2:20 1:55

Client 1 Client 2 Client 3

a-The Server asks all the other machines for their clock values and send his current time

to all clients:

2:35

2:35 2:35. 2:35

2:00
2:20
1:55

b-The Client answer and The clients, client1, client2, and client3, compare the server's time

with their own time and calculate the time offset. Client1's time offset is 35 seconds,

client2's time offset is 15 seconds, and client3's time offset is 40 seconds. The clients then

send their time offset back to the server.

C-The server calculates the average time offset of all clients and applies it to its own

clock.The server sends the new corrected time to all clients. Clients update their clocks

with the corrected time received from the server.


All the clocks in the network are now synchronized to the server's time plus 10 seconds.

The Server tells everyone how to adjust their clock=(0+35+15+40)/4=22.5 mints

Server

2:45

2:45 2:45 2:45

Clients 1 clients 2 clients 3

5. Describe Vector clock algorithm with example.

A vector clock is a method of determining the causality between events in a distributed

system. It is a vector of logical clocks, one for each process in the system. Each process

maintains its own logical clock and increments it each time it performs an event. A vector

clock is represented as a vector of integers where the i-th entry of the vector represents the

logical clock of the i-th process. The vector clock is updated with each event that occurs,

and it is sent with each message that is sent between processes. For example, let's say

there are three processes in a distributed system: A, B, and C. Each process maintains a

logical clock that starts at 0. Process A sends a message to process B. The vector clock

for process A is [1, 0, 0] and it is sent with the message.Process B receives the message

and updates its vector clock to [1, 1, 0]. It then sends a message to process C. The vector

clock for process B is [1, 1, 0] and it is sent with the message.Process C receives the

message and updates its vector clock to [1, 1, 1]. Now, Process A sends another message

to Process C. The vector clock for process A is [2, 1, 1].Process C receives the message

and updates its vector clock to [2, 1, 2]. In this example, the final vector clocks of all
processes are [2, 1, 2], [1, 1, 0], [2,1,2] respectively. From the vector clock, it can be seen

that the first message sent by process A caused the event at process B, and the second

message sent by process A caused the event at process C.Vector clocks are used for

ordering events, detecting causality and detecting concurrent events in a distributed

system.

Name of the Course Signatur


Basem Assiri BASEM
teacher e

You might also like