University of California, Berkeley– College of Engineering Department of Electrical Engineering and Computer Sciences Spring 2007 Instructor: Dan Garcia 2007-05-12 CS61C Final ExamAfter the exam, indicate on the line above where you fall in the emotion spectrum between “sad” & “smiley”...Last Name Answers First Name Student ID Number Login cs61c- Login First Letter (please circle) a b c d e f g h i j Login Second Letter (please circle) a b c d e f g h i j k l m n o p q r s t u v w x y z Your LABTA’s name (please circle) Aaron Alex Brian David Matt Michael Valerie Name of the person to your Left Name of the person to your Right All the work is my own. I have no prior knowledge of the exam contents nor will I share the contents with others in CS61C who have not taken it yet. (please sign) Instructions (Read Me!) •This booklet contains 9 numbered pages including the cover page. Put all answers on these pages (feel free to use the back of any page for scratch work); don’t hand in any stray pieces of paper. •Please turnoffall pagers, cell phones & beepers. Remove all hats & headphones. Place your backpacks, laptops and jackets at the front. Sit in everyotherseat. Nothing may be placed in the “no fly zone” spare seat/desk between students. The exam is closed book, no computers, PDAs or calculators. •Fill in the front of this page and put your name & login on every sheet of paper. •You may use 2 pages (US Letter, front and back) of notes, plus the green COD 3/e reference sheet. •There may be partial credit for incomplete answers; write as much of the solution as you can. We will deduct points if your solution is far more complicated than necessary. When we provide a blank, please fit your answer within the space provided. “IEC format” refers to the mebi, tebi, etc prefixes. •You must complete ALL THE QUESTIONS, regardless of your score on the midterm. Clobbering only works from the Final to the Midterm, not vice versa. You have 3 hours...relax. Problem M1 M2 M3 Ms F1 F2 F3 F4 F5 Fs Total Minutes 20 20 20 60 24 24 24 24 24 120 180 Points 10 10 10 30 18 18 18 18 18 90 120 Score 10101030181818181990120

This preview
has intentionally blurred sections.
Sign up to view the full version.

2/9 Midterm RevisitedM1) Do you remember when… we used to sing, sha la la la…a) Some say bubble-gum pop music is garbage, so let’s start with a question about memory management and running programs! BRIEFLY tell us why the first thing is better than the second thing: Mark & sweepis better than reference countingbecause it... can handle circular structures Reference countingis better than copyingbecause it... can use all of memory Copyingis better than mark & sweepbecause it... defragments memory so discontiguous free blocks can be re-absorbed into a whole The buddy schemeis better than the slab allocatorbecause it...

This is the end of the preview. Sign up
to
access the rest of the document.