0% found this document useful (0 votes)
36 views27 pages

Distributed Operating Systems: By: Malik Abdulrehman

This document discusses distributed operating systems and distributed file systems. It covers topics like distributed shared memory implemented using algorithms like central server, migration, read replication and full replication. It also discusses memory coherence protocols and issues in designing distributed file systems like naming, caching, writing policies, cache consistency, availability, scalability and semantics.

Uploaded by

MalikAbdulrehman
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
36 views27 pages

Distributed Operating Systems: By: Malik Abdulrehman

This document discusses distributed operating systems and distributed file systems. It covers topics like distributed shared memory implemented using algorithms like central server, migration, read replication and full replication. It also discusses memory coherence protocols and issues in designing distributed file systems like naming, caching, writing policies, cache consistency, availability, scalability and semantics.

Uploaded by

MalikAbdulrehman
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 27

Distributed operating systems

By:
Malik Abdulrehman.

Topics to be covered
1-

Distributed shared memory (Algos for


implementation of DSM)
-Memory Coherence
-Coherence protocols
2- Distributed File System ( Designing issues)
-Naming and name resolution
-Caches on disk and main memory
-Writing policy
-Cache consistency
-Availability
-Scalability
-Semantics

Distributed shared memory


physically

separated memories can be addressed as one


logically shared address space.

Algos for implementation of DSM


Need

for Algos
Minimize communication overhead
Data access from several nodes
Keep track of location of remote data

The central server algorithm


A central-server maintains all the shared data.
It services the read request s from other nodes

clients by returning the data items to them.


It updates the data on writing requests by
nodes/clients
and returns acknowledgment message

or

Central Server Algo

Client

Centralserver

Client

Send data
request

Centralserver

Receive Request

Perform data

accessSend

Receive response response

The migration algorithm


Every

data access request is forwarded to the location


of data.
data in the migration is shipped to the location of the
data access request.
Keeping track of memory location: location service, home
machine for each page, broadcast.
The migration algorithm provides an opportunity to
integrate D SM with the virtual memory provided by the
OS running at individual nodes.

The Migration Algo

The Read-Replication Algorithm


The

read-replication algorithm extends the migration


algorithm by replicating data blocks and allowing
multiple nodes to have read access or one node to have
read-write access (the multiple readers-one writer
protocol) .

The Read-Replication Algo


Client
If block no local,
determine location
send request

Receive block
Multicast invalidate

Access data

Remote host

Receive request
Send block

Receive invalidate
Invalidate block

The Full-Replication Algorithm


Multiple

nodes to have both read and write access to shared data blocks (the
multiple readers-multiple writers protocol) .
One simple way to maintain consistency is to use a gap-free sequencer .
All nodes wishing to modify shared data will send the modification to a
sequencer.
The sequencer will assign a sequence number and multicast the
modification with the sequence number to all the nodes that have a copy of
the shared data item .
Each node processes the modification requests in the sequence number
order .
A gap between the sequence number of a modification request and the
expected sequence number at a node indicates that one or more
modifications have been missed.

The Full-Replication Algo

Memory Coherence
It

is an issue that affects the design of computer systems


in which two or more processors or cores share a
common area of memory

Coherence protocols
Write

Invalidate
when a write operation is observed to a location that a
cache has a copy of, the cache controller invalidates its
own copy of the snooped memory location.
Write Update
when a write operation is observed to a location that a
cache has a copy of, the cache controller updates its own
copy of the snooped memory location with the new data.

Distributed File System


A distributed

file system is a client/server-based


application that allows clients to access and process data
stored on the server as if it were on their own computer.

Design issues
Naming

and name resolution


-Caches on disk and main memory
-Writing policy
-Cache consistency
-Availability
-Scalability
-Semantics

Naming and name resolution


Issues
How are files named?
Do file names reveal their location?
Do file names change if the file moves?
Do

file names change if the user move?

Caches on disk and main memory


Disk cache:
Advantages:
Access time reduced.
Safer if node fails.
Disadvantages:
Difficult to keep local copy consistent with remote
copy.
Slower than just keeping it in local memory.
Requires client to have a disk.

Main memory cache

Permit workstations to be diskless


More quick access
Difficult

to keep local copy consistent with remote copy.


Does not tolerate node failure well

Writing policy

This policy decides when a modified cache block at client should be


transferred to the server. Following policies are used:
a) Write Through:
All writes required by clients applications are also carried out at servers
immediately. The main advantage is reliability that is when client crash, little
information is lost. This scheme cannot take advantage of caching.
b) Delayed Writing Policy:
It delays the writing at the server that is modifications due to write are
reflected at server after some delay. This scheme can take advantage of
caching. The main limitation is less reliability that is when client crash, large
amount of information can be lost.

Writing policies cont.


c) This scheme delays the updating of files at the server until

the file is closed at the client. When average period for which
files are open is short then this policy is equivalent to write
through and when period is large then this policy is euivalent to
delayed writing policy

Cache consistency
When

multiple clients want to modify or access the same data, then cache
consistancy problem arises. Two schemes are used to gurantee that data
returned to the client is valid.

a) Server initiated approach:


Server inform the cache manager whenever data in client caches
becomes valid. Cache manager at clients then retrieve the new data or
invalidate the blocks containing old data in cache in cache. Server has
maintain reliable records on what data blocks are cached by which cache
managers. Co operation between servers and cache manager is required.

Cont.
b)

Client-initiated approach:
It is the responsibilty of cache manager at the clients to
validate data with server before returning it to the clients.
This approach does not take benefit of caching as the
cache manager consult the server for validation of
cached block each time.
.

Availability
replication

is the main mechanism


keep replicas consistent
detect inconsistencies among replicas
consistency problem may decrease the availability

Scalability
The design should support a growing system
Example: server-initiated cache invalidation complexity and

load grow with size of system. Possible solutions:


Do not provide cache invalidation service for read-only files
Provide design to allow users to share cached data

Two types of scaling


Horizontal scaling
Vertical scaling

Semantics
Expected semantics: a read will return data stored by the latest write
Possible options:

All read and writes go through the server


Disadvantage: communication overhead

Use of lock mechanism


Disadvantage: file not always available

ThankYou

You might also like