(answers in web view)
Name: _______________________________
Student ID: _______________________________

Total points: 70
  1. Describe Ivan Sutherland's 1963 SketchPad prototype (part of his Ph.D. thesis at MIT). What was groundbreaking about it? [3]
    Used a light pen to manipulate graphical objects directly on-screen. Draw a master diagram once, and instantiate it several times (forerunner of OO design). Constraint-based system. Predecessor of CAD.
  2. What was one of the most important advances in the introduction of the Apple Macintosh in 1984? (There's room for debate here; argue your case.)[3]
    Computers for the masses: much cheaper ($3k rather than over $10k), mass-marketing ad campaign including TV spots during Superbowl and Olympics.
  3. Name at least three early GUI environments of the 1980's, besides Microsoft Windows and Apple MacOS.[3]
    Atari GEM, Amiga, NeXTstep, OS/2, Unix X11, Xerox Star/Smalltalk
  4. The CubeView tutorial example in Lab0 had three C++ files: CubeView.cxx (which defined the CubeView class as a subclass of Fl_Gl_Window), CubeMain.cxx (which defined main()), and CubeViewUI.cxx (which defined the CubeViewUI class as a base class). Why have three files? Contrast their purposes. [3]
    CubeMain was very small, just had the main() function and kicked off an instance of CubeViewUI. CubeViewUI was generated by fluid, and just contained the user interface widgets. The primary functionality was in CubeView.cxx, in a class that was used/instantiated by CubeViewUI.
  5. Describe Fitt's law in words. What three quantities does it relate? [3]
    The time to acquire a target using a pointing device is a (logarithmic) function of (the ratio of) the distance to and the size of the target.
  6. Your graphics application has a palette of 20 tools, each represented by a 16x16-pixel button. Discuss how you might lay out these buttons on the screen in order to speed up average access time of the tools via mouse.[3]
    Many possibilities: (1) use the current cursor location, e.g., pop-up pie menu from right-click; (2) use the screen edges, laying all 20 buttons along one edge of the screen; (3) dynamically adjust size and position of the most-frequently used tools to optimize access; etc.
  7. Describe a complete human-computer interface other than our standard keyboard, monitor, mouse/touchpad/etc. Describe an application for which this interface might be better-suited than our traditional interface. [4]
  8. Describe at least three applications well-suited to parallel computing. For each one, describe how you would divide up work amongst the processors. [6]
    Weather modelling, computational fluid dynamics, metallurgy, modelling a nuclear blast without actually setting one off, aircraft design, protein folding, off-line 3D rendering, large-scale satellite image analysis, large websites, data mining, etc.
  9. Describe Flynn's taxonomy of parallel computing. (Don't just expand the acronyms!) [4]
    SISD: single instruction, single data: regular uniprocessing
    SIMD: single instruction, multiple data: apply the same instructions to a whole vector of data in parallel. Also called vector computing. Most common form of symmetric multiprocessing. Early Cray supercomputers were mostly SIMD.
    MISD: multiple instruction, single data: applying different operations to the same block of data in parallel. E.g., attempting several decryption algorithms to the same ciphertext. Not commonly used.
    MIMD: multiple instruction, multiple data: several processing nodes, each with their own data and own tasks. Most general form of parallel computing.
  10. Describe the (1) shared, (2) distributed, and (3) hybrid memory models of parallel computing. Draw the diagrams illustrating how memory and processors are tied together. What are the advantages/disadvantages of shared memory vs. distributed memory models? [5]
  11. Compare OpenMP and PThreads: how are they similar? How are they different? What are pros/cons of each? [4]
    Both are APIs for shared-memory threaded parallel programming, but OpenMP is generally easier to program in, by applying compiler pragmas to plain serial code. PThreads programs generally have to pay more attention to individual threads and use a C function interface rather than compiler pragmas. Compiler support for PThreads is generally more widespread.
  12. Write a complete C/C++ function to compute the dotproduct of two vectors. Use OpenMP to parallelize. Remember the "#include"s. The declaration of the function is: [6]
    	double dotprod( double* x, double* y, unsigned int len );
    #include <omp.h>
    double dotprod( double* x, double* y, unsigned int len ) {
    	double sum = 0.0;
    	unsigned int i;
    	#pragma omp parallel for reduction(+:sum)
    	for (i=0; i<len; i++)
    		sum += x[i] * y[i]
    	return sum;
    }
    
    1. Describe synchronous vs. asynchronous communication in general and give an every-day example of each (need not be computer-related). [3]
      Synchronous: both sender and receiver are connected at the same time. Phone call, face-to-face conversation, TCP.
      Asynchronous: sending of message and receiving of message might not happen at the same time. Email, postal mail, voicemail, TV/radio, UDP.
    2. Now compare the pros/cons of synchronous vs. asynchronous communication in the context of parallel programming. [3]
      Synchronous communication is easier to program, but introduces idle time while one thread is waiting for another, leading to inefficiencies.
      Asynchronous allows threads to continue while waiting for the other side, but logic is needed to tell when the other side has received the message.
  13. Describe Amdahl's law of parallel computing. What is the take-home message? [4]
    Speedup = 1 / ( P/N + (1-P) ), where P is the fraction of code that is parallelizable, and N is the number of processors.
    Take-home message is that the important thing is not just the number of processors we throw at a problem, but the fraction of code that can be parallelized efficiently.
  14. Compare the two complementary fields of computer graphics and image analysis. Name some example applications of each; be specific as to what parts are graphics and what parts are image analysis. [4]
    Computer graphics is synthetic, creating images/videos from an abstract representation. Image analysis is analytic, starting from real-world images/videos and deriving abstract representations of what's in the images.
  15. What is colour? What does an RGB triple represent? [4]
    Colour is a frequency distribution over the spectrum of visible light. A colour is a function describing intensity as a function of frequency. An RGB triple represents a linear combination of three primaries, R,G,B, however in order to produce a colour we need to define the chromaticities of those primaries.
  16. Attached is a printout of the home page of Oracle, a large corporation that produces database software for businesses. Critique their user interface design: good points and bad points. Bear in mind that this is a static printout of a website. Be as detailed as you can, and cite specific examples. You may wish to circle items on the printout. [5]