Distributed Systems Flashcards

• The main principles of distributed systems • Communication in client-server systems • Socket programming • Remote Procedure Calls • Pipes

1
Q

Main principles of distributed
systems

A

A distributed system is a collection of loosely coupled nodes
interconnected by a communication network.
* From the point of view of a specific node in a distributed system, its own
resources are local, whereas the rest of the nodes and their respective
resources are remote.
* The nodes in a distributed system may vary in size and function (i.e.
small microprocessors, personal computers, and large general-purpose
computer systems).
* They are also referred to by a number of names (i.e. processors, sites,
machines, and hosts) depending on the context in which they are
mentioned.
* We mainly use site to indicate the location of a machine and node to
refer to a specific system at a site
* Generally, one node at one site, the server, has a resource that another
node at another site, the client (or user), would like to use.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Why do we need Distributed
Systems?

A
  • Resource Sharing
  • Computation Speedup
  • Reliability
  • Communication
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Why do we need Distributed
Systems?Resource Sharing

A

A user at one site may be able to use the resources
available at another. For example, a user at site A may be using a laser
printer located at site B. Meanwhile, a user at B may access a file that
resides at A.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Why do we need Distributed
Systems?Computation Speedup

A

Subcomputations can be distributed among the
various sites and run concurrently. If a particular site is overloaded, jobs
can be moved to other sites (load sharing or job migration

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Why do we need Distributed
Systems?Reliability

A

If one site fails in a distributed system, the remaining sites
can continue operating, giving the system better reliability. With enough
redundancy (in both hardware and data), the system can continue
operation, even if some of its sites have failed

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Why do we need Distributed
Systems?Communication

A

Users at the various sites can exchange information. At
a low level, messages are passed between systems. All higher-level
functionality of a standalone systems can be expanded to encompass
the distributed system (i.e. file transfer, login, mail, and remote
procedure calls (RPCs)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Advantages of
Distributed Systems

A
  • Reliability, high fault tolerance
  • Scalability
  • Flexibility
  • Speedup
  • Openness
  • High performance
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

disadvantages of
Distributed Systems

A
  • Difficult troubleshooting
  • Less software support
  • High network infrastructure costs
  • Security issues
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Processes communicating

A
  • A program while executing is a processes.
  • Processes communicate within the same host using inter-
    process communication defined by the OS.
  • Processes communicate in different end systems (potentially
    running different OSs) by exchanging messages across a
    communication network.
  • The process that initiates the communication (that is,
    initially contacts the other process at the beginning of the
    session) is labelled as the client. The process that waits to
    be contacted to begin the session is the serve
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Sockets

A

A client and server process communicate through sockets, which are similar to doors. Sending processes push messages out of the sender’s socket, using transport infrastructure to deliver them to the receiving process. The destination address includes the destination host’s IP address and port number, which routers use to route packets. The sender’s source address includes the source host IP address and source socket port number. The source address is typically automatically attached by the operating system.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Socket programing

A

Two socket types for two transport services:
* UDP (User Datagram Protocol)
* connectionless, unreliable
* Message oriented – group of bytes (“datagram”) is sent
through the socket
* TCP (Transmission Control Protocol)
* connection-oriented, reliable
* Byte Stream oriented – stream of bytes is sent through
the socket

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Client-Server application using UDP

A
  • no “connection”
    between client & server
    (no handshaking before
    sending data
  • sender explicitly
    attaches IP destination
    address and port # to
    each packet
  • receiver extracts sender
    IP address and port#
    from received packet
  • transmitted data may be
    lost or received out-of-
    order
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Client-Server application using TCP

A

client must contact server
* server process must first be running
* server must have created socket (door) that
welcomes client’s contact

client contacts server by:
* Creating TCP socket, specifying IP address,
port number of server process
* when client creates socket: client TCP
establishes connection to server TCP
* when contacted by client, server TCP creates
new socket for server process to
communicate with that particular client
* allows server to talk with multiple clients
(source port numbers used to distinguish
clients)
* TCP provides reliable, in-order byte-stream
transfer between client and serve

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Remote Procedure Calls

A

Remote Procedure Calls (RPCs)
* RPCs allow a client to invoke a procedure on a remote host
as it would invoke a procedure locally.
* The RPC system hides the details that allow communication
by providing a stub on both remote hosts (client and
server).

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Remote Procedure Calls steps

A
  1. client invokes a remote procedure. RPC
    system calls the appropriate stub, passing
    it the parameters provided to the remote
    procedure.
  2. client stub locates the port on the
    server and marshals the parameters
    (packaging the parameters into a form
    that can be transmitted over a network).
  3. client stub transmits a message to the
    server using message passing.
    4-5. server stub receives this message and
    invokes the procedure on the server.
    6-10. return values are passed back to the
    client using the same technique
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Pipes

A

Pipes
A pipe acts as a channel allowing two processes to communicate
(interprocess communication).
* Ordinary pipes
* Allow communication in standard producer-consumer style.
* Producer writes to one end (the write-end of the pipe).
* Consumer reads from the other end (the read-end of the pipe).
* Ordinary pipes are unidirectional.
* Require parent-child relationship between communicating
processes.
* Named pipes
* Named Pipes are more powerful than ordinary pipes.
* Communication is bidirectional.
* Several processes can use the named pipe for communication.
* Allows interprocess communication over a network.