Final Exam Solutions

E what model for interprocessor communication is

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: ) on a uniprocessor? The big ones are saving and restoring register state, as well as raising and returning from the exception. e. What model for inter ­processor communication is typically used in clusters? Why? Message-passing; it matches the physical reality of processors in clusters (connected over a network) better than shared memory. (Talking about specific distributed programming platforms that abstract this away is also OK.) 2 Question 2: Compiler optimizations [20 points]. (a) In MIPS or a higher ­level language, show an example of dead code elimination; that is, show the code before and after the optimization is applied. Before: if (false) cout << “False!”; a = 6; After: a = 6; (b) In MIPS or a higher ­level language, show an example of constant propagation; that is, show the code before and after the optimization is applied. Before: x = 5; y = x + 3; z = y * 2; After: x = 5; y = 8; z = 16...
View Full Document

This note was uploaded on 02/08/2014 for the course CS 351 taught by Professor Dr.suzannerivoire during the Fall '13 term at Sonoma.

Ask a homework question - tutors are online