DOC PREVIEW
MIT 6 033 - Naming systems

This preview shows page 1-2-3-4-5 out of 14 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 14 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 14 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 14 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 14 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 14 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 14 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

L3: Naming systemsFundamental abstractionsWorld-wide WebWeb namesPC boardSlide 6Abstract bus pictureNamesNaming exampleStep 1: compilationStep 2: linkingStep 3: loadingSophistication: dynamic linkingSummaryL3: Naming systemsFrans Kaashoek6.033 Spring 2007http://web.mit.edu/6.033Fundamental abstractions•Memory•Read/write•Interpreter•Instruction repertoire•Environment•Instruction pointer•Communication links•Send/receive(loop (print (eval (read))))World-wide WebWeb nameshttp://web.mit.edu/6.0333 naming systemshttps://apply.eecs.mit.edu/ex?whatnext=ctlmyfolders&submitted=on&onlyreader=kaashoekname overloading: user query in the nameex is a new interpreterPC boardAbstract bus picture•address is overloaded name with location info•LOAD 1742, R1Names•R1•1742•18.7.22.69•web.mit.edu•http://web.mit.edu/6.033•[email protected]•amsterdam•/mit/6.033/www•foo.c•.. (as in cd .. or ls ..)•wc•(617)253-7149, x37149•021-84-2030Naming examplefoo (…) { int x, y;init()x = bar(…)y = sqrt(x)printf (“answer is %d”, y)}init() { …}0xff00: // foo:…jmp 0xff20 // init…jmp 0xffd0 // bar….jmp 0xffc0 // sqrt…jmp 0xdc00 // printfStep 1: compilationfoo (…) { int x, y;init();x = bar(…);y = sqrt(x);printf (“answer is %d”, y);}init() { …}gcc -c foo.cfoo.o:•Text:0xff00:// foo:jmp +20 // init()…jmp ??? // sqrt….•Symbol table:[init, L, +20][bar, U, ??][sqrt, U, ??][printf, U, ??]Step 2: linkingfoo.o:•Text:0xff00:// foo:jmp +20 // init()…jmp ??? // sqrt….•Symbol table:[init, L, +20][bar, U, ??][sqrt, U, ??][printf, U, ??]•Gcc foo.o bar.o /usr/lib/libm.a /usr/lib/libc.alibm.a (sqrt.o, foo.o): sqrt.o:•Text:0xff00: // sqrt:jmp +20 // init()…•Symbol table:[init, L, +20][sqrt, G, +100]Step 3: loading•Load in memory and adjust addresses:foo.o + bar.o + libm.a + libc.afoo.o + bar.o + libm.a + libc.a0x0232-10xff00: // foo:…jmp 0xff20 // init…jmp 0xffd0 // bar….jmp 0xffc0 // sqrt…jmp 0xdc00 // printfSophistication: dynamic linkingfoo.o + bar.o + libm.a + libc.afoo.o + bar.o + libm.a + libc.a0x0232-1libm.alibc.afoo.o + bar.ofoo.o + bar.o•Resolve names at runtime through indirectiondynamic linkerSummary•Understanding a naming system:•What is the syntax for name?•What are the values?•What is the naming resolution algorithm?•Where does a name’s context


View Full Document

MIT 6 033 - Naming systems

Documents in this Course
TRIPLET

TRIPLET

12 pages

End Layer

End Layer

11 pages

Quiz 1

Quiz 1

4 pages

Threads

Threads

18 pages

Quiz I

Quiz I

15 pages

Atomicity

Atomicity

10 pages

QUIZ I

QUIZ I

7 pages

Load more
Download Naming 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 Naming 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 Naming 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?