Unformatted text preview:

CS61C FINAL EXAM EARLY VERSION 5 11 99 Last name Student ID number First name Login cs61c Please circle the last two letters of your login name a a b b c c d d e e f f g g h h i i j j k k l l m n m n o o p p q q r r s s t t u u v v w w x x y y z z Discussion section meeting time TA s name The student on my left is login cs61c The student on my right is login cs61c You are allowed to use two 8 5 x 11 double sided handwritten pages of notes No calculators This booklet contains 11 numbered pages including the cover page plus photocopied pages from COD and an ASCII table Put all answers on these pages please don t hand in stray pieces of paper The exam contains 9 substantive questions plus the dreaded question 0 and the extra credit question You have three hours so relax this exam isn t worth having a heart failure over Good luck I certify that my answers to this exam are all my own work If I am taking this exam early I certify that I shall not discuss the exam questions or answers with anyone until after the scheduled exam time Signature Question The Dreaded Question 0 Performance Pliable Data The Revenge Theme and Variations Cache and VM The Newsgroup Question HLL to Asm Dave s Dirty Clothes Interrupt Questions Tree Monkey Question Extra Credit Total Max Points Your Points 1 to 0 7 6 3 6 11 12 6 4 15 1 70 If you are feeling down starting the test by reading the Extra Credit question might help to inspire you 1 CS61c Final Spring 1999 Login name CS61c Question 0 1 point if not followed Fill out the front page correctly and write your login at the top of each of the pages Circle your login initials on the cover page so that we can read them Performance Question 7 points You are running a benchmark on your company s processor Mbase which runs at 400 MHz and has the following characteristics Mbase Instruction Type A B C D Frequency 40 30 20 10 Cycles 2 3 3 5 a 2 points What is the CPI rating for Mbase You ask the hardware team if they can improve the processor design They tell you that they could make this processor run at 500 MHz however they would have to increase the number of cycles for instruction type C to 4 All the other instruction types still take the same number of cycles Call this machine Mopt Mopt Instruction Type A B C D Frequency 40 30 20 10 Cycles 2 3 4 5 b 1 point What is the CPI rating for Mopt c 2 points How much faster is Mopt than Mbase you may leave the answer as an improper fraction d 2 points Is there an instruction mix that makes Mbase faster than Mopt If so suggest such a mix Note The mix doesn t have to contain all the instruction types 5 12 99 2 CS61c Final Spring 1999 Login name CS61c Pliable Data The Revenge 6 points use the sheets appended to the final Dave has to attend a conference in the Bahamas following the 61C final so all the TA s take him to the airport to send him off As he steps on the plane he tells the TA s that he s left some work in his office and he asks them to finish it for him Kelvin thinks to himself I bet if I raced back and finished all of Dave s work by myself I d feel cocky enough to start answering people s questions on the newsgroup He jets back to Dave s office and finds a single paper on his desk with the following line written at the top of the page 0011 0010 0011 0010 0011 0010 0000 0000 Kelvin notices that Dave has scrawled some notes on the bottom of the paper 0011 0010 base 2 50 base 10 0110 0100 base 2 100 base 10 7 2 128 8 2 256 a 2 points Kelvin thinks Well Dave was always telling us how he wants to become a walking disassembler He must want the MIPS instruction corresponding to this bit pattern Which MIPS instruction should Kelvin write b 0011 0010 0011 0010 0011 0010 0000 0000 2 points Mark comes in just before Kelvin starts writing and snatches the paper from him He looks at the page and says Oh Dave has written down the elements of a C style string in binary He must want to know what string it represents Which string should Mark write c 0011 0010 0011 0010 0011 0010 0000 0000 2 points Gek comes in just before Mark starts writing and snatches the paper from him He looks at the page and says Oh Dave has written down a single precision floating point number I don t have time to figure out the significand but I ll write down the sign and the exponent in decimal He writes x 2 Which sign and what value for the exponent should Gek write Sign Exponent d Bonus question worth 0 points The rest of the TA s all come piling into the office just before Gek starts writing and they say After you left Dave clarified that the work he wanted us to do was finish painting M Piero on his wall What should the TA s draw on the wall Use the back of the sheet if necessary 5 12 99 3 CS61c Final Spring 1999 Login name CS61c Theme and Variations 3 points Match the C expressions on the left with the logic circuits on the right Question 1 X Output Output 0 Y A Question 2 X Output Output X Y Y X B Y Question 3 Output X Y C Write your answers here 1 2 3 Cache and VM Question 6 points The page size of a computer is 16 Kbytes the block size is 32 words and the machine is byte addressable The cache size is 1 Kbtye and it is 4 way set associative The virtual addresses are 42 bits and physical addresses are 36 bits long Calculate the sizes number of bits of the following fields a block offset b set index c tag d page offset e virtual page number f physical page number 5 12 99 4 CS61c Final Spring 1999 Login name CS61c The Newsgroup Question 11 points Although the CS61C review lecture on variable arguments was great Joe Computer is very puzzled What is this M Piero thing What does it have to do with Kelvin I don t get it Determined to find the answer to his confusion he decides to check the newsgroup by starting the program trn In what order do things happen when trn is run Part 1 lists a set of things that occur when trn is run Please time order the steps from 1 …


View Full Document

Berkeley COMPSCI 61C - Final Exam

Documents in this Course
SIMD II

SIMD II

8 pages

Midterm

Midterm

7 pages

Lecture 7

Lecture 7

31 pages

Caches

Caches

7 pages

Lecture 9

Lecture 9

24 pages

Lecture 1

Lecture 1

28 pages

Lecture 2

Lecture 2

25 pages

VM II

VM II

4 pages

Midterm

Midterm

10 pages

Load more
Loading Unlocking...
Login

Join to view Final Exam 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 Final Exam 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?