170 likes | 180 Views
This class provides a comprehensive introduction to operating systems, covering topics such as the definition and recognition of a kernel, hardware abstraction, and the illusion of simultaneity. Learn about I/O operations and the dual-mode of CPUs. Gain a solid understanding of multitasking and the storage hierarchy.
E N D
Syllabus • Meet Neighbors • Be Laid back • Ask ????
What is an O.S.? (Definition #1) The kernel. Book says kernel like a government -- decided allocation of resources. Deciding allocations and handling concepts central to O.S. Also provides hardware abstraction. How to recognize the kernel One program running all the time from boot to shutdown (the kernel). Runs at highest processor level. Not the "main application".
What is an OS (Definition #2) The kernel plus the standard set of utilities that come with the kernel. Shared libraries that provide the a common set of algorithms Provides a flavor (command line, icons, file name schemes, etc.) Definitions is loose -- others might disagree.
Computer System Hardware. Operating software. Applications. Users.
Storage Hierarchy • Remember: Volatile vs non-volatile
Multiprocessing continued • Run some process for • About 1/1,000 of a second Or They do an I/O that makes them wait • Repeat • They all seem to be moving along • Remember, movies are at 1/24th, TV is at 1/60th • And if there is more than one core???
How to do I/O (step 1) • Application makes a request of the OS that needs I/O. • Read/Write/Seek/Open • Request for memory • Run a program • Lots more • Application is typically paused here.
How to Do I/O (step 2) • O.S. translates this into an operation of a device • Get a sector of a HD, write a network packet, etc. • O.S. gives operation to device driver • Device driver loads parameters into registers • Last load should start the device
How to do an I/O (Step 3b) • Wait for op to finish • Run another process • Do something productive • How many CPU cycles?
How to do I/O (step 4) • Interrupt! • A hardware signal to the OS to stop and attend the hardware sending the interrupt. • Device driver and O.S. finishes operation • Maybe copy data where it goes • Maybe process data • Restart the process
Dual Mode • CPU starts in supervisor (monitor) mode • When an interrupt happens, go to monitor mode. • All I/O required monitor mode. • Memory access are checked to make sure you’re accessing only your stuff. • O.S. puts CPU in user mode before running any user process.
Vocab Review • Multitasking – Seem to do lots of things at the same time. • Dual mode – CPU has a privileged and a user mode • Interrupt – A hardware signal that alerts the CPU • Storage Hierarchy – Types of storage devices raging from cheap and capacious to fast.