CTIS 490 DISTRIBUTED SYSTEMS - PowerPoint PPT Presentation

1 / 20
About This Presentation
Title:

CTIS 490 DISTRIBUTED SYSTEMS

Description:

Processes play a fundamental role in distributed systems since ... the browser continues with fetching other files that make up the page such as the images. ... – PowerPoint PPT presentation

Number of Views:39
Avg rating:3.0/5.0
Slides: 21
Provided by: cneyt
Category:

less

Transcript and Presenter's Notes

Title: CTIS 490 DISTRIBUTED SYSTEMS


1
CTIS 490DISTRIBUTED SYSTEMS
  • WEEK 3
  • DISTRIBUTED SYSTEMS
  • PROCESSES

2
INTRODUCTION
  • Processes play a fundamental role in distributed
    systems since they form a basis for communication
    between different machines.
  • An important issue is how processes are
    internally organized and whether they support
    multiple threads of control.
  • Threads in distributed systems are particularly
    useful to continue using the CPU when a blocking
    I/O operation is performed.

3
MULTITHREADING
  • The ability of an operating system to execute
    different parts of a program, i.e. threads, on a
    single processor, is called multithreading.
  • Multithreading also exploits parallelism when
    executing the program on a multiprocessor system.
  • In that case, each thread is assigned to
    different CPU while shared data are stored in
    main memory.
  • In distributed systems, multithreading is used in
    both client and server process design.

4
MULTITHREADED CLIENTS
  • To establish a high degree of distribution
    transparency, distributed systems that operate in
    wide-area networks may need to conceal long
    inter-process message propagation times.
  • The usual way to hide communication latencies is
    to initiate communication and immediately proceed
    with something else.
  • A typical usage of multithreading is in Web
    browsers.

5
WEB BROWSER
  • The Web browser has to set up a TCP/IP
    connection, read incoming data, and pass it to a
    display component.
  • Setting up a connection as well as reading
    incoming data are blocking operations.
  • To hide communication latencies, browser starts
    displaying data while it is still coming in.
  • While the text is made available to the user,
    including the facilities for scrolling and such,
    the browser continues with fetching other files
    that make up the page such as the images.
  • Developing the browser as a multithreaded client
    simplifies the design.

6
MULTITHREADED SERVERS
  • Multithreading in servers simplifies code design
    and makes it much easier to develop servers that
    exploits parallelism to attain high performance.
  • To understand the benefits of threads for writing
    server code, consider the organization of a file
    server that occasionally has to block waiting for
    the disk.
  • The file server normally waits for an incoming
    request for a file operation, subsequently
    carries out the request, then sends back the
    reply.

7
MULTITHREADED SERVERS
  • One thread, the dispatcher, reads incoming
    requests for a file operation.
  • The server chooses an idle worker thread and
    hands it the request.

8
CLIENT DESIGN
  • A major task of client machines is to provide the
    means for users to interact with remote servers.
  • There are basically two ways in which this
    interaction can be supported.

9
CLIENT DESIGN
  • For each remote service the client machine will
    have a separate counterpart that can contact the
    service over the network.
  • For example, an agenda running on a users PDA
    that needs to synchronize with remote shared
    agenda.
  • In this case, an application-level protocol will
    handle the synchronization.

10
CLIENT DESIGN
  • Provide access to remote services by only
    offering a convenient user interface.
  • This means tha client machine is used only as a
    terminal with no need for local storage, leading
    to an application neutral solution.

11
CLIENT DESIGN
  • Client software comprises more than just user
    interfaces. In many cases, parts of the
    processing and data level in a client-server
    application are executed on a client side.
  • Client software also comprises components for
    achieving distribution transparency i.e. The user
    should not be aware that it is communicating with
    remote processes.
  • For example, client software can be configured to
    handle failure transparency. It can attempt to
    connect to a server repeatedly or try another
    server after several attempts.
  • Client software returns data it had cashed during
    a previous session, as is sometimes done by Web
    browsers that fail connect to a server.

12
SERVER DESIGN
  • A server is a process which implements a specific
    service on behalf of a collection of clients.
  • There are two ways to organize servers
  • Iterative server the server itself handles the
    request and returns a response to the requesting
    client.
  • Concurrent server the server does not handle
    the request itself, but passes it to a separate
    thread or process, after which it immediately
    waits for the next incoming request.

13
SERVER DESIGN
  • How do clients know where to contact for service?
  • Clients send requests to an end point, also
    called a port, at the machine where server is
    running.
  • Each server listens to a specific end point.
  • One approach is to globally assign end points for
    well-known services.

14
SERVER DESIGN
  • For example, servers that handle Internet FTP
    requests always listen to TCP port 21.
  • Likewise, an HTTP server always listens to TCP
    port 80.
  • These end points have been assigned by the
    Internet Assigned Numbers Authority (IANA).
  • With assigned end points, the client only needs
    to find the network address of the machine where
    the server is running.

15
SERVER DESIGN
  • There are many services that do not require a
    pre-assigned end point.
  • For example, a time-of-the day server may use an
    end point that is dynamically assigned to it by
    its local operating system.
  • In that case, the client will first have to look
    up the end point.
  • One solution is to have a special daemon running
    on each machine that runs servers which listens
    to a well-known point.

16
SERVER DESIGN
17
SERVER DESIGN
  • One final design issue is whether or not the
    server is stateless or stateful.
  • Stateless server does not keep information on the
    state of its clients.
  • For example, a Web server is stateless server.
  • Stateful server maintains persistent information
    on its clients.
  • For example, a file server maintains a table
    containing (client,file) entries.
  • Such a table allows the server to keep track of
    which client has the update permissions on which
    file.

18
SERVER DESIGN
  • When the server cannot maintain state, a common
    solution is to let the client send along
    additional information on its previous accesses.
  • In the case of Web, this information is
    transparently stored by the clients browser in
    what is called a cookie.
  • A cookie is small piece of data containing
    client-specific information that is of interest
    to the Web server.

19
SERVER CLUSTERS
  • A server cluster is a collection of machines
    connected through a network where each machine
    runs one or more servers.
  • The server clusters that we consider here are the
    ones in which machines are connected through a
    LAN offering high bandwidth.
  • In most cases, a server cluster is organized into
    three tiers.

20
SERVER CLUSTERS
  • First tier consists of a switch through which the
    client request are routed.
  • Second tier, contains servers dedicated to
    application processing. In cluster computing,
    these are typically servers running on
    high-performance hardware dedicated delivering
    compute power.
  • Third tier contains data-processing servers,
    running file and database servers. Depending on
    the usage of the server cluster, these servers
    may be running specialized machines, configured
    for high-speed disk access and having large data
    cashes.
Write a Comment
User Comments (0)
About PowerShow.com