You are on page 1of 12

FAILURE HANDLING in message passing:

• Loss of Request message


• Loss of Response Message
• Unsuccessful execution of request
To overcome these problems
• A reliable IPC protocol of a message-passing system is designed.
• It is based on the ideas of internal retransmission of messages after time out and Return of
an ACK to sending m/c kernel by receiver m/c kernel.
• The time for which the sender waits is slightly more than the approximate round trip time
(the average time required for executing the request)
1. FOUR MESSAGE RELIABLE IPC Protocol

The four-message reliable IPC


protocol for client-
servercommunication
between two processes.

2. THREE MESSAGE RELIABLE IPC


The three-message reliable
IPC protocol for client-
servercommunication
between two processes.

 What happens when request processing takes a long time?


 Answer: Server sends a separate ACK to acknowledge request message

3. TWO MESSAGE RELIABLE IPC

The two-message IPC protocol


used in many systems for
client-server communication
between two processes.

 When request received at servers machine, it starts a timer


 If server finishes processing the req. before time expires, reply acts as ACK
 Else a separate ACK is sent by kernel
Distributed computing environment (DCE):or DCE services

The present day computing industry depends on the efficient usage of resources. So instead
of duplicating the resources at every node of computing, a remote method of accessing the
resources is more efficient and saves costs. This gave rise to the field of distributed
computing, where not only physical resources, but also processing power will be distributed.
Distributed computing was driven by the following factors.
a) Desire to share data and resources
b) Minimize duplication functionality
c) Increase cost efficiency
d) Increase reliability and availability of resources.

The DCE Consists of the Following Components [IAIX]


a) Distributed File Service
b) Distributed Time Service
c) Security Service
d) Cell Directory Service
e) Threads Service
All these services are achieved by Remote Procedure Call (RPC).
DCE Directory services:
The DCE Directory Service makes it possible to contact people and to use resources such as disks,
print queues, and servers anywhere in the network without knowing their physical location. The
directory service is much like a telephone directory assistance service that provides a phone number
when given a person's name. Given the unique name of a person, server, or resource, it can return
the network address and other information associated with that name.
The DCE Directory Service stores addresses and other relevant information as attributes of the
name. For example, attributes can contain the name of an organizational unit, such as European
Sales; a location, such as the first floor of Building A; or a telephone number.
AFS NFS
1. In AFS, the server keeps track of which files 1. It’s not in the case of NFS or we can say
are opened by which clients.In other words, NFS has stateless servers
AFS has stateful servers
2. AFS works at the whole file level 2. NFS works with file blocks
3. Only after a whole file is updated and closed 3. when a block of the file is written at a client
it may be updated at server it may be updates soon at the server
4. AFS is "less" coherent 4. More coherent than AFS
5.  Updates are less frequent. 5.  Updates are more frequent.
6. AFS provides location independence (the 6. NFS provides only location transparency
physical storage location of the file can be (the file name does not hint at its physical
changed, without having to change the path storage location). 
of the file, etc.) as well as location
transparency

Processor – Pool Model


The processor-pool model is based on the observation that most of the time a user
does not need any computing power but once in a while he or she may need a very large
amount of computing power for a short time (e.g., when recompiling a program
consisting of a large number of files after changing a basic shared declaration).
Therefore, unlike the workstation-server model in which a processor is allocated to each
user, in the processor pool model the processors are pooled together to be shared by the
users as needed. The pool of processors consists of a large number of microcomputers
and minicomputers attached to the network. Each processor in the pool has its own
memory to load and run a system program or an application program of the distributed
computing system.
• Processor Pool Model- A rack full of cpu’s in the machine room, which can be dynamically
allocated to users on demand.

•Advantages of Processor pool model-


Ø It allows better utilization of available processing power
Ø Provides greater flexibility than workstation model
• Disadvantages of Processor pool model-
Ø Unsuitable for high performance interactive applications
Multidatagram Messages:
1.Almost all networks have a limit on the size of data that can be transmitted at a time.
2. This size is known as the maximum transfer unit (MTU) of a network.
3. A message whose size is greater than the MTU has to be fragmented into multiples of the MTU
and then each fragment has to be send separately.
4. Each fragment is send in a packet that has some control information in addition to the message
data.
5. Each packet is known as a datagram.
6. Messages smaller than the MTU of the network can be sent in a single packet and are known
as single-datagram messages.
7. On the other hand, messages larger than the MTU of the network have to be fragmented and
sent in multiple packets.
8. Such messages are known as multidatagram messages.
9. Obviously, different packets of a multidatagram message bear a sequential relationship to one
another.
10. The disassembling of a multidatagram message into multiple packets on the sender side and
the reassembling of the packets on the receiver side is usually the responsibility of the message-
passing system.
11. Keeping track of Lost and Out-of-Sequence Packet in Multi-datagram Messages is complicated.
12. Thus used following approaches
Stop-and-wait protocol – acknowledgement for each packet separately
Blast protocol – acknowledgement for all packets in message once.
Bitmap protocol – sends missing packet’s sequence number in acknowledgement for retransmit
Sun’s NFS:
The Sun Network File system (NFS) provides transparent, remote access to file systems. Unlike
many other remote file system implementations under UNIX, NFS is designed to be easily portable
to other operating systems and machine architectures. It uses an External Data Representation
(XDR) specification to describe protocols in a machine and system independent way. NFS is
implemented on top of a Remote Procedure Call package (RPC) to simplify protocol definition,
implementation, and maintenance.

The “filesystem interface” consists of two parts: the Virtual File System (VFS) interface defines the
operations that can be done on a filesystem, while the virtual node (vnode) interface defines the
operations that can be done on a file within that filesystem. This new interface allows us to
implement and install new filesystems in much the same way as new device drivers are added to
the kernel.

Design Goals:NFS was designed to simplify the sharing of file system resources in a network of
non -homogeneous machines. Main goal was to make remote files available to local programs
without having to modify, or even relink those programs. In addition,remote file access to be
comparable in speed to local file access.

The overall design goals of NFS were:

1. Machine and Operating System Independence

The protocols used should be independent of UNIX so that an NFS server can supply files to many
different types of clients. The protocols should also be simple enough that they can be
implemented on low-end machines like the PC.
2. Crash Recovery

When clients can mount remote file systems from many different servers it is very important that
clients and servers be able to recover easily from machine crashes and network problems.

3. Transparent Access

We want to provide a system which allows programs to access remote files in exactly the same
way as local files, without special pathname parsing, libraries, or recompiling. Programs should not
need or be able to tell whether a file is remote or local.

4. UNIX Semantics Maintained on UNIX Client

In order for transparent access to work on UNIX machines, UNIX filesystem semantics have to be
maintained for remote files.

5. Reasonable Performance

People will not use a remote filesystem if it is no faster than the existing networking utilities, such
as rcp, even if it is easier to use.Design goal was to make NFS as fast as a small local disk on a
SCSI interface.

Basic Design

The NFS design consists of three major pieces: the protocol, the server side and the client side.

NFS Protocol:

-A protocol is a set of requests sent by clients to servers, along with the corresponding
replies sent by the servers back to the clients.

Ø NFS protocol handles mounting.

Ø NFS method makes it difficult to achieve the exact UNIX file semantics. NFS needs a separate,
additional mechanism to handle locking.
Ø NFS uses the UNIX protection mechanism, with the rwxbits for the owner, group, and others.

Ø All the keys used for the authentication, as well as other information are maintained by the
NIS (Network Information Service). The NIS was formerly known as the yellow pages. Its
function is to store (key, value) pairs. When a key is provided, it returns the corresponding value.

Server Side

Because the NFS server is stateless, when servicing an NFS request it must commit any modified
data to stable storage before returning results. The implication for UNIX based servers is that
requests which modify the filesystem must flush all modified data to disk before returning from the
call. For example, on a write request, not only the data block, but also any modified indirect blocks
and the block containing the inode must be flushed if they have been modified.

Client Side

The Sun implementation of the client side provides an interface to NFS which is transparent to
applications. To make transparent access to remote files work we had to use a method of locating
remote files that does not change the structure of path names. Some UNIX based remote file
access methods use pathnames like host:path or /../host/path to name remote files. This does not
allow real transparent access since existing programs that parse pathnames have to be modified.
______________________________________________________________________________

The Fast Local Internet Protocol (FLIP) is a set of internet


protocols, which provide Security transparency, security and network management. FLIP was
designed to support remote procedure calling in the Amoeba distributed operating system.[1] In
the OSI model, FLIP occupies layer 3, thus replacing IP, but it also avoids the need for a transport-
level protocol like TCP.

FLIP is a connectionless protocol designed to support transparency, group communication, secure


communication and easy network management. The following FLIP properties helps to achieve the
efficiency requirements:

 FLIP identifies entities called network service access points (NSAPs).


 An entity can be a process.
 FLIP uses a one way mapping between the “private” address, used to register an endpoint of a
network connection, and the “public” address used to advertise the endpoint.
 FLIP routes messages based on NSAP.
 FLIP uses a bit in the message header to request transmission of sensitive messages across
trusted networks.
 FLIP identifies entities with a location-independent 64-bit identifier
 FLIP routes messages based on the 64-bit identifier.
 FLIP discovers routes on demand.
Thread management in MACH:
The active entities in Mach are the threads. They execute instructions and manipulate their
registers and address spaces. Each thread belongs to exactly one process. All the threads in
a process share the address space and all the process-wide resources. Threads also have a
private resources per thread. Each thread has its own thread port, which it uses to invoke thread-
specific kernel services.

• C threads call for thread management

Ø Fork-Create a new thread running the same code as the parent thread

Ø Exit-Terminate the calling thread

Ø Join-Suspend the caller until a specified thread exits

Ø Detach-Announce that the thread will never be jointed (waited for)

Ø Yield-Give up the CPU willingly

Ø Self-Return the calling thread's identity to it

Implementation of C thread in MACH (a) All C threads use one kernel thread. (b) Each C
thread has its own kernel thread. (c) Each C thread has its own single-threaded process. (d)
Arbitrary mapping of user threads to kernel threads.

Replication Caching
1. Caching from the data provider's point of 1. Distributed caching as described works
view is known as replication. "from the user's point of view."
2. Replication is the process of propagating 2. Caching is the process of prefetching the
changes from one database to other frequently accessed data and storing it in
database. close to the application.

3. A replication is associated with a server 3. A caching is associated with a client


4. A replication focuses on availability 4. A caching focuses on locality
5. A replica is more persistent than a cache. 5. A cache is less persistent than a replica.
6. A replica is not dependent upon a cache. 6. A cache is dependent upon a replica.
7. Replicas are usually kept up to date by 7. Caches usually pull data from a more
pushing from where data was modified authoritative source.

File Sharing / File Caching


Every read operation on the file sees the effect of all previous write operations performed on
that file.
1. Local memory is used for caching in diskless terminals.
2. As long as client has the token for specified operation, data is valid.
3. A shared file may be simultaneously accessed by multiple users.
4. In such a situation, an important design issue for any file system is to be clearly
defined that modifications of file data made by a user are observable by other users.
5. This is defined by the type of file sharing semantics adopted by a file system.

Semantics of file sharing:


UNIX semantics -1. Every operation on a file is rapidly visible to all processes.
2. Read returns result of last write easily achieved if Only one server & Clients do
not cache data but Performance problems will occur if no cache.
Session semantics- 1. No changes are visible to other processes until the file is closed.
2. Changes to an open file are initially visible only to the process (or machine) that
modified it.
Immutable files -1. No updates are possible, simplifies sharing and replication .
2. It does not help with detecting modification
Transactions -1. All changes have the all-or-nothing property.
2. Each file access is an atomic transaction.

Desirable features of good process migration mechanism


1.Transparency
 object access level - access to objects (such as files and devices) by process can
be done in location -independent manner.
 system call and interprocess communication level - the communicating processes
should not notice if one of the parties is moved to another node, system calls
should be equivalent.
 Location independent
2. Minimal interference (with process execution) - minimize freezing time
 To the progress of process and system
 Freezing time : time period for which the execution of the process is stopped for
transferring its info to destination node
3. Minimal residual dependencies - the migrated process should not depend on the node it
migrated from or:
 previous node is still loaded
 what if the previous node fails?
4. Efficiency:
 minimize time required to migrate a process
 minimize cost relocating the process
 minimize cost of supporting the migrated process after migration
5. Robustness
 Failure of any other node should not affect the accessibility or execution of the
process
6. Communication between coprocesses
 Communication directly possible irrespective of location

Description of all these Address Transfer Mechanisms are there in MM notes…….

You might also like