Professional Documents
Culture Documents
a. Hardware sharing: Printers. plotters and large disks and other peripherals are shared
to reduce costs.
Changes to a file by one client should not interfere with the operation of other clients
simultaneously accessing or changing the same file. This is well-known issue of concurrency
control .The need for concurrency control for accss to shared data in many applications
Is widely accepted and techniques are known for its implementation ,but they are costly .Most
current file services follow morden UNIX standards in providing advisery or mandatoryfile or
record-level locking.
In a file service that supports replication, a file may be represented by several copies of its
contents at different locations. This has two benefits-its enables multiple servers to share the
load of providing a service to clients accessing the same set of files, enhancing the scalability
of the service, and it enhances fault tolerance by enabling clients to locate another server that
holds a
copy of the file when one has failed. Few file services support replication fully, but most
support the catching of files or portions of files locally, a limited form of replication.
The directory services provide a mapping between text names for files and their UFIDs. Client
may obtain the UFIDs of a file by quoting its text name to the directory services. The directory
services provides the function needed to generate directories, to add new file name to directories
and to obtain UFIDs from directories. It is client of the flat file services; its directory is stored
in files of the flat services. When a hierarchic file-naming scheme is adopted as in
UNIX, directories hold references to other directories.
20. what are the timestamps in called caching?
URI-Uniform Resource Identifiers came about from the need to identify resources on the
web, and other internet resources such as electronic mailboxes. An important goal was to
identify resources in a coherent way, so that they could all be processed by common software
such as browser. URIs is ‘uniform’ in that their syntax incorporates that of indefinitely many
individual types of resource identifier(i.e URI schemas),and there are procedures for managing
the global namespace of schemas. The advantage of uniformity is that eases the process of
introducing new types of identifier, as well as using existing types of identifier in new
contexts without disrupting existing usage.
The Global name Service developed at the Digital Equipment corporation systems,
Research
Center,is a descentdant of Grapevine with ambitious goals,
including:
A namespace is the collection of all valid names recognized by a particular service. The service
will attempt to look up a valid name, even though that name may prove not to correspond to
any object. Name space requires a syntactic definition to separate.
24. What is meant by hardware and software clock?
Clock devices can be programmed to generate interrupts at regular intervals in orders
that, for example, time slicing can be implemented.The operating system reads the
node’s hardware clock value, H(t) , scales it and adds an offset so as to produce software
clock C (t)=αHi(t)+β that approximately measures real ,physical time t for process pi.
stable predicates .
32. List the assumption considered in snapshot algorithm
– Neither channels nor processes fail
– Reliable communications ensure every message sent is received exactly once
– Channels are unidirectional
– Messages are received in FIFO order
– There is a path between any two processes
– Any process may initiate a global snapshot at any time
– Processes may continue to function normally during a snapshot
33. Define Failure detector.
A failure detector is a service that processes queries about whether a particular process
has failed .It is often implemented by an object local to each process that runs failure
detection algorithms in conjunction with its counterparts at the other processes.
34. List the properties of failure detector
A failure detector is not necessarily accurate. Most fails into the category of
unreliable failure detectors.
A result of unsuspected
A result of Suspected
Q.2. How will you ensure the consistency of a cut in state recording of the various process?
Explain.
Q.3. Explain the concept of concurrency of components, Lack of global clock with suitable
example.
Q.9. Is there any difference between RPC and RMI? If yes, Differentiate Remote procedure call
and remote method invocation.
Q.12. What is the difference between message passing and shared variable synchronization?
Q.17.What are the issues in concurrency control in a distributed file system? Explain.
Q.22. Write case study on CORMA RMI. Explain with its proper architecture.
Concurrency
Multi-programming
Multi-processing
Scalability
How the system handles growth Small system –two computers and a file server on a single
network Large system current Internet Scalability
- software should not change to support growth
- research area - for large, high-performance networks
Avoid centralization to support scalability
Choose your naming or numbering scheme carefully
Handle timing problems with caching and data replication
Fault Tolerance
Transparency
transparency of
access
location
concurrency
replication
failure
migration
performance
scaling
1. Resource sharing
2. Openess
3. Concurrency
4. Scalability
5. Fault tolerance
6. Transparency
High performance
Reliability
Scalability
Consistency
Security
naming
communications
software structure
workload allocation
consistency maintenance
Naming
communication identifier
name service
contextual resolution of name
name mapping
pure names vs names with meaning
Communication
Q.3. Explain the concept of concurrency of components, Lack of global clock with suitable
example.
Examples
Examples of distributed systems and applications of distributed computing include the following :
Telecommunication networks:
Telephone networks and cellular networks
Design Considerations
Transparency
Transparency or single-system image refers to the ability of an application to treat the system on
which it operates without regard to whether it is distributed and without regard to hardware or
other implementation details. Many areas of a system can benefit from transparency, including
access, location, performance, naming, and migration. The consideration of transparency directly
affects decision making in every aspect of design of a distributed operating system. Transparency
can impose certain requirements and/or restrictions on other design considerations.
Systems can optionally violate transparency to varying degrees to meet specific application
requirements. For example, a distributed operating system may present a hard driv e on one
computer as "C:" and a drive on another computer as "G:". The user does not require any
knowledge of device drivers or the drive's location; both devices work the same way, from the
application's perspective. A less transparent interface might require the application to know
which computer hosts the drive. Transparency domains:
User mobility requires the consistent referencing of system entities, regardless of the system
location from which the reference originates. [8]:20
Access transparency—Local and remote system entities must remain indistinguishable when
viewed through the user interface. The distributed operating system maintains this perception
through the exposure of a single access mechanism for a system entity, regardless of that
entity being local or remote to the user. Transparency dictates that any differences in
methods of accessing any particular system entity—either local or remote—must be both
invisible to, and undetectable by the user. [3]:84
Revision transparency—The system is responsible for upgrades and revisions and changes to
system infrastructure without user knowledge or action.
Control transparency—The system is responsible for providing all system information,
constants, properties, configuration settings, etc. in a consistent appearance, connotation, and
denotation to all users and applications. [3]:84
Inter-process communication
Process management
Process management provides policies and mechanisms for effective and efficient sharing of
resources between distributed processes. These policies and mechanisms support operations
involving the allocation and de-allocation of processes and ports to processors, as well as
mechanisms to run, suspend, migrate, halt, or resume process execution. While these resources
and operations can be either local or remote with respect to each other, the distributed OS
maintains state and synchronization over all processes in the system.
Resource management
Systems resources such as memory, files, devices, etc. are distributed throughout a system, and
at any given moment, any of these nodes may have light to idle workloads. Load sharing and
load balancing require many policy-oriented decisions, ranging from finding idle CPUs, when to
move, and which to move. Many algorithms exist to aid in these decisions; however, this calls
for a second level of decision making policy in choosing the algorithm best suited for the
scenario, and the conditions surrounding the scenario.
Reliability
Distributed OS can provide the necessary resources and services to achieve high levels
of reliability, or the ability to prevent and/or recover from errors. Faults are physical or logical
defects that can cause errors in the system. For a system to be reliable, it must somehow
overcome the adverse effects of faults.
The primary methods for dealing with faults include fault avoidance, fault tolerance, and fault
detection and recovery. Fault avoidance covers proactive measures taken to minimize the
occurrence of faults. These proactive measures can be in the form
of transactions, replication and backups. Fault tolerance is the ability of a system to continue
operation in the presence of a fault. In the event, the system should detect and recover full
functionality. In any event, any actions taken should make every effort to preserve the single
system image.
Availability
Availability is the fraction of time during which the system can respond to requests.
Performance
Many benchmark metrics quantify performance; throughput, response time, job completions per
unit time, system utilization, etc. With respect to a distributed OS, performance most often
distills to a balance between process parallelismand IPC. Managing the task granularity
of parallelism in a sensible relation to the messages required for support is extremely
effective.[citation needed] Also, identifying when it is more beneficial to migrate a process to its data,
rather than copy the data, is effective as well
Synchronization
Cooperating concurrent processes have an inherent need for synchronization, which ensures that
changes happen in a correct and predictable fashion. Three basic situations that define the scope
of this need:
one or more processes must synchronize at a given point for one or more other
processes to continue,
one or more processes must wait for an asynchronous condition in order to continue,
or a process must establish exclusive access to a shared resource.
Improper synchronization can lead to multiple failure modes including loss of atomicity,
consistency, isolation and durability,deadlock, livelock and loss of serializability.[citation needed]
Flexibility
time is the local information about global time. A special protocol is used to update logical local
time after each local event, and logical global time when processes exchange data. [1]
Logical clocks are useful in computation analysis, distributed algorithm design, individual event
tracking, exploring computational progress.
the processes." Thus two timestamps or counters may be the same within a distributed
system, but in applying the logical clocks algorithm events that occur will always maintain at
least a strict partial ordering.
Language Constructs for Distributed Real-Time Programming Abstract For many distributed
applications, it is not sufficient for programs to be logically correct. In addition, they must satisfy
various timing constraints. This paper discusses primitives that support the construction of
distributed real-time programs. O ur discussion is focused in two areas: timing specification and
communication. To allow the specifications of timing constraints, we introduce the language
constructs for defining temporal scope and specifying message deadline. We also identify
communication primitives needed for real-time programming. The issues underlying the
selection of the primitives are explained, including handling of timing exceptions. The primitives
will eventually be provided as part of a distributed programming system that will be used to
construct distributed multi-sensory systems.
For many computer applications, such as robot arm control, missile control, on -line process
control, etc., it is not sufficient for programs to be logically correct. In addition to being logically
correct, the programs must satisfy certain timing constraints determined by the underlying
physical process being controlled to avoid possible catastrophic results. Programs whos e
correctness depends on the adherence of timiig . constraints are called real -time programs.
Furthermore, it has been recognized that for certain real-time. applications, such as multi-sensory
robot systems [12], it is natural to diitribute control among several connected processors. This
distributed view of the underlying system allows real-time programs to be implemented as
relatively independent processse which run mynchronously except for occasional
synchronization and communication. We call such concurrent programs which are required to
respond to external and internal stimuli within a specified deadline distributed real -time
programs.
Q.8.Where do you need RPC? Explain the process with an example.
Remote Procedure Call (RPC) is a protocol that one program can use to request a service from a
program located in another computer in a network without having to understand network details.
(A procedure call is also sometimes known as a function call or a subroutine call.) RPC uses the
client/server model.
RPC makes the client/server model of computing more powerful and easier to program. When
combined with the ONC RPCGEN protocol compiler (Chapter 33) clients transparently make
remote calls through a local procedure interface.
An RPC is analogous to a function call. Like a function call, when an RPC is made, the calling
arguments are passed to the remote procedure and the caller waits for a response to be returned
from the remote procedure. Figure 32.1 shows the flow of activity that takes place during an
RPC call between two networked systems. The client makes a procedure call that sends a request
to the server and waits. The thread is blocked from processing until either a reply is received, or
it times out. When the request arrives, the server calls a dispatch routine that performs the
requested service, and sends the reply to the client. After the RPC call is completed, the client
program continues. RPC specifically supports network applications.
Consider an example:
A client/server lookup in a personal database on a remote machine. Assuming that we cannot
access the database from the local machine (via NFS).
We use UNIX to run a remote shell and execute the command this way. There are some
problems with this method:
Q.9. Is there any difference between RPC and RMI? If yes, Differentiate Remote
procedure call and remote method invocation.
The only real difference between RPC and RMI is that there is objects involved in RMI:
instead of invoking functions through a proxy function, we invoke methods through a proxy. The
difference between RMI and RPC is that: RMI as the name indicates Remote Method
Invoking: it invokes a method or an object.
RPC is C based, and as such it has structured programming semantics, on the other side, RMI is
a Java based technology and it's object oriented.
With RPC you can just call remote functions exported into a server, in RMI you can have
references to remote objects and invoke their methods, and also pass and return more remote
object references that can be distributed among many JVM instances, so it's much more
powerful.
RMI stands out when the need to develop something more complex than a pure client -server
architecture arises. It's very easy to spread out objects over a network enabling all the clients to
communicate without having to stablish individual connections explicitly
The main difference between RPC and RMI is that RMI involves objects. Instead of calling
procedures remotely by use of a proxy function, we instead use a proxy object.
There is greater transparency with RMI, namely due the exploitation of objects, references,
inheritance, polymorphism, and exceptions as the technology is integrated into the language.
RMI is also more advanced than RPC, allowing for dynamic invocation, where interfaces can to
change at runtime, and object adaption, providing an additional layer of abstraction.
INTRODUCTION
Remote method invocation allows applications to call object methods located remotely, sharing
resources and processing load across systems. Unlike other systems for remote execution which
require that only simple data types or defined structures be passed to and from methods, RMI
allows any Java object type to be used - even if the client or server has never encountered it
before. RMI allows both client and server to dynamically load new object types as required.
THREE STEPS
If we want to build a distributed system based on Java RMI we have to follow three steps:
1.Defining the remote interfaces: A remote interface specifies the methods that can be invoked
remotely by a client. Clients program to remote interfaces, not to the implementation classes of
those interfaces. The design of such interfaces includes the determination of the types of object s
that will be used as the parameters and return values for these methods. If any of these interfaces
or classes do not yet exist, you need to define them as well.
2.Implementing the remote objects: Remote objects must implement one or more remote
interfaces. The remote object class may include implementations of other interfaces and methods
that are available only locally. If any local classes are to be used for parameters or return values
of any of these methods, they must be implemented as well.
3.Implementing the clients: Clients that use remote objects can be implemented at any time
after the remote interfaces are defined, including after the remote objects have been deployed.
1 - REMOTE INTERFACE
An object becomes remote by implementing a remote interface so, before anything else, we have
to implement a remote interface like this: RemoteReservation.java
2 - REMOTE OBJECTS
This object is the server implementation and it contains remote methods implementations and a
"particulary" main. In the main server take locale RMI registry reference, that offers "yellow
pages service", and bind on it our new service ("ReservationService").
Client have to set the Java SecurityManager and connect to the server using Naming.lookup( ...)
method. N.B. Client MUST know: address server, server RMI registry port and service name (in
our case it is "ReservationService")
Now we have ALMOST all the components required to offer our new service. Finally we need
stub! It acts as a gateway for client side objects and all outgoing requests to server side objects
that are routed through it. The stub wraps client object functionality and by adding the network
logic ensures the reliable communication channel between client and server.
Open a shell in the server package root folder and type " rmic -d
unibo/sisdist1011/rmi/reservation/ unibo.sisdist1011.rmi.reservation.RemoteReservationImpl ".
This command create stub starting from server class. Obviously it considers the remote interface.
N.B. Create a security file in server and client folder in which we describe Java security policy
for this program. Because this is a simple case study we allow anything and set "AllPermission"
variable.
The client–server model of computing is a distributed application structure that partitions tasks
or workloads between the providers of a resource or service, called servers, and service
requesters, called clients.[1] Often clients and servers communicate over a computer network on
separate hardware, but both client and server may reside in the same system. A server host runs
one or more server programs which share their resources with clients. A client does not share any
of its resources, but requests a server's content or service function. Clients therefore initiate
communication sessions with servers which await incoming requests.
Examples of computer applications that use the client–server model are Email, network printing,
and the World Wide Web.
Client and server communication
In general, a service is an abstraction of computer resources and a client does not have to be
concerned with how the server performs while fulfilling the request and delivering the response.
The client only has to understand the response based on the well-known application protocol, i.e.
the content and the formatting of the data for the requested service.
Clients and servers exchange messages in a request-response messaging pattern: The client sends
a request, and the server returns a response. This exchange of messages is an example of inter-
process communication. To communicate, the computers must have a common language, and
they must follow rules so that both the client and the server know what to expect. The language
and rules of communication are defined in a communications protocol. All client-server
protocols operate in the application layer. The application-layer protocol defines the basic
patterns of the dialogue. To formalize the data exchange even further, the server may implement
an API (such as a web service).[3] The API is an abstraction layer for such resources as databases
and custom software. By restricting communication to a specific content format, it facilitates
parsing. By abstracting access, it facilitates cross-platform data exchange. [4]
A server may receive requests from many different clients in a very short period of time.
Because the computer can perform a limited number of tasks at any moment, it relies on a
scheduling system to prioritize incoming requests from clients in order to accommodate them all
in turn. To prevent abuse and maximize uptime, the server's software limits how a client can use
the server's resources. Even so, a server is not immune from abuse. A denial of service attack
exploits a server's obligation to process requests by bombarding it with requests incessantly. This
inhibits the server's ability to respond to legitimate requests.
Example
When a bank customer accesses online banking services with a web browser (the client), the
client initiates a request to the bank's web server. The customer's login credentials may be stored
in a database, and the web server accesses the database server as a client. An application server
interprets the returned data by applying the bank's business logic, and provides the output to the
web server. Finally, the web server returns the result to the client web browser for display.
In each step of this sequence of client–server message exchanges, a computer processes a request
and returns data. This is the request-response messaging pattern. When all the requests are met,
the sequence is complete and the web browser presents the data to the customer.
This example illustrates a design pattern applicable to the client–server model: separation of
concerns.
Q.12. What is the difference between message passing and shared variable
synchronization?
In computer science, message passing sends a message to a process (which may be an actor or
object) and relies on the process and the supporting infrastructure to select and invoke the actual
code to run. Message passing differs from conventional programming where a process,
subroutine, or function is directly invoked by name. Message passing is key to some models of
concurrency and object-oriented programming.
Message passing is used ubiquitously in modern computer software. It is used as a way for the
objects that make up a program to work with each other and as a way for objects and systems
running on different computers (e.g., the Internet) to interact. Message passing may be
implemented by various mechanisms, including channels.
Interactive processes spend more time waiting for I/O and generally experience short CPU
bursts. A text editor is an example of an interactive process with short CPU bursts.
Interactive bursts
Compute-intensive processes, conversely, spend more time running instructions and less time on
I/O. They exhibit long CPU bursts. A video transcoder is an example of a process with long CPU
bursts. Even though it reads and writes data, it spends most of its time processing that data.
Compute bursts
Most interactive processes, in fact, spend the vast bulk of their existence doing nothing but
waiting on data. As I write this on my Mac, I have 44 processes running just under my user
account. This includes a few browser windows, a word processor, spreadsheet, several shell
windows, Photoshop, iTunes, and various monitors and utilities. Most of the time, all these
processes collectively are using less than 3% of the CPU. This is not surprising since most of
these programs are waiting for user input, a network message, or sleeping and waking up
periodically to check some state.
Consider a 2.4 GHz processor. It executes approximately 2,400 million instructions per second
(and this does not even count multi-core or hyper threaded processors). It can run 24 billion
instructions in the ten seconds it might take you to skim a web page before you click on a link —
or 1.2 billion instructions in the half second it might take you to hit the next key as you’re typing.
The big idea in increasing overall system throughput was the realization that we could keep
several programs in memory and switch the processor to run another process when a process has
to wait on an I/O operation. This is multiprogramming. The next big idea was realizing that you
could preempt a process and let another process run and do this quickly enough to give the
illusion that many processes are running at the same time. This is multitasking.
Distributed File System (DFS) is a set of client and server services that allow an organization
using Microsoft Windows servers to organize many distributed SMB file shares into a
distributed file system.
Distributed File System (DFS) is a set of client and server services that allow an organization
using Microsoft Windows servers to organize many distributed SMB file shares into a distributed
file system. DFS provides location transparency and redundancy to improve data availability in
the face of failure or heavy load by allowing shares in multiple different locations to be logically
grouped under one folder, or DFS root.
Microsoft's DFS is referred to interchangeably as 'DFS' and 'Dfs' by Microsoft and is unrelated to
the DCE Distributed File System, which held the 'DFS' trademark [1] but was discontinued in
2005.
It is also called "MS-DFS" or "MSDFS" in some contexts, e.g. in the Samba user space project.
There is no requirement to use the two components of DFS together; it is perfectly possible to
use the logical namespace component without using DFS file replication, and it is perfectly
possible to use file replication between servers without combining them into one namespace.
A DFS root can only exist on a server version of Windows (from Windows NT 4.0 and up) and
OpenSolaris[2] (in kernel space) or a computer running Samba (in user space.) The Enterprise and
Datacenter Editions of Windows Server can host multiple DFS roots on the same server.
OpenSolaris intends on supporting multiple DFS roots in "a future project based on Active
Directory (AD) domain-based DFS namespaces". [3]
and thus does not use Active Directory. A Standalone DFS can only be accessed on the
computer on which it is created. It does not offer any fault tolerance and cannot be linked
to any other DFS. This is the only option available on Windows NT 4.0 Server systems.
Standalone DFS roots are rarely encountered because of their limited utility.
Domain-based DFS namespace stores the DFS configuration within Active Directory.
These operating systems are generally preemptive and have deterministic guarantees with regard
to response times. Rate monotonic analysis is used in conjunction with those systems to provide
scheduling guarantees for a particular application.
A simple version of rate-monotonic analysis assumes that threads have the following properties:
No resource sharing (processes do not share resources, e.g. a hardware resource, a queue,
or any kind of semaphore blocking or non-blocking (busy-waits))
Deterministic deadlines are exactly equal to periods
Static priorities (the task with the highest static priority that is runnable immediately
preempts all other tasks)
Static priorities assigned according to the rate monotonic conventions (tasks with shorter
periods/deadlines are given higher priorities)
Context switch times and other thread operations are free and have no impact on the
model
Q.16. What are the basic applications of distributed process implementation?
A distributed operating system is a software over a collection of
independent, networked, communicating, and physically separate computational nodes. [1] Each
individual node holds a specific software subset of the global aggregate operating system. Each
subset is a composite of two distinct service provisioners. [2] The first is a ubiquitous
minimal kernel, ormicrokernel, that directly controls that node’s hardware. Second is a higher-
level collection of system management components that coordinate the node's individual and
collaborative activities. These components abstract microkernel functions and support user
applications.[3]
The microkernel and the mana gement components collection work together. They support the
system’s goal of integrating multiple resources and processing functionality int o an efficient and
stable system. [4] This seamless integration of individual nodes into a global system is referred to
as transparency, or single system
m image; describing the illusion provided to users of the global
system’s appearance as a single computational entity.
Q.17.What are the issues in concurrency control in a distributed file system? Explain.
Concurrency
Concurrency control becomes an issue when more than one person or client is accessing the
same file or block and want to update it. Hence updates to the file from one client should not
interfere with access and updates from other clients. This problem is more complex with file
systems due to concurrent overlapping writes, where different writers write to overlapping
regions of the file concurrently. [4] This problem is usually handled by concurrency control or
locking which may either be built into the file system or provided by an add-on protocol.
Types of Consistency
Strict Consistency Model: "The strict consistency model is the strongest form of
memory coherence, having the most stringent consistency requirements. A
shared-memory system is said to support the strict consistency model if the value
returned by a read operation on a memory address is always the same as the value
written by the most recent write operation to that address, irrespective of the
locations of the processes performing the read and write operations. That is, all
writes instantaneously become visible to all processes."
Casual Consistency Model: "The causal consistency model ... relaxes the
requirement of the sequential model for better concurrency. Unlike the sequential
consistency model, in the causal consistency model, all processes see only those
memory reference operations in the same (correct) order that are potentially
causally related. Memory reference operations that are not potentially causally
related may be seen by different processes in different orders."
FIFO Consistency Model: For FIFO consistency, "Writes done by a single
process are seen by all other processes in the order in which they were issued, but
writes from different processes may be seen in a different order by different
processes.
"FIFO consistency is called PRAM consistency in the case of distributed shared
memory systems."
Entry Consistency Model: "Like ... variants of release consistency, it requires the
programmer (or compiler) to use acquire and release at the start and end of each
critical section, respectively. However, unlike release consistency, entry
consistency requires each ordinary shared data item to be associated with some
synchronization variable, such as a lock or barrier. If it is desired that elements of
an array be accessed independently in parallel, then different array elements must
be associated with different locks. When an acquire is done on a synchronization
variable, only those data guarded by that synchronization variable are made
consistent."
General Consistency Model: "A system supports general consistency if all the
copies of a memory location eventually contain the same data when all the writes
issued by every processor have completed."
Crash failures: Crash failures are caused across the server of a typical distributed system and if
these failures are occurred operations of the server are halt for some time. Operating system
failures are the best examples for this case and the corresponding fault tolerant systems are
developed with respect to these affects.
Timing failures: Timing failures are caused across the server of a distributed system. The usual
behavior of these timing failures would be like that the server response time towards the client
requests would be more than the expected range. Control flow out of the responses may be
caused due to these timing failures and the corresponding clients may give up as they can’t wait
for the required response from the server and thus the server operations are failed due to this.
Omission failures: Omission failures are caused across the server due to lack or reply or
response from the server across the distributed systems. There are different issues raised due to
these omission failures and the key among them are server not listening or a typical buffer
overflow errors across the servers of the distributed systems.
Byzantine failures: Byzantine failures are also know as arbitrary failures and these failures are
caused across the server of the distributed systems. These failures cause the server to behave
arbitrary in nature and the server responds in an arbitrary passion at arbitrary times across the
distributed systems. Output from the server would be inappropriate and there could be chances of
the malicious events and duplicate messages from the server side and the clients get arbitrary and
unwanted duplicate updates from the server due to these failures.
Reasons:
Based on Distance between clients and locations as starting point. (latency , bandwidth)
By applying Clustering
Group nodes accessing the same content and with low inter-nodal latencies into
groups or clusters and place a replica on the k largest clusters.
Permanent Replicas
Byzantine fault tolerant protocols are algorithms that are robust to arbitrary types of failures in
distributed algorithms. With the advent and popularity of the Internet, there is a need to develop
algorithms that do not require any centralized control that have some guarantee of always
working correctly. The Byzantine agreement protocol is an essential part of this task. In this
article the quantum version of the Byzantine protocol, [1] which works in constant time is
described.
The Byzantine Agreement protocol is a protocol in distributed computing. It takes its name from
a problem formulated by Lamport, Shostak and Pease in 1982, [2] which itself is a reference to a
historical problem. The Byzantine army was divided into divisions with each division being led
by a General with the following properties:
(See [3] for the proof of the impossibility result). The problem usually is equivalently restated in
the form of a commanding General and loyal Lieutenants with the General being either loyal or a
traitor and the same for the Lieutenants with the following properties.
A strictly less than fraction including the commanding General are traitors.
Q.22. Write case study on CORMA RMI. Explain with its proper architecture.
The Java Remote Method Invocation (RMI) mechanism and the Common Object Request Broker
Architecture (CORBA) are the two most important and widely used distributed object systems.
Each system has its own features and shortcomings. Both are being used in th e industry for
various applications ranging from e-commerce to health care. Selecting which of these two
distribution mechanisms to use for a project is a tough task. This article presents an overview of
RMI and CORBA, and more importantly it shows how to develop a useful application for
downloading files from remote hosts. It then:
The client/server model is a form of distributed computing in which one program (the client)
communicates with another program (the server) for the purpose of exchanging information. In
this model, both the client and server usually speak the same language -- a protocol that both the
client and server understand -- so they are able to communicate.
While the client/server model can be implemented in various ways, it is typically done using
low-level sockets. Using sockets to develop client/server systems means that we must design a
protocol, which is a set of commands agreed upon by the client and server through w hich they
will be able to communicate. As an example, consider the HTTP protocol that provides a method
called GET, which must be implemented by all web servers and used by web clients (browsers)
in order to retrieve documents.
A distributed object-based system is a collection of objects that isolates the requesters of services
(clients) from the providers of services (servers) by a well-defined encapsulating interface. In
other words, clients are isolated from the implementation of services as data representations and
executable code. This is one of the main differences that distinguishes the distributed object -
based model from the pure client/server model.
In the distributed object-based model, a client sends a message to an object, which in turns
interprets the message to decide what service to perform. This service, or method, selection
could be performed by either the object or a broker. The Java Remote Method Invocation (RMI)
and the Common Object Request Broker Architecture (CORBA) are examples of this model.
RMI
RMI is a distributed object system that enables you to easily develop distributed Java
applications. Developing distributed applications in RMI is simpler than developing with sockets
since there is no need to design a protocol, which is an error-prone task. In RMI, the developer
has the illusion of calling a local method from a local class file, when in fact the arguments are
shipped to the remote target and interpreted, and the results are sent back to the callers .
This application allows a client to transfer (or download) any type of file (plain text or binary)
from a remote machine. The first step is to define a remote interface that specifies the signatures
of the methods to be provided by the server and invoked by clients.
The remote interface for the file download application is shown in Code Sample 1. The interface
FileInterface provides one method downloadFile that takes a String argument (the name of the
file) and returns the data of the file as an array of bytes.
CORBA
The Common Object Request Broker Architecture (or CORBA) is an industry standard
developed by the Object Management Group (OMG) to aid in distributed objects programming.
It is important to note that CORBA is simply a specification. A CORBA implementation is
known as an ORB (or Object Request Broker). There are several CORBA implementations
available on the market such as VisiBroker, ORBIX, and others. JavaIDL is another
implementation that comes as a core package with the JDK1.3 or above.
CORBA was designed to be platform and language independent. Therefore, CORBA objects can
run on any platform, located anywhere on the network, and can be written in any language that
has Interface Definition Language (IDL) mappings.
Similar to RMI, CORBA objects are specified with interfaces. Interfaces in CORBA, however,
are specified in IDL. While IDL is similar to C++, it is important to note that IDL is not a
programming language. For a detailed introduction to CORBA, please see Distributed
Programming with Java: Chapter 11 (Overview of CORBA).
There are a number of steps involved in developing CORBA applications. These are:
We now explain each step by walking you through the development of a CORBA -based file
transfer application, which is similar to the RMI application we developed earlier in this article.
Here we will be using the JavaIDL, which is a core package of JDK1.3+.
When defining a CORBA interface, think about the type of operations that the server will
support. In the file transfer application, the client will invoke a method to download a file. Code
Sample 5 shows the interface for FileInterface. Data is a new type introduced using the typedef
keyword. A sequence in IDL is similar to an array except that a sequence does not have a fixed
size. An octet is an 8-bit quantity that is equivalent to the Java type byte.
Note that the download File method takes one parameter of type string that is declared in. IDL
defines three parameter-passing modes: in (for input from client to server), out (for output from
server to client), and in out (used for both input and output).
The Network File System (NFS) is a client/server application that lets a computer user view and
optionally store and update file on a remote computer as though they were on the user's own
computer. The user's system needs to have an NFS client and the other computer needs the NFS
server. Both of them require that you also have TCP/IP installed since the NFS server and client
use TCP/IP as the program that sends the files and updates back and forth. (However, the User
Datagram Protocol, UDP, which comes with TCP/IP, is used instead of TCP with earlier
versions of NFS.)
The Andrew File System (AFS)[1] is a distributed file system which uses a set of trusted servers
to present a homogeneous, location-transparent file name space to all the client workstations. It
was developed by Carnegie Mellon University as part of the Andrew Project.[2] It is named after
Andrew Carnegie and Andrew Mellon. Its primary use is in distributed computing.
Features
AFS[3] has several benefits over traditional networked file systems, particularly in the areas of
security and scalability. It is not uncommon for enterprise AFS deployments to exceed 25,000
clients.[4] AFS uses Kerberos for authentication, and implements access control lists on
directories for users and groups. Each client caches files on the local filesystem for increased
speed on subsequent requests for the same file. This also allows limited filesystem access in the
event of a server crash or a network outage.
AFS uses the Weak Consistency model. [5] Read and write operations on an open file are directed
only to the locally cached copy. When a modified file is closed, the changed portions are copied
back to the file server. Cache consistency is maintained by callback mechanism. When a file is
cached, the server makes a note of this and promises to inform the client if the file is updated by
someone else. Callbacks are discarded and must be re-established after any client, server, or
network failure, including a time-out. Re-establishing a callback involves a status check and does
not require re-reading the file itself.
A consequence of the file locking strategy is that AFS does not support large shared databases or
record updating within files shared between client systems. This was a deliberate design decision
based on the perceived needs of the university computing environment. It leads, for example, to
the use of a single file per message in the original email system for the Andrew Project, the
Andrew Message System, rather than a single file per mailbox (i.e. maildir instead of mbox). See
AFS and buffered I/O Problems for handling shared databases
A significant feature of AFS is the volume, a tree of files, sub-directories and AFS mountpoints
(links to other AFS volumes). Volumes are created by administrators and linked at a specific
named path in an AFS cell. Once created, users of the filesystem may create directories and files
as usual without concern for the physical location of the volume. A volume may have a quota
assigned to it in order to limit the amount of space consumed. As needed, AFS administrators
can move that volume to another server and disk location without the need to notify users; indeed
the operation can occur while files in that volume are being used.
AFS volumes can be replicated to read-only cloned copies. When accessing files in a read-only
volume, a client system will retrieve data from a particular read-only copy. If at some point that
copy becomes unavailable, clients will look for any of the remaining copies. Again, users of that
data are unaware of the location of the read-only copy; administrators can create and relocate
such copies as needed. The AFS command suite guarantees that all read-only volumes contain
exact copies of the original read-write volume at the time the read-only copy was created.
The file name space on an Andrew workstation is partitioned into a shared and local name space.
The shared name space (usually mounted as /afs on the Unix filesystem) is identical on all
workstations. The local name space is unique to each workstation. It only contains temporary
files needed for workstation initialization and symbolic links to files in the shared name space.
The Andrew File System heavily influenced Version 4 of Sun Microsystems' popular Network
File System (NFS). Additionally, a variant of AFS, the Distributed File System (DFS) was
adopted by the Open Software Foundation in 1989 as part of their Distributed Computing
Environment.
Implementations
There are three major implementations, Transarc (IBM), OpenAFS and Arla, although the
Transarc software is losing support and is deprecated. AFS (version two) is also the predecessor
of the Coda file system.
A fourth implementation exists in the Linux kernel source code since at least version 2.6.10. [6]
Committed by Red Hat, this is a fairly simple implementation still in its early stages of
development and therefore incomplete as of January 2013. [7]
Available permissions
Lookup (l)
allows a user to list the contents of the AFS directory, examine the ACL associated with
the directory and access subdirectories.
Insert (i)
allows a user to add new files or subdirectories to the directory.
Delete (d)
allows a user to remove files and subdirectories from the directory.
Administer (a)
allows a user to change the ACL for the directory. Users always have this right on their
home directory, even if they accidentally remove themselves from the ACL.
Read (r)
allows a user to look at the contents of files in a directory and list files in subdirectories.
Files that are to be granted read access to any user, including the owner, need to have the
standard UNIX "owner read" permission set.
Write (w)
allows a user to modify files in a directory. Files that are to be granted write access to any
user, including the owner, need to have the standard UNIX "owner write" permission set.
Lock (k)
allows the processor to run programs that need to "flock" files in the directory.
Additionally, AFS includes Application ACLs (A)-(H) which have no effect on access to files
Microsoft Windows OS use two major file systems: FAT, inherited from old DOS with its later
extension FAT32, and widely-used NTFS file systems. Recently released ReFS file system was
developed by Microsoft as a new generation file system for Windows 8 Servers.
Block allocation table contains an array of block descriptors. Zero value indicates that the block
is not used and non-zero – reference to the next block of the file or special value for file end.
The number in FAT12, FAT16, FAT32 stands for the number if bits used to enumerate file
system block. This means that FAT12 may use up to 4096 different block references, FAT16 -
65536 and FAT32 - 4294967296. Actual maximum count of blocks is even less and depends on
implementation of file system driver.
FAT12 was used for old floppy disks. FAT16 (or simply FAT) and FAT32 are widely used for
flash memory cards and USB flash sticks. It is supported by mobile phones, digital cameras
and other portable devices.
FAT or FAT32 is a file system, used on Windows-compatible external storages or disk partitions
with size below 2GB (for FAT) or 32GB (for FAT32). Windows can not create FAT32 file
system over 32GB (however Linux supports FAT32 up to 2TB).
We consider the randomized consensus protocol of Aspnes and Herlihy for achieving agreement
among N asynchronous processes that communicate via read/write shared registers. The
algorithm guarantees termination in the presence of stopping failures within polynomial expected
time. Processes proceed through possibly unboundedly many rounds; at each round, they read the
status of all other processes and attempt to agree. Each attempt involves a distributed random
walk: when processes disagree, a shared coin-flipping protocol is used to decide their next
preferred value. Achieving polynomial expected time depends on the probability that all
processes draw the same value being above an appropriate bound. For the non-probabilistic part
of the algorithm, we use the proof assistant Cadence SMV to prove validity and agreement for
all N and for all rounds. The coin-flipping protocol is verified using the probabilistic model
checker PRISM. For a finite number of processes (up to 10) we automatically calculate the
minimum probability of the processes drawing the same value. The correctness of the full
protocol follows from the separately proved properties. This is the first time a complex
randomized distributed algorithm has been mechanically verified.
1. Explain in detail about the architectural model of distributed system.
The architecture of a system is its structure in terms of separately specified
components and their interrelationships. The overall goal is to ensure that the
structure will meet present and likely future demands on it.
Examples of architecture models are:
Client – server model
Peer to peer model
Proxy server model
Architectural elements:
Communicating entities: The first two questions above are absolutely
central to an understanding of distributed systems; what is communicating
and how those entities communicate together define a rich design space for
the distributed systems developer to consider. It is helpful to address the
first question from a system-oriented and a problem-oriented perspective.
Communication paradigms: We now turn our attention to how entities
communicate in a distributed system, and consider three types of
communication paradigm:
interprocess communication;
remote invocation;
indirect communication.
Architectural patterns
Layering • The concept of layering is a familiar one and is closely related
to abstraction. In a layered approach, a complex system is partitioned into
a number of layers, with a given layer making use of the services offered
by the layer below.