COMP 530: Opera.ng Systems
Welcome to COMP 530
Don Porter
1
Welcome to COMP 530 Don Porter 1 COMP 530: Opera.ng Systems - - PowerPoint PPT Presentation
COMP 530: Opera.ng Systems Welcome to COMP 530 Don Porter 1 COMP 530: Opera.ng Systems Welcome! I just moved here from Stony Brook University I taught a comparable class at SBU regularly Todays goals: Give you a flavor of my
COMP 530: Opera.ng Systems
1
COMP 530: Opera.ng Systems
– I taught a comparable class at SBU regularly
– Give you a flavor of my teaching style with a mini-lecture – Cover course organizaJon
– DemysJfy how computers work (No magic) – Learn core principles: secure mulJplexing, scheduling, concurrency, performance analysis – Challenging, but suppor.ve, environment
2
COMP 530: Opera.ng Systems
2-3
COMP 530: Opera.ng Systems
2-4
COMP 530: Opera.ng Systems
2-5
Hardware OS App App App App
COMP 530: Opera.ng Systems
2-6
COMP 530: Opera.ng Systems
2-7
COMP 530: Opera.ng Systems
2-8
COMP 530: Opera.ng Systems
– Lots of abstracJons and heurisJcs between your applicaJon and the hardware – A good computer scienJst should understand what happens inside the system when one types a command
– OSes like Linux have many users and work on a wide range
– Deal with subtle issues: concurrency, consistency, etc.
COMP 530: Opera.ng Systems
– SomeJmes more, but whatevs
– Issue commands to hardware devices – Power off, Reboot, Suspend – Launch missiles, Do awesome stuff
– Run other code, hardware ta_les if you try anything reserved for the supervisor
2-10
COMP 530: Opera.ng Systems
2-11
Hardware OS App App App App
COMP 530: Opera.ng Systems
2-12
Hardware Libraries App App App App Kernel User Super- visor
COMP 530: Opera.ng Systems
– Win32 (Windows) – POSIX (Unix/Linux) – Cocoa/Cocoa Touch (Mac OS/iOS)
– Injected by the OS into each applicaJon
2-13
COMP 530: Opera.ng Systems
2-14
Hardware Libraries App App App App Kernel User Super- visor
COMP 530: Opera.ng Systems
App
2-15
Hardware Libraries Kernel User Super- visor App Libraries App Libraries Win32 API
COMP 530: Opera.ng Systems
2-16
COMP 530: Opera.ng Systems
– Why bother reimplemenJng sqrt?
– Files, printer, dancing Homer Simpson USB doll
2-17
COMP 530: Opera.ng Systems
– One of a small-ish number of well-defined funcJons
– Windows ~1200 – Linux ~350
2-18
COMP 530: Opera.ng Systems
App
2-19
Hardware Libraries Kernel User Super- visor App Libraries App Libraries System Call Table (350—1200) Open file “hw1.txt” Ok, here’s handle 4
COMP 530: Opera.ng Systems
– Communicate through kernel-provided API
– App sends pdf to spooler – Spooler checks quotas, etc. – Turns pdf into printer-specific format – Sends reforma_ed document to device via OS kernel
2-20
COMP 530: Opera.ng Systems
App
2-21
Hardware Libraries Kernel User Super- visor App Libraries Daemon Libraries System Call Table (350—1200)
COMP 530: Opera.ng Systems
– Disk blocks vs. specific types of disks
– E.g., Disks, video cards, network cards, keyboard – Think Java abstract class – SomeJmes called a hardware abstracJon layer (HAL)
– Each implementaJon is called a device driver
2-22
COMP 530: Opera.ng Systems
App
2-23
Hardware Libraries Kernel User Super- visor App Libraries Daemon Libraries System Call Table (350—1200) HAL Driver Driver Driver
COMP 530: Opera.ng Systems
– Launches programs when you double click, etc. – Some program libraries call desktop daemon to render content, etc.
2-24
COMP 530: Opera.ng Systems
– Desktop, or window manager, or GUI
– Libraries (+ system calls and daemons)
– Device Driver API (or HAL)
2-25
COMP 530: Opera.ng Systems
– Time sharing: CPUs, disk arm
– Space sharing: RAM, disk space
– Exclusive use: mouse, keyboard, video card
COMP 530: Opera.ng Systems
– Including lots of device drivers
– Linux kernel – Gnu libc – X window manager daemon – CUPS printer manager – Etc.
2-27
COMP 530: Opera.ng Systems
– Pick versions that are tested to work together – Usually also includes a sopware update system
2-28
COMP 530: Opera.ng Systems
2-29
COMP 530: Opera.ng Systems
– Kernel wri_en in C (first one not in assembly)
– Several nice API abstracJons
– Linux is a Unix-like kernel
2-30
COMP 530: Opera.ng Systems
2-31
COMP 530: Opera.ng Systems
COMP 530: Opera.ng Systems
COMP 530: Opera.ng Systems
– Ok if you are not a C guru (you will be)
– RelaJvely short, and lots of useful exercises
COMP 530: Opera.ng Systems
– You should know C, or be prepared to remediate quickly – You must learn on your own/with lab partner
– Challenging work, but a very marketable skill
COMP 530: Opera.ng Systems
– Fixing a “heisenbug” has this property
– Get stuck on a hard, but solvable problem – Learn which strategies will get you moving again
COMP 530: Opera.ng Systems
COMP 530: Opera.ng Systems
– If you don’t do your exercises, you will be unprepared for ba_le – You’ve wasted your money and both of our Jme – It brings dishonor on the dojo when you lose every ba_le
– How do you learn to punch through a board? – You punch a board over and over unJl your fist goes through it
COMP 530: Opera.ng Systems
39
COMP 530: Opera.ng Systems
– List how many you use in slack.txt – Each day aper these are gone costs a full le_er grade on the assignment – If you work in a team, each member loses 1 hour for each hour late
– Holidays, weddings, research deadlines, conference travel, Buffy marathons, release of the next Zelda game, etc.
COMP 530: Opera.ng Systems
– Especially in a large class – No need to be a hero
– Piazza a list good for finding them
COMP 530: Opera.ng Systems
– Unwise to turn in a lab late to do challenge problems – Can complete challenge problems at any point in the semester---even on old labs
COMP 530: Opera.ng Systems
– QuesJons are encouraged!
– And as I get familiar with UNC students
COMP 530: Opera.ng Systems
– NB: This room not equipped for capture, so there will be some trial and error on my laptop – I will share on youtube with cs.unc.edu emails; if you don’t have one, please send me your youtube account
– Recordings may fail, be unwatchable, or get deleted by accident – Or be disconJnued if too many students stop a_ending
make sense
44
COMP 530: Opera.ng Systems
45
h_p://pages.cs.wisc.edu/~remzi/OSTEP/
COMP 530: Opera.ng Systems
– Reading other words can be helpful for reinforcement and clarificaJon
– Can’t ask the textbook quesJons
COMP 530: Opera.ng Systems
– Do not post code here or other soluJons – Goal: Everyone can learn from general quesJons
COMP 530: Opera.ng Systems
– And randomly assigned teams
– A lot of work – The material is cumulaJve
48
COMP 530: Opera.ng Systems
– Except private issues for instructor only
COMP 530: Opera.ng Systems
– Send them to me in advance of the test, if I like them, I will use them – Do NOT share with anyone else
COMP 530: Opera.ng Systems
– Note that “by appointment” means more Jme available on demand
COMP 530: Opera.ng Systems
– Do academic honesty homework – Lab 0 out