This document discusses operating systems and their core abstractions like uninterrupted computation, infinite memory, and simple I/O. It describes how operating systems provide these abstractions using mechanisms like context switching, virtual memory, and system calls. It also covers different types of operating systems and characteristics of embedded operating systems like real-time capabilities.
4. Infinite memory via virtual memory
? Via virtual memory
? Page mapping (avoids finding contiguous locations).
? Demand paging (use more space than memory)
? Slow DRAM lookup avoided with fast TLB
? Protection by allowing only OS to modify page tables.
5. Simple I/O using system calls
? For abstraction alone, I/O could be libraries.
? For security, I/O handled by device drivers.
? System calls, trap to kernel protection levels.
? More expensive function call, because of privilege
escalation.
6. Four Types of Operating Systems
? Single-user, single task - Designed to manage the computer so that
one user can effectively do one thing at a time. Ex: Apple iPhone
? Single-user, multi-tasking - Type of operating system most use on
desktop and laptop computers today. Windows 7 and the MacOSX are
examples of OS that let a single user have several programs in
operation at the same time.
? Multi-user - Allows many users to obtain the computer's resources
simultaneously. OS must make sure that each program being used has
sufficient and separate resources so that a problem with one user
doesn't affect the other users. Ex: Unix
? Real-time operating system (RTOS) - Main task is to manage
computer¡¯s resources so a particular operation executes in precisely
the same amount of time every time it occurs.
18. Virtual Memory
? Memory Management Unit (MMU) manages
translation between code, data, and heap
process memory to physical memory
? Virtual addresses are unique to accessing
process
? Physical addresses are unique to the hardware
(i.e. ram)
35. 35
Execution Environment
Memory
b
STANDARD C
LIBRARY
MATH
LIBRARY
APPLICATION (mpg123)
Memory
Management
Filesystems
Networking
Architecture
Dependent
Code
Memory
Manager
File System
Devices
Character
Devices
Network
Subsystem
OPERATING SYSTEM
Process
Management
Device
Control
Network Interfaces
CPU
Disk
? Program
? Libraries
? Kernel
subsystems
? Hardware
48. In a Hard RTOS
? Thread priorities can be set by the client
? Threads always run according to priority
? Kernel must be preemptible or bounded
? Interrupts must be bounded
? No virtual memory