Download - Midterm1 Solucionario Cap 1 4 e 5

Transcript
  • 7/23/2019 Midterm1 Solucionario Cap 1 4 e 5

    1/6

    Coulouris

    Chapter 1

    1.2How might the clocks in two computers that are linked by a local network be

    synchronized without reference to an external time source? What factors limit theaccuracy of the procedure you have described? How could the clocks in a large number

    of computers connected by the Internet be synchronized? iscuss the accuracy of that

    procedure!

    " #o global clock$ When programs need to cooperate they coordinate their actions by

    exchanging messages! Close coordination often depends on a shared idea of the time

    at which the programs% actions occur! &ut it turns out that there are limits to theaccuracy with which the computers in a network can synchronize their clocks ' there

    is no single global notion of the correct time! (his is a direct conse)uence of the fact

    that the only communication is by sending messages through a network!

    1.4 * user arrives at a railway station that they has never visited before+ carrying a ,* that

    is capable of wireless networking! -uggest how the user could be provided withinformation about the local services and amenities at that station+ without entering the

    station%s name or attributes! What technical challenges must be overcome?

    page 1.

    " (he user must be able to ac)uire the address of locally relevant information as automatically as

    possible! /ne method is for the local wireless network to provide the 02 of web pages about

    the locality over a local wireless network! 3or this to work$ 415 the user must run a program onher device that listens for these 02s+ and which gives the user sufficient control that she is not

    swamped by unwanted 02s of the places she passes through6 and 475 the means of propagatingthe 02 4e!g! infrared or an 897!11 wireless 2*#5 should have a reach that corresponds to thephysical spread of the place itself!

    1.60se the World Wide Web as an example to illustrate the concept of resource sharing+client and server! What are the advantages and disadvantages of H(:2+ 02s and

    H((, as core technologies for information browsing? *re any of these technologies

    suitable as a basis for client"server computing in general?

    " Web ,ages are examples of resources that are shared! (hese resources are managed by Web

    servers! Client"server architecture! (he Web &rowser is a client program 4e!g! #etscape5 that runson the user;s computer! (he Web server accesses local files containing the Web pages and then

    supplies them to client browser processes!

    H(:2 is a relatively straightforward language to parse and render but it confuses presentation

    with the underlying data that is being presented!

  • 7/23/2019 Midterm1 Solucionario Cap 1 4 e 5

    2/6

    02s are efficient resource locators but they are not sufficiently rich as resource links! 3or

    example+ they may point at a resource that has been relocated or destroyed6 their granularity 4a

    whole resource5 is too coarse"grained for many purposes!

    H((, is a simple protocol that can be implemented with a small footprint+ and which can be put

    to use in many types of content transfer and other types of service! Its verbosity 4H(:2messages tend to contain many strings5 makes it inefficient for passing small amounts of data!

    H((, and 02s are acceptable as a basis for client"server computing except that 4a5 there is nostrong type"checking 4web services operate by"value type checking without compiler support5+

    4b5 there is the inefficiency that we have mentioned!

    1.8*n open distributed system allows new resource"sharing services such as the &2/&

    ob to be added and accessed by a variety of client programs! iscuss

    in the context of this example+ to what extent the needs of openness differ from those ofheterogeneity!

    " (o add the &2/& ob must already have been agreed for the distributed system (o list themagain$

    the distributed system uses a common set of communication protocols 4probably Internet

    protocols5! it uses an defined standard for representing data items 4to deal with heterogeneity of hardware5!

    It uses a common standard for message passing operations 4or for invocations5!

    It uses a language independent standard for representing data structures!&ut for the open distributed system the standards must have been agreed and documented before

    the &2/& ob

  • 7/23/2019 Midterm1 Solucionario Cap 1 4 e 5

    3/6

    &oth processes should be able to tolerate missing messages! (he client must tolerate a missing

    reply message after it has sent an invocation re)uest message! Instead of making the user wait

    forever for the reply+ a client process could use a timeout and then tell the user it has not beenable to contact the server! * simple server

  • 7/23/2019 Midterm1 Solucionario Cap 1 4 e 5

    4/6

    iscuss the advantages and disadvantages of this method when compared with C/&*%s C!

    (he method which uses a standard form is inefficient when communication takes placebetween pairs of

    similar computers whose byte orderings differ from the standard! It is efficient in networks in

    which the byte"ordering used by the ma

  • 7/23/2019 Midterm1 Solucionario Cap 1 4 e 5

    5/6

    5.8=xplain the design choices that are relevant to minimizing the amount of reply data held

    at a server! Compare the storage re)uirements when the and * protocols are used!page 1E1

    (o enable reply messages to be re"transmitted without re"executing operations+ a server must

    retain the last reply to each client! When is used+ it is assumed that a re)uest message is anacknowledgement of the last reply message! (herefore a reply message must be held until a

    subse)uent re)uest message arrives from the same client! (he use of storage can be reduced by

    applying a timeout to the period during which a reply is stored! (he storage re)uirement for F average message size x number of clients that have made re)uests since timeout period! When

    * is used+ a reply message is held only until an acknowledgement arrives! When an

    acknowledgment is lost+ the reply message will be held as for the protocol!

    5.9

    *ssume the * protocol is in use! How long should servers retain unacknowledged replydata? -hould servers repeatedly send the reply in an attempt to receive an acknowledgement?

    "(he timeout period for storing a reply message is the maximum time that it is likely for any

    client to a retransmit a re)uest message! (here is no definite value for this+ and there is a trade"

    off between safety and buffer space! In the case of *+ reply messages are generally discarded

    before the timeout period has expired because an acknowledgement is received! -uppose that aserver using * re"transmits the reply message after a delay and consider the case where the

    client has sent an acknowledgement which was late or lost! (his re)uires 4i5 the client to

    recognise duplicate reply messages and send corresponding extra acknowledgementsand 4ii5 the server to handle delayed acknowledgments after it has re"transmitted reply messages!

    (his possible improvement gives little reduction in storage re)uirements 4corresponding to the

    occasional lost acknowledgement message5 and is not convenient for the single threaded clientwhich may be otherwise occupied and not be in a position to send further acknowledgements!

    5.12iscuss the invocation semantics that can be achieved when the re)uest"reply protocol

    is implemented over a (C,AI, connection+ which guarantees that data is delivered in theorder sent+ without loss or duplication! (ake into account all of the conditions causing a

    connection to be broken!

    " * process is informed that a connection is broken$

    when one of the processes exits or closes the connection!

    when the network is congested or fails altogether

    (herefore a client process cannot distinguish between network failure and failure of the server!,rovided that the connection continues to exist+ no messages are lost+ therefore+ every re)uest

    will receive a corresponding reply+ in which case the client knows that the method was executed

    exactly once! However+ if the server process crashes+ the client will be informed that the

    connection is broken and the client will know that the method was executed either once 4if theserver crashed after executing it5 or not at all 4if the server crashed before executing it5!

  • 7/23/2019 Midterm1 Solucionario Cap 1 4 e 5

    6/6

    &ut+ if the network fails the client will also be informed that the connection is broken! (his may

    have happened either during the transmission of the re)uest message or during the transmission

    of the reply message! *s before the method was executed either once or not at all!(herefore we have at"most"once call semantics!

    5.14

    (he =lection service must ensure that a vote is recorded whenever any user thinks they have casta vote! iscuss the effect of maybe call semantics on the =lection service!

    Would at"least"once call semantics be acceptable for the =lection service or would you

    recommend at"most"once call semantics?

    " :aybe call semantics is obviously inade)uate for voteG =x B!1 specifies that the voter%s number

    is used to ensure that the user only votes once! (his means that the server keeps a record of who

    has voted! (herefore at"least"once semantics is alright+ because any repeated attempts to vote arefoiled by the server!

    5.15

    * re)uest"reply protocol is implemented over a communication service with omission failures toprovide at"least"once :I invocation semantics! In the first case the implementor assumes an

    asynchronous distributed system! In the second case the implementor assumes that the maximum

    time for the communication and the execution of a remote method is (! In what way does the

    latter assumption simplify the implementation?

    " In the first case+ the implementor assumes that if the client observes an omission failure it

    cannot tell whether it is due to loss of the re)uest or reply message+ to the server having crashedor having taken longer than usual! (herefore when the re)uest is re"transmitted the client may

    receive late replies to the original re)uest! (he implementation must deal with this!

    In the second case+ an omission failure observed by the client cannot be due to the server takingtoo long! (herefore when the re)uest is re"transmitted after time (+ it is certain that a late reply

    will not come from the server! (here is no need to deal with late replies!