DOC PREVIEW
CMU CS 15410 - Boot Camp

This preview shows page 1-2-24-25 out of 25 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 25 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 25 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 25 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 25 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 25 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

Slide 1Slide 2Slide 3Slide 4Slide 5Slide 6Slide 7Slide 8Slide 9Slide 10Slide 11Slide 12Slide 13Slide 14Slide 15Slide 16Slide 17Slide 18Slide 19Slide 20Slide 21Slide 22Slide 23Slide 24Slide 251Boot CampDave [email protected] Is a Hard Class●Traditional hazards–410 letter grade one lower than other classes–All other classes this semester: one grade lower●Aim–If you aim for a B you might not get one–If you aim for a C you might not get one–“I'll drop if I can't get an A”●You must discuss this with your partner early1This is a Transformative Class●Genuine achievement, available to you–What is an OS, really?–Mutual exclusion, synchronization, concurrency–Deadlock●Design, planning●Serious competence in debugging!1Work Flow – You may be used to...●Assignment handout  code outline●Compilation implies correctness●Graded by a script●All done!–Never use it again–Delete it at end of semester●Total opposite of real life1Work Flow – 410 Additions●Design●Divide into parts●Manage your partner●Merge1Surprises●“Code complete” means nothing–Merge can take three days–Then you find bugs.●Code with “the right idea” will immediately crash–If you're lucky!1On DebuggingAs soon as we started programming, we found to our surprise that it wasn't as easy to get programs right as we had thought. Debugging had to be discovered. I can remember the exact instant when I realized that a large part of my life from then on was going to be spent in finding mistakes in my own programs.–Maurice Wilkes (1949)1Debugging●Bugs aren't just last-minute glitches●They are crucial learning experiences–Learning a lot can take a while1What Does A Bug Mean?●“It tells me 'triple fault' – why??”–Research: 20 minutes–Think: 20 minutes–Debug: 2 hours.–...three times.●May need to write code to trap a bad bug–Asserts or more-targeted debug module●Then you will find your design was wrong!–Don't be shocked – this is part of 410 / life1“All Done”?●Finally, when you're done...–You will use your code for next assignment–We will read it (goal: every line)1Interlude●What is source code “for”?–What do we do with it?1Interlude●The purpose of code is for people to read–By a reviewer / security auditor–By your group–By your manager–By your successor–By you six months later (6 hours later if no sleep)●Oh, yeah, the compiler reads it too1Confront the Material●We are doing printf() all the way down–Subroutine linkage, how & why–Stub routine, IDT entry, trap handler wrapper–Output/input-echo interlock–Logical cursor vs. physical cursor–Video memory (what does scrolling mean?)●Can't really gloss over anything1On InvestingA week of coding can sometimes save an hour of thought.–Josh Bloch1Confront Debugging●Real life: you will debug other people's code–Any bug could be yours, partner's, ours, or simics; you need to find it.●Can't debug with only printf()–Learn the Simics debugger–Assertions, consistency checks–Debugging code1Confront Debugging●½ hour of studying the debugger–vs. 2 days of thrashing●Papering over a problem–Re-ordering object files to avoid crash1How to Have Trouble●How to get an R–Arrive unprepared (barely escape 113, 213)–Do everything at the last minute–Don't read the book or come to class–Hide from course staff no matter what●How to get a D–Don't get the core of the kernel project working●(There are other ways, but this one is popular)1Warning About 15-213●It's an important class●We expect you to know–Byte, word, register, 1<<2–Thread, stack–malloc(), free() (when & why)●Trouble with 213?–Was the malloc() lab a struggle?–Expect to spend extra effort on 4101Warning to Graduate Students●This is an undergraduate class–There is typically a diversity of grades●Getting “average grades on every assignment” may mean a C, not a B1Doing Well – Invest in Good Code●Mentally commit to writing good code–Not just something kinda-ok–You will depend on your code●Anand Thakker–Remind yourself that you love yourself–So you should wrote good code for yourself1Doing Well – Start Early●Starting a week late on a 2-week project can be bad●Not making “just one” checkpoint can be bad–Missing two kernel-project checkpoints...●...may make passing impossible.1Doing Well – Read Partner's Code●You will need to read everything your partner wrote–(and maybe answer test questions)●Set up a mechanism–Daily meeting? Careful reading of merge logs?●Do “one of each”–Partner does N-1 stub routines, you do hardest1Doing Well – Time for Design●“Design” means you may need to think overnight1How to get an A●Understand everything–(consider 2-3 ways to do each thing, pick the best)●Read all of your partner's code●Work with your partner–(not: work alone for 4-5 weeks out of 6, then (fail to) merge)1How to get an A●Write good code●Do things which help you–asserts, good variable names, source control●Document before coding●Be “done” days


View Full Document

CMU CS 15410 - Boot Camp

Download Boot Camp
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 Boot Camp 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 Boot Camp 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?