1 / 9

The OS Frame of Mind

Nathaniel Wesley Filardo nwf@cs.jhu.edu (Slides lovingly stolen [muahahaha] from Dave Eckhardt < de0u@andrew.cmu.edu >) ‏. The OS Frame of Mind. Outline. The buck stops here No way out The tight place Failure is not an option No rest for the weary The OS frame of mind.

harper
Download Presentation

The OS Frame of Mind

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Nathaniel Wesley Filardo nwf@cs.jhu.edu (Slides lovingly stolen [muahahaha] from Dave Eckhardt <de0u@andrew.cmu.edu>)‏ The OS Frame of Mind

  2. Outline • The buck stops here • No way out • The tight place • Failure is not an option • No rest for the weary • The OS frame of mind

  3. “The buck stops here” • Nobody else to blame • No user action should crash the machine • Can't just flee when the file system fills up • Central point of horror • “Exceptions” are not exceptional • Zero divide, page fault, access violation – every second • Hardware devices wedge (maybe not daily)‏ • Users will try to use 130% of everything

  4. No way out • Customer or inmate? • No (ordinary) user can steal another's file • No (ordinary) user can wipe out the entire file system • Google “FreeBSD-SA-02:35” • Controlled sharing • Memory quotas • Disk quotas • Task priorities • Packet scheduling

  5. The tight place • Abstractions are limited • What's wrong with this code?

  6. Just a wafer-thin factorial? • int fact (int n) { • char errmsg[1024]; • if (n < 0) { • snprintf(errmsg, sizeof (errmsg), • “invalid: fact(%d)\n”, n); • klog(errmsg); • return (-1); • } else if (n <= 1) { • return(1); • } else { • return (n * fact(n – 1)); • } • }

  7. Failure is not an option • The disk block is bad • Retry, or map in another block • The whole disk is broken • RAID • A cosmic ray nuked that DRAM cell • ECC • Ethernet card ejected • Better traverse that ring buffer carefully!

  8. No rest for the weary • Completion is not a goal • OS should run “forever” • Maybe for entire lifetime of hardware • Mistakes add up over time • Correctly handle 99.9% of clock interrupts... • ...lose 1.5 minutes per day! • Leak 1 memory page per process exit • ...forget it!

  9. The OS frame of mind • Narrow definition • OS = layer between hardware and application • The “OS state of mind” • Web server • http://www.kegel.com/c10k.html • IMAP server • IP router • Smartcard • Database

More Related