01 - Intro to Operating SystemsOutlineReading: MOS 1.1What is an OS?1)2)3)4)Where does the OS fit in?Short answer:A software abstraction layer and resource manager.First, what does the OS fit into?Let's look at a relatively simple computer.A Raspberry Pi.Usually you use multiple applications or programsrunning in a User Interface (UI).It would be prohibitively difficult for applicationsto manage hardware directly: - domain knowledge - resource contention - trustThe operating system provides an API thatprograms can use to access hardware capabilitieswithout needing to manage hardware componentsdirectly.We've already identified 2: > Abstraction of hardware (extended machine) - Ex: file systems to access disk memory - Hide the ugly from application programmers > Management of hardware (resource manager) - Enable concurrency/parallelism - Memory + I/O management/protection - Multiplex (share) resources in time and spaceAdditionally: > Security - Enforce access control - Process isolationIt's not the UI alone.This course focuses on the kernel.System Stack:Even though it so small, there's a lot going on.We need to take all this hardware and turn it intosomething useable.Every component requires non-trivial code to bemanaged correctly.- Dedicated hardware controllers help, butaren't a replacement.And that's peanuts compared to a full mainboard.This one is from ~2005.Now they look all space-y.Some examples you may be familiar with:- Windows- macOS- Linux - Debian - Ubuntu - Arch Linux - Android - Kali Linux - too many...Some examples you may not be familiar with:- Minix- Multics- OpenSolaris - illumos- BSD - FreeBSD - OpenBSD - NetBSD- VxWorks- ZephyrOS- FreeRTOS- QNXWhat are its main functions?What is considered an OS?What is an OS?Where does the OS fit in?GPIO, SPI, I2C, UART, SDA, PWM, ...USBDSI DisplayCSI CameraAudioHDMIPowerBCM 2835SoCEthernetControllerText UI (TUI)Graphical UI (GUI)User InterfaceBrowserTerminalEditorOperating SystemHardwareSoftwareMOS Figure 1-1What are its main functions?What is considered an OS?UIsRaspi 3 Diagramasrock k7vt4a pro mainboardgigabyte x570 elite mainboardHardwareApplicationHypervisor/VM monitorCore Runtime LibrariesUser InterfaceCompilerRuntime LibrariesKernelKernelExtensionKernelExtensionOSSystemSoftwareKernel Mode(privileged)User Mode(unprivileged)system stack