Long Exam 1 - Operating Systems Flashcards
Complexity
Limits what can be built; causes unforeseen issues; mitigated by modularity and abstraction
System
A set of interconnected components with expected behavior observed at the interface with its environment
Modularity
Easier to reason about, manage, change, and improve; reduce fate-sharing; implements divide and conquer, independent, interchangeable, and reusable
Abstraction
Specify interface without specifying detailed implementation, decreases number of connection between modules; formulating generalized ideas or concepts by extracting common qualities and hiding their detailed implementation
Client-Server Model
Clear separation between a process that provide service and a process that need service over a network
Remote Procedure Call
A form of Inter-Process Communication which allows a process to call another process residing on another machine; high bandwidth and low propagation delay; design for local networking
Virtual Memory
Abstraction of main memory to allow us to manage memory more efficiently and with fewer errors; provides each process with a large, uniform, and private address space
Which components of a machine interacts in a virtual memory?
Hardware exceptions, hardware address translation, main memory, disk files, kernel software
What are the capabilities of a virtual memory?
Uses main memory efficiently by treating it as a cache for an address space stored on disk, keeping only the active areas in main memory, and transferring data back and forth between disk and memory; simplifies memory management by providing each process with a uniform address space; protects the address space of each process from corruption by other processes
What are the virtual memory states of pages?
Unallocated, Cached, and Uncached
Page tables
Determines if a virtual page is cached in DRAM; if yes, determine which physical page; if miss, the system must determine where the virtual page is on the disk, select a victim page in physical memory, and swap with virtual page from disk to DRAM
Operating System
Enforce modularity on a single system
What are the conditions in an operating system?
- Programs shouldn’t be able to refer to each other’s memory
- Programs should be able to communicate
- Programs should be able to share a CPU
Extended Instruction Pointer
Used to track the address
Memory Management Unit
Translate virtual address to physical address; gives illusion of large address space; dedicated to a single process; supports both virtual address translation and memory prediction
Naive Method
Store every mapping, virtual memory act as an index into the table
Space-Efficient Mapping
Map to pages in memory
Page Table Entries
Present Bit (P) - Is the page in DRAM?
Read/Write Bit (R/W) - Is the program allowed to write to the address?
User/Supervisor Bit (U/S) - Does the program have access to this address?
What are the benefits of naming?
Retrieval, sharing, user-friendliness, addressing, access control, indirection
What are the components of naming schemes?
Namespaces, set of values, and look-up algorithm
What is Domain Name Server?
DNS maps hostnames to IP addresses as routers only operate on IP addresses and not hostnames. This provides user-friendliness, load balancing, single values can have multiple names, and mappings can also change over time.
Describe the DNS algorithm.
Divide names into hierarchy, each zone contains its own mappings. Send request to root, which delegates down the tree.
Bounded Buffer
Stores up to N messages. Allow programs to communicate but tricky to implement due to concurrency.
Atomic Actions
Effectively happens all at once, all occurs or nothing at all
Locks
Allow only one CPU to be inside a piece of code at a time, allows to implement atomic actions. May cause race conditions, deadlocks, and performance issues.
Threads
Virtualizes a process so that multiple programs can share CPU.
yield()
Allows kernel to suspend the current thread and resume another
Condition variables
Waits for an event and notified when it occurs.
Preemption
Forces a thread to be interrupted to remove reliance on programmers correctly using yield(). Requires a special interrupt and hardware support to disable other interrupts.
Virtual Machine
Mechanism to manage complexity in computer system; partitions the design of a system into layers
Interface
Communication barrier between 2 boundaries; is linear and has hierarchal relationship; allows decoupling of computer design tasks
What are the disadvantages for interfaces?
- Software for one ISA will not run on hardware with a different ISA
- Binaries may not be optimized for the platform they run on
- Innovation may be inhibited by a fixed ISA
- Application software cannot directly exploit microprocessor implementation features
Virtualization
Removes constraints imposed by system interfaces and increases flexibility
What are the benefits of virtualization?
Isolation, flexibility, portability, security
Application Binary Interface
Instruction Set Architecture + system calls
Application Programming Interface
User ISA + library calls
Process Virtual Machines
Different guest and host ISA
Classic System VM
All guest and host software uses the same ISA
Hosted System VM
Virtualizing software built on top of existing OS
Whole System VM
Different ISAs for guest and host
How to improve performance?
- Measure system to find the bottleneck by comparing it to system model
- Relax the bottleneck (batch requests, caching, exploit concurrency, exploit parallelism)
What are the characteristics of conventional high performance computing machine?
Computer nodes are high-end processors; networks are specialized and high performance; storage are RAID disk arrays
What are the characteristics of typical high performance computing operations?
Long-lived processes, uses spatial locality, holds all data in memory, high-bandwidth communication
What are the strength of typical high performance computing operations?
High utilization of resources and suitable for scientific applications
What are high performance computing fault tolerance techniques?
Checkpoints and restoring after failure.