Вы находитесь на странице: 1из 13

Distributed Systems:

Explain inter process communication?


Inter-process communication (IPC) is a mechanism that allows the exchange of data between
processes. By providing a user with a set of programming interfaces, IPC helps a programmer
organize the activities among different processes. IPC allows one application to control another
application, thereby enabling data sharing without interference.
IPC enables data communication by allowing processes to use segments, semaphores, and
other methods to share memory and information. IPC facilitates efficient message transfer
between processes. The idea of IPC is based on Task Control Architecture (TCA). It is a flexible
technique that can send and receive variable length arrays, data structures, and lists. It has the
capability of using publish/subscribe and client/server data-transfer paradigms while supporting a
wide range of operating systems and languages.

Explain characterization of Distributed systems?


Distributed system is a collection of independent computers that appears to its users as a single
coherent system.

Examples of distributed systems.

Internet

Intranets

Mobile networks

The Internet

The Internet is a vast interconnected collection of computer networks of many


different types.

Multimedia services are available in the Internet enabling users to access audio
and video data including music, radio, TV channels, phone, and video
conferencing.

Intranet

An intranet is a portion of the Internet that is separately administered and has a


boundary that can be configured to enforce local security policies

Mobile networks
Technological advances in device miniatorization and wireless
networking have led increasingly to the integration of small and
portable computing devices into distributed systems.
These devices include:
Laptop computers

Explain operating system architecture?

Ses provide environments in which programs run, and services for the users of the
system, including:
User Interfaces - Means by which users can issue commands to the system.
Depending on the system these may be a command-line interface ( e.g. sh,
csh, ksh, tcsh, etc. ), a GUI interface ( e.g. Windows, X-Windows, KDE,
Gnome, etc. ), or a batch command systems. The latter are generally older
systems using punch cards of job-control language, JCL, but may still be
used today for specialty systems designed for a single purpose.
Program Execution - The OS must be able to load a program into RAM,
run the program, and terminate the program, either normally or abnormally.
I/O Operations - The OS is responsible for transferring data to and from
I/O devices, including keyboards, terminals, printers, and storage devices.
File-System Manipulation - In addition to raw data storage, the OS is also
responsible for maintaining directory and subdirectory structures, mapping
file names to specific blocks of data storage, and providing tools for
navigating and utilizing the file system.
Communications - Inter-process communications, IPC, either between
processes running on the same processor, or between processes running on
separate processors or separate machines. May be implemented as either
shared memory or message passing, ( or some systems may offer both. )

Error Detection - Both hardware and software errors must be detected and
handled appropriately, with a minimum of harmful repercussions. Some
systems may include complex error avoidance or recovery systems,
including backups, RAID drives, and other redundant systems. Debugging
and diagnostic tools aid users and administrators in tracing down the cause
of problems.
Other systems aid in the efficient operation of the OS itself:
Resource Allocation - E.g. CPU cycles, main memory, storage space, and
peripheral devices. Some resources are managed with generic systems and
others with very carefully designed and specially tuned systems, customized
for a particular resource and operating environment.
Accounting - Keeping track of system activity and resource usage, either
for billing purposes or for statistical record keeping that can be used to
optimize future performance.
Protection and Security - Preventing harm to the system and to resources,
either through wayward internal processes or malicious outsiders.
Authentication, ownership, and restricted access are obvious parts of this
system. Highly secure systems may log all process activity down to
excruciating detail, and security regulation dictate the storage of those
records on permanent non-erasable medium for extended times in secure
( off-site ) facilities.
Ses provide environments in which programs run, and services for the users of the
system, including:
User Interfaces - Means by which users can issue commands to the system.
Depending on the system these may be a command-line interface ( e.g. sh,
csh, ksh, tcsh, etc. ), a GUI interface ( e.g. Windows, X-Windows, KDE,
Gnome, etc. ), or a batch command systems. The latter are generally older
systems using punch cards of job-control language, JCL, but may still be
used today for specialty systems designed for a single purpose.
Program Execution - The OS must be able to load a program into RAM,
run the program, and terminate the program, either normally or abnormally.
I/O Operations - The OS is responsible for transferring data to and from
I/O devices, including keyboards, terminals, printers, and storage devices.
File-System Manipulation - In addition to raw data storage, the OS is also
responsible for maintaining directory and subdirectory structures, mapping

file names to specific blocks of data storage, and providing tools for
navigating and utilizing the file system.
Communications - Inter-process communications, IPC, either between
processes running on the same processor, or between processes running on
separate processors or separate machines. May be implemented as either
shared memory or message passing, ( or some systems may offer both. )
Error Detection - Both hardware and software errors must be detected and
handled appropriately, with a minimum of harmful repercussions. Some
systems may include complex error avoidance or recovery systems,
including backups, RAID drives, and other redundant systems. Debugging
and diagnostic tools aid users and administrators in tracing down the cause
of problems.
Other systems aid in the efficient operation of the OS itself:
Resource Allocation - E.g. CPU cycles, main memory, storage space, and
peripheral devices. Some resources are managed with generic systems and
others with very carefully designed and specially tuned systems, customized
for a particular resource and operating environment.
Accounting - Keeping track of system activity and resource usage, either
for billing purposes or for statistical record keeping that can be used to
optimize future performance.
Protection and Security - Preventing harm to the system and to resources,
either through wayward internal processes or malicious outsiders.
Authentication, ownership, and restricted access are obvious parts of this
system. Highly secure systems may log all process activity down to
excruciating detail, and security regulation dictate the storage of those
records on permanent non-erasable medium for extended times in secure
( off-site ) facilities.
Explain peer to peer systems?

Peer-to-peer (P2P) is a decentralized communications model in which each


party has the same capabilities and either party can initiate a
communication session. Unlike the client/server model, in which the client
makes a service request and the server fulfills the request, the P2P network
model allows each node to function as both aclient and server.

P2P systems can be used to provide anonymized routing of network traffic,


massive parallel computing environments, distributed storage and other
functions. Most P2P programs are focused on media sharing and P2P is
therefore often associated withsoftware piracy and copyright violation.
Typically, peer-to-peer applications allow users to control many parameters
of operation: how many member connections to seek or allow at one time;
whose systems to connect to or avoid; what services to offer; and how
many system resources to devote to the network. Some simply connect to
some subset of active nodes in the network with little user control,
however.
Although uses for the P2P networking topologies have been explored since
the days ofARPANET, the advantages of the P2P communications model
didn't become obvious to the general public until the late 1990s, when
music-sharing P2P applications like Napsterappeared. Napster and its
successors -- like Gnutella, and more recently, BitTorrent -- cut into music
and movie industry profits and changed how people thought about
acquiring and consuming media.
System administrators tend to discourage the use of P2P applications. In
addition to tying up bandwidth and possibly exposing the administrator's
organization legally, P2P applications can be used to bypass firewalls and
distribute malware. Networks are often set up to prevent peer-to-peer "side
talk" by PCs.
2. .Explain RPC?

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. The requesting
program is a client and the service-providing program is the server.
Like a regular or local procedure call, an RPC is a
synchronousoperation requiring the requesting program to be

suspended until the results of the remote procedure are returned.


However, the use of lightweight processes or threads that share the
same address space allows multiple RPCs to be performed
concurrently.
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 afunction call or a subroutine call.) RPC uses
the client/server model. The requesting program is a client and the serviceproviding program is the server. Like a regular or local procedure call, an
RPC is a synchronous operation requiring the requesting program to be
suspended until the results of the remote procedure are returned. However,
the use of lightweight processes or threads that share the same address
space allows multiple RPCs to be performed concurrently.
When program statements that use RPC are compiled into an executable
program, a stub is included in the compiled code that acts as the
representative of the remote procedure code. When the program is run and
the procedure call is issued, the stub receives the request and forwards it to
a client runtime program in the local computer. The client runtime program
has the knowledge of how to address the remote computer and server
application and sends the message across the network that requests the
remote procedure. Similarly, the server includes a runtime program and
stub that interface with the remote procedure itself. Results are returned the
same way.
There are several RPC models and implementations. A popular model and
implementation is the Open Software Foundation's Distributed Computing
Environment (DCE). The Institute of Electrical and Electronics Engineers
defines RPC in its ISO Remote Procedure Call Specification, ISO/IEC CD
11578 N6561, ISO/IEC, November 1991.
RPC spans the Transport layer and the Application layer in the Open
Systems Interconnection (OSI) model of network communication. RPC

makes it easier to develop an application that includes multiple programs


distributed in a network.
Alternative methods for client/server communication include message
queueing and IBM's Advanced Program-to-Program Communication
(APPC).
3. Explain Domain Name System.
Every time you visit a website, you are interacting with the largest distributed database in the
world. This massive database is collectively known as the DNS, or the Domain Name System.
Without it, the Internet as we know it would be unable to function. The work that the DNS does
happens so seamlessly and instantaneously that you are usually completely unaware that it's
even happening. The only time that you'll get an inkling about what the DNS is doing is when
you're presented with an error after trying to visit a website. Learn more about what the DNS is,
how it works and why it's so critical by reading on below.

IP Addresses and Domain Names


In order to understand what the DNS is and how it works, you need to have a basic
understanding of IP addresses and domain names. An IP address, or Internet Protocol address,
is a complex string of numbers that acts as a binary identifier for devices across the Internet. In
short, an IP address is the address that computers, servers and other devices use to identify one
another online. The vast majority of IP addresses are arranged into four sets of digits - i.e.,
12.34.56.78.
A domain name is the information that you enter into a web browser in order to reach a specific
website. When you input a URL like www.example.com/index into a web browser, its domain
name is example.com. Basically, a domain name is the human-friendly version of an IP address.
Businesses vie for easy-to-remember domain names, since they make it easier for people to
remember how to find them online. If people had to remember complex IP addresses in order to
navigate the Internet, it wouldn't be nearly as useful or enjoyable.

Translating Domain Names into IP Addresses


Although it's possible to enter an IP address into a web browser into order to get to a website, it's
a lot easier to enter its domain name instead. However, computers, servers and other devices
are unable to make heads or tails of domain names - they strictly rely on binary identifiers. The
DNS's job, then, is to take domain names and translate them into the IP addresses that allow
machines to communicate with one another. Every domain name has at least one IP address
associated with it.

Top Level Domains, Root Servers and Resolvers

The DNS is a remarkable database. It doesn't perform its work alone, though. Things called Top
Level Domains (TLDs) and root servers do a lot of the heavy lifting for the DNS. A Top Level
Domain refers to the part of a domain name that comes after the period. For instance, the TLD of
example.com is COM. While there's an ever-expanding number of domain names, there's a
relatively static number of Top Level Domains; .com, .edu and .org are just a few key examples.
Specialized computers called root servers store the IP addresses of each Top Level Domain's
registries. Therefore, the first stop that the DNS makes when it resolves, or translates, a domain
name is at its associated root server. From there, the requested domain name is sent along to a
Domain Name Resolver, or DNR. Domain Name Resolvers, or resolvers, are located within
individual Internet Service Providers and organizations. They respond to requests from root
servers to find the necessary IP addresses. Since the root server already recognizes the .com,
.edu or other part of the equation, it simply has to resolve the remainder of the request. It usually
does this instantly, and the information is forwarded to the user's PC.

The DNS: A Huge Distributed Database


Millions of people make changes to the DNS every day, through new domain names, changes to
IP addresses and other requests. The unique structure of the DNS, though, keeps everything
straight. Duplicate domain names cannot exist within domains, but they can exist across them for instance, example.com and example.gov could be two separate locations online. Otherwise,
the highly organized and efficient nature of the DNS ensures that you never have to worry about
arriving at two different places each time you input a domain name. When you enter a domain
name, its IP address will be resolved and you'll always arrive at the same place. Without the
DNS, the Internet wouldn't be useful, practical or enjoyable.

4. Explain peer to peer middleware, routing overlays?


Concept of a decentralized large-scale distributed system
Large number of networked computers (peers)
Each peer has equivalent capabilities and responsibilities, merging the
roles of client and server
Data distribution over participants, no central authority
Avoids limitations of pure client/server in terms of scalability
Increased interest with file-sharing applications (1999)
First peer-based systems long before the Internet
USENET (1979), FidoNet BBS message exchange system (1984)

Characteristics Of P2P
Placement of data objects across many hosts
Balancing of access load, techniques for search and retrieval of data
Each participating machines contributes resources
Volatile and non-exclusive availability of nodes
Nodes usually disappear, cheat, or fail
Better scalability for large number of objects, due to distributed storage
Routing overlay: Own network over another set of networks
Addresses its own nodes on-top-of existing network nodes
Overlay network provides full-meshed connectivity graph to application
Unstructured P2P Overlay
Peers build random graph starting from boot peer
Flooding or random graph walk, supports content-based lookup
Two-tier approach: Unstructured super-peers, with connected leaf peers
Examples: Gnutella, eDonkey, FastTrack, Kazaa, Skype(?)
Structured P2P Overlay: Assign keys to data items and build graph that maps
each key to a particular node.
5.Explain File Service architecture?

Anarchitecturethatoffersaclearseparationofthemainconcernsinprovidingaccess
tofilesisobtainedbystructuringthefileserviceasthreecomponents:
Aflatfileservice
Adirectoryservice
Aclientmodule.

TherelevantmodulesandtheirrelationshipisshowninFigure5.

Client computer

Server computer

Application
Application
program program

Directory service

Flat file service


Client module

TheClientmoduleimplementsexportedinterfacesbyflatfileanddirectoryservices
onserverside.

Responsibilitiesofvariousmodulescanbedefinedasfollows:

Flatfileservice:

Concernedwiththeimplementationofoperationsonthecontentsoffile.UniqueFile
Identifiers(UFIDs)areusedtorefertofilesinallrequestsforflatfileservice
operations.UFIDsarelongsequencesofbitschosensothateachfilehasaunique
amongallofthefilesinadistributedsystem.

Directoryservice:

ProvidesmappingbetweentextnamesforthefilesandtheirUFIDs.Clientsmay
obtaintheUFIDofafilebyquotingitstextnametodirectoryservice.Directory
servicesupportsfunctionsneededgeneratedirectories,toaddnewfilestodirectories

Clientmodule:

Itrunsoneachcomputerandprovidesintegratedservice(flatfileanddirectory)asa
singleAPItoapplicationprograms.Forexample,inUNIXhosts,aclientmodule
emulatesthefullsetofUnixfileoperations.

Itholdsinformationaboutthenetworklocationsofflatfileanddirectoryserver
processes;andachievebetterperformancethroughimplementationofacacheof
recentlyusedfileblocksattheclient.

Flatfileserviceinterface:

Figure6containsadefinitionoftheinterfacetoaflatfileservice.

Read(FileId,i,n)>Dataif1iLength(File):Readsasequenceofuptonitems

throwsBadPositionfromafilestartingatitemiandreturnsitinData.

Write(FileId,i,Data)if1iLength(File)+1:WriteasequenceofDatatoa

throwsBadPositionfile,startingatitemi,extendingthefileifnecessary.

Create()>FileIdCreatesanewfileoflength0anddeliversaUFIDfor
it.

Delete(FileId)Removesthefilefromthefilestore.

GetAttributes(FileId)>AttrReturnsthefileattributesforthefile.

SetAttributes(FileId,Attr)Setsthefileattributes(onlythoseattributesthatare
not
Accesscontrol

Indistributedimplementations,accessrightscheckshavetobe
performedattheserverbecausetheserverRPCinterfaceisan
otherwiseunprotectedpointofaccesstofiles.

Directoryserviceinterface

Figure7containsadefinitionoftheRPCinterfacetoadirectory
service.

ToconstructagloballyuniqueIDweusesomeuniqueattributeofthemachineon
whichitiscreated,e.g.IPnumber,eventhoughthefilegroupmaymove
subsequently.

FileGroupID:

32bits16bits

IPaddressdate

6.Explainoperatingsystemlayersindetail.

Operating System Layers


Conceptually, the Linux operating system is similar to an onion. It consists of many
layers, one on top of the other. At the very core is the interface with the hardware.

The operating system must know how to communicate with the hardware or nothing
can get done. This is the most privileged aspect of the operating system.
Because it needs to access the hardware directly, this part of the operating system is
the most powerful as well as the most dangerous. What accesses the hardware is a
set of functions within the operating system itself (the kernel) called device drivers.
If it does not behave correctly, a device driver has the potential of wiping out data
on your hard disk or "crashing" your system. Because a device driver needs to be
sure that it has properly completed its task (such as accurately writing or reading
from the hard disk), it cannot quit until it has finished. For this reason, once a driver
has started, very little can get it to stop. We'll talk about what can stop it in the
section on the kernel.
Above the device driver level is what is commonly thought of when talking about
the operating system, the management functions. This is where the decision is made
about what gets run and when, what resources are given to what process, and so
on.
In our previous discussion on processes, we talked about having several different
processes all in memory at the same time. Each gets a turn to run and may or may
not get to use up its time slice. It is at this level that the operating
system determines who gets to run next when your time slice runs out, what should
be done when an interrupt comes in, and where it keeps track of the events on
which a sleeping process may be waiting. It's even the alarm clock to wake you up
when you're sleeping.
The actual processes that the operating system is managing are at levels above the
operating system itself. Generally, the first of these levels is for programs that
interact directly with the operating system, such as the various shells. These
interpret the commands and pass them along to the operating system for execution.
It is from the shell that you usually start applicationprograms such as word
processors, databases, or compilers. Because these often rely on other programs
that interact directly with the operating system, these are often considered a
separate level. This is how the different levels (or layers) might look like graphically:

Image - Operating system layers. (interactive)


If you are running Linux with a graphical interface (e.g. the X Windowing System),
you have an additional layer. Your shell might start the graphical interface, which
then starts the other programs and applications as we discussed.
Under Linux, there are many sets of programs that serve common functions. This
includes things like mail or printing. These groups of related programs are referred
to as "System Services", whereas individual programs such as vi or fdisk are
referred to as utilities. Programs that perform a single function such as ls or date are
typically referred to as commands.

Вам также может понравиться