DOC PREVIEW
CORNELL CS 514 - Intermediate Course in Operating Systems

This preview shows page 1-2-3-23-24-25-26-47-48-49 out of 49 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 49 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 49 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 49 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 49 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 49 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 49 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 49 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 49 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 49 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 49 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 49 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

CS514: Intermediate Course in Operating SystemsApplications of these ideasSlide 3Specific topics we’ll coverWhat should the user “see”?ToolkitsStyle of coding?Toolkit approach: IsisThreadingA tricky model to work with!Examples of tools in toolkitHow toolkits workHow programmers use toolkitsExperience is mixed….Leads to notion of “wrappers”Wrapper examplesExperience with wrappers?Why CORBA f.tol. was a flopFiles and databases?How about “TCP to a group?”How would this work?How to “move” a TCP connectionMigrating a TCP connectionTCP connection stateGeneralizing the ideaFault-tolerant TCP connectionSlide 27What’s new?Choice of multicastTimeline pictureAsynchronous multicastSources of delay?How visible will delay be?Using our solution?Repeat of CORBA f.tol. idea?Determinism worryWould users accept this?Distributed shared memorySome insights that might helpSo what’s the model?To implement this DSM…DSM with a daemonDesign choices?Slide 44Best choice?False sharingWould this work?“Tools” we didn’t discuss todayRecap of today’s lectureCS514: Intermediate Course in Operating SystemsProfessor Ken BirmanVivek Vishnumurthy: TAApplications of these ideasOver the past three weeks we’ve heard about group communicationProcess groupsMembership tracking and reporting “new views”Reliable multicast, ordered in various waysDynamic uniformity (safety), quorum protocolsSo we know how to build group multicast… but what good are these things?Applications of these ideasToday, we’ll review some practical applications of the mechanisms we’ve studiedEach is representative of a class Goal is to illustrate the wide scope of these mechanisms, their power, and the ways you might use them in your own workSpecific topics we’ll coverWrappers and ToolkitsDistributed Program-ming LanguagesWrapping a Simple RPC serverWrapping a Web SiteHardening Other Aspects of the WebUnbreakable Stream ConnectionsReliable Distributed Shared MemoryWhat should the user “see”?Presentation of group communication tools to end users has been a controversial topic for decades!Some schools of thought:Direct interface for creating and using groupsHide in a familiar abstraction like publish-subscribe or Windows event notificationUse inside something else, like a cluster mgt. platform a new programming languageEach approach has pros and consToolkitsMost systems that offer group communication directly have toolkit interfacesUser sees a library with various calls and callbacksThese are organized into “tools”Style of coding?User writes a program in Java, C, C++, C#...The program declares “handlers” for events like new views, arriving messagesThen it joins groups and can send/receive multicastsNormally, it would also use threads to interact with users via a GUI or do other useful thingsToolkit approach: IsisJoin a group, state transfer:Gid = pg_join(“group-name”,PG_INIT, init_func, PG_NEWVIEW, got_newview, XFER_IN, rcv_state, XFER_OUT, snd_state, … 0);Multicast to a group:nr = abcast(gid, REQ, “%s,%d”, “a string”, 1234, ALL, “%f”, &fltvec);Register a callback handler for incoming messagesisis_entry(REQ, got_msg);Receive a multicast:void got_msg(message *mp) {Msg_scan(“%s,%d”, &astring, &anint);Reply(mp, “%f”, 123.45);}A group is created when a join is first issued. In this case the group initializer function is called. The user needs to code that function. Here the “new view” function, also supplied by the user, gets called when the group membership changes If the group already exists, a leader is automatically selected and its XFER_OUT routine is called. It calls xfer_out repeatedly to send state. Each call results in a message delivered to the XFER_IN routine, which extracts the state from the message To send a multicast (here, a totally ordered one), you specify the group identifier from a join or lookup, a request code (an integer), and then the message. This multicast builds a message using a C-style format string. This abcast wants a reply from all members; the replies are floating point numbers and the set of replies is stored in a vector specified by the caller. Abcast tells the caller how many replies it actually got (nr)This is how an application registers a callback handler. In this case the application is saying that messages with the specified request code should be passed to the procedure “got_msg” Here’s got_msg. It gets invoked when a multicast arrived with the matching request code. This particular procedure extracts a string and an integer from the message and sends a reply. Abcast will collect all of those replies into a vector, set the caller’s pointer to point to that vector, and return the number of replies it received (namely, the number of members in the current view)ThreadingA tricky topic in IsisThe user needs threads, e.g. to deal with I/O from the client while also listening for incoming messages, or to accept new requests while waiting for replies to an RPC or multicastBut the user also needs to know that messages and new views are delivered in order, hence concurrent threads pose issuesSolution? Isis acts like a “monitor” with threads, but running them one at a time unless the user explicitly “exits” the monitorA tricky model to work with!We have…Threads, which many people find trickyVirtual synchrony, including choices of orderingA new distributed “abstraction” (groups)Developers will be making lots of choices, some with big performance implications, and this is a negativeExamples of tools in toolkitGroup join, state xferLeader selectionHolding a “token”Checkpointing a groupData replicationLockingPrimary-backupLoad-balancingDistributed snapshotHow toolkits workThey offer a programmer APIMore procedures, e.g.Create_replicated_data(“name”, type)Lock_replica(“name”)Update_replica(“name”, value)V = (type)Read_replica(“name”)Internally, these use groups & multicastPerhaps, asynchronous cbcast as discussed last week…Toolkit builder optimizes extensively, etc…How programmers use toolkitsTwo main stylesReplicating a data structureFor example, “air traffic sector D-5”Consists of all the data associated with that structure… could be quite elaborateProcesses sharing the structure


View Full Document

CORNELL CS 514 - Intermediate Course in Operating Systems

Documents in this Course
LECTURE

LECTURE

29 pages

LECTURE

LECTURE

28 pages

Load more
Download Intermediate Course in Operating Systems
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Intermediate Course in Operating Systems and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Intermediate Course in Operating Systems 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?