DOC PREVIEW
Berkeley COMPSCI 61C - Final Exam

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:

jal CountBananas1CS61C FINAL EXAM: EARLY VERSION, 5/11/99Last name ______________________ First name___________________________Student ID number _______________ Login: cs61c-_______Please circle the last two letters of your login name.abcdef ghi j kl mnopqr st uvwxyzabcdef ghi j kl mnopqr st uvwxyzDiscussion 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 bookletcontains 11 numbered pages including the cover page, plus photocopied pages from COD and an ASCII table. Putall answers on these pages, please; don't hand in stray pieces of paper. The exam contains 9 substantivequestions, plus the dreaded question 0 and the extra credit question. You have three hours, so relax – this examisn’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 shallnot discuss the exam questions or answers with anyone until after the scheduled exam time. Signature ________________________________________________________________Question Max Points Your PointsThe Dreaded Question 0 (-1 to 0)Performance 7Pliable Data, The Revenge 6Theme and Variations 3Cache and VM 6The Newsgroup Question 11HLL to Asm 12Dave’s Dirty Clothes 6Interrupt Questions 4Tree Monkey Question 15Extra Credit (+1)Total 70(If you are feeling down, starting the test by reading the Extra Credit question might help to inspire you !)CS61c-Final, Spring 1999, Login name: CS61c-_____5/12/99 2Question 0 (-1 point if not followed): Fill out the front page correctly and write your login at the top of each ofthe 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 followingcharacteristics:Instruction Type Frequency CyclesA 40% 2B 30% 3C 20% 3D 10% 5a) (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 thisprocessor 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.Instruction Type Frequency CyclesA 40% 2B 30% 3C 20% 4D 10% 5b) (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.)Mbase:Mopt:CS61c-Final, Spring 1999, Login name: CS61c-_____5/12/99 3Pliable 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 tosend 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 tofinish 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 startanswering people's questions on the newsgroup." He jets back to Dave's office and finds a single paper on hisdesk 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)27 = 12828 = 256a.) (2 points) Kelvin thinks, "Well Dave was always telling us how he wants to become a walking disassembler. Hemust 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 pageand says, "Oh, Dave has written down the elements of a C-style string in binary. He must want to know what stringit 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 pageand says, "Oh, Dave has written down a single precision floating point number. I don't have time to figure out thesignificand, 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, Daveclarified 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.]CS61c-Final, Spring 1999, Login name: CS61c-_____5/12/99 4Theme and Variations (3 points):Match the C expressions on the left with the logic circuits on the right.Question 1Output = 0AOutputXYQuestion 2Output = (X && !Y) || (Y && !X)BXYOutputQuestion 3Output = (X && Y)CWrite 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. Thecache size is 1 Kbtye, and it is 4-way set associative. The virtual addresses are 42 bits and physical addresses are36 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 ________CS61c-Final, Spring 1999, Login name: CS61c-_____5/12/99 5The Newsgroup Question (11 points):Although the CS61C review lecture on variable arguments was great, Joe Computer is very puzzled. What is thisM'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 to 13. The odd numbered steps are given


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
Download Final Exam
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 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 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?