fa09-sl-sf - ECE 3035 5 problems 7 pages Problem 1(3 parts 20 points Computing Mechanisms Final Exam Solutions Fall 2009 10 December 2009 Storage Part

fa09-sl-sf - ECE 3035 5 problems 7 pages Problem 1(3 parts...

This preview shows page 1 - 3 out of 7 pages.

ECE 3035 Computing Mechanisms Fall 2009 5 problems, 7 pages Final Exam Solutions 10 December 2009 Problem 1 (3 parts, 20 points) Storage Part A (6 points) Suppose a disk has 2 platters, 4 surfaces, 128K tracks, and 2K (avg.) sectors/track. Compute the following sizes ( in bytes ). Express all answers in decimal. storage/surface 128K x 2K x 512 = 2 17 x 2 11 x 2 9 = 2 37 = 128GB storage/cylinder 4 x 2K x 512 = 2 2 x 2 11 x 2 9 = 2 22 = 4MB storage/disk 4 x 128K x 2K x 512 = 2 2 x 2 17 x 2 11 x 2 9 = 2 39 = 512GB Part B (6 points) A clever engineer triples the number of tracks per surface (all other parameters remain the same). Describe the storage and performance effects of this change. Storage effect: The disk storage increases to 3x the original capacity. Performance effect: The disk performance remains unchanged. Part C (8 points) The table below lists memory hierarchy sizes (in bytes) and access times (in seconds) for a system with a 2.5 GHz processor. For each memory type, determine how many times larger and slower it is versus registers. 128 B register file 1x larger access time = 400 pS 1x slower 4 MB L2 cache 2 15 = 32K x access time = 8 nS 20 x 4 GB main memory 2 25 = 32M x access time = 40 nS 100 x 512 GB disk 2 32 = 4B x access time = 80 mS 200M x Suppose an average of two instructions are completed in each processor cycle. How many instructions would be completed in the time it takes to perform one disk access? 80 mS / 400 pS x 2 = 400M instructions 1
Image of page 1
ECE 3035 Computing Mechanisms Fall 2009 5 problems, 7 pages Final Exam Solutions 10 December 2009 Problem 4 (2 parts, 30 points) Activation Frames Consider the following C code fragment: int Bar() { int A = 256; int *P = &A; int W[] = {3, 5, 8, 13}; int *Q = &(W[2]); int Foo(int, int *, int *, int *); A = Foo(A, W, P, Q-1); return(A); } int Foo(int M, int *R, int *S, int *T) { int X = 100; int Y; Y = *S << 2; *T = R[2] + X; return(M); } Part A (15 points) Describe the current state of the stack before Foo returns to Bar . Fill in the unshaded boxes to show Bar’s and Foo ’s activation frames. Include a symbolic description and the actual value (in decimal). For return addresses, show only the symbolic description; do not include a value.
Image of page 2
Image of page 3

You've reached the end of your free preview.

Want to read all 7 pages?

  • Fall '08
  • Staff
  • Compiler optimization, int int int, Mechanisms Final Exam

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern

Stuck? We have tutors online 24/7 who can help you get unstuck.
A+ icon
Ask Expert Tutors You can ask You can ask You can ask (will expire )
Answers in as fast as 15 minutes