DOC PREVIEW
MIT 6 893 - Occam and Transputers

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

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

Unformatted text preview:

Occam and TransputersOccam: An Explicitly Parallel LanguageTransputersOccam BasicsComposing Sequential ProcessesComposing Parallel ProcessesPAR for parallel executionReplicated PARAlternationChannel ProtocolsConfiguration6.893: Advanced VLSI Computer Architecture, November 7, 2000, Lecture 7, Slide 1. © Krste AsanovicKrste [email protected]://www.cag.lcs.mit.edu/6.893-f2000/Occam and Transputers6.893: Advanced VLSI Computer Architecture, November 7, 2000, Lecture 7, Slide 2. © Krste AsanovicOccam: An Explicitly Parallel LanguageOccam based on Communicating Sequential Processes (CSP) formalism developed by Tony Hoare, Oxford, UK, and an experimental language by David May, Bristol, UKDesigned to have a formal semantics suitable for automatic program transformationsMany groups investigated direct translation of Occam into hardware6.893: Advanced VLSI Computer Architecture, November 7, 2000, Lecture 7, Slide 3. © Krste AsanovicTransputersThe transputer architecture was designed as an Occam engineTransputer C compiler didn’t appear until much later, and initially produced inferior code compared with Occam compilerOriginal target for transputer was embedded control (robots) where interfacing to hardware directly was importantDesigned to allow large arrays of transputers to be connected easilyAlmost no glue logic required for minimal transputer node6.893: Advanced VLSI Computer Architecture, November 7, 2000, Lecture 7, Slide 4. © Krste AsanovicOccam BasicsOccam primitive is a process, five kinds:Assignment x := y + 2Input keyboard ? charOutput screen ! CharSkip SKIP -- NOP that terminatesStop STOP –- NOP that never terminates Channels provide communication between processesUnbuffered, point-to-point synchronous communicationChannels have declared protocol typesc ? yc ! xChannel c6.893: Advanced VLSI Computer Architecture, November 7, 2000, Lecture 7, Slide 5. © Krste AsanovicComposing Sequential ProcessesSEQ executes sub-processes sequentiallySEQkeyboard ? char –- read char from keyboardscreen ! char -- write char to screenCan do replicated SEQSEQ i = 0 FOR array.sizestream ! data.array[i]-- equivalent toSEQstream ! data.array[0]stream ! data.array[1]...6.893: Advanced VLSI Computer Architecture, November 7, 2000, Lecture 7, Slide 6. © Krste AsanovicComposing Parallel ProcessesPAR executes sub-processes in parallelPARkeyboard(kbd.to.ed)editor(kbd.to.ed,ed.to.screen)screen(ed.to.screen)screeneditored.to.screenkeyboardkbd.to.ed6.893: Advanced VLSI Computer Architecture, November 7, 2000, Lecture 7, Slide 7. © Krste AsanovicPAR for parallel execution WHILE next <> EOF SEQ x := next PAR in ? next out ! x * xRestrictions on parallel data accessvariables modified in one arm of PAR cannot be read or written in other parts of PAR, e.g., PAR -- this PAR is invalid SEQ mice := 42 -- assigns to mice c ! 42 c ? mice -- assigns to mice6.893: Advanced VLSI Computer Architecture, November 7, 2000, Lecture 7, Slide 8. © Krste AsanovicReplicated PARCan use replicated PAR to build array of parallel processesPAR farmer() PAR i = 0 FOR 4 -- count must be constant worker(i)array of channels used to connect processes (not shown in code snippet)worker(1) worker(2)worker(0) worker(3)farmer()6.893: Advanced VLSI Computer Architecture, November 7, 2000, Lecture 7, Slide 9. © Krste AsanovicAlternationALT combines a number of processes only one of which is executedEach process has a guard:input on channelwait on timercan be predicated with boolean expression ALT left ? packet -- guard input statement stream ! packet right ? packet –- guard input statement stream ! packetPRI ALT prioritizes sub-processes in textual orderALTleftrightstream6.893: Advanced VLSI Computer Architecture, November 7, 2000, Lecture 7, Slide 10. © Krste AsanovicChannel ProtocolsAll channels have set of legal message types, the channel protocol. Compiler checks all uses of channels to ensure all communications are compatible with type of channel.CHAN OF [36]BYTE message : -- explicit array typeCHAN OF COMPLEX32 imp : -- named record (struct)CHAN OF INT::[]BYTE link: -- length + vectormessage ! “Hello, World!”link ! len::[buffer FROM start]Also supports tagged type channels, and sequential message channelsGoal is type-safe communication6.893: Advanced VLSI Computer Architecture, November 7, 2000, Lecture 7, Slide 11. © Krste AsanovicConfigurationOccam application written as network of communicating processesConfiguration step maps parallel process components onto available physical processors and maps channels to hardware linksConfiguration should not change


View Full Document

MIT 6 893 - Occam and Transputers

Documents in this Course
Toolkits

Toolkits

16 pages

Cricket

Cricket

29 pages

Quiz 1

Quiz 1

8 pages

Security

Security

28 pages

Load more
Download Occam and Transputers
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 Occam and Transputers 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 Occam and Transputers 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?