Exam 1 Flashcards
Simple OS Definition?
P1L2: Introduction to Operating Systems
Special piece of software that abstracts and arbitrates the use of a computer system
Arbitration (manage hardware) | Abstractions (simplify view of hardware)
P1L2: Introduction to Operating Systems
High-level OS tasks?
How is an OS like a Toy Shop Manager?
P1L2: Introduction to Operating Systems
- Direct operational resources - control use of hardware resources
- Enforce working policies - fair resource access/limit resource usage/etc
- Mitigates difficulty of complex tasks - abstract hardware details (system calls)
P1L2: Introduction to Operating Systems
What does a computing system consist of?
P1L2: Introduction to Operating Systems
- Processing Element - CPUs (CPUs with multiple cores have multiple processing elements)
- Memory - RAM
- Network Interconnects - WiFi Card / Ethernet ports
- Graphical Processing Elements - GPUs
- Storage - HDDs, SSDs, Flash Devices (USB drives)
All are hardware components, and typicall are used by multiple apps
P1L2: Introduction to Operating Systems
What is an Operating System?
P1L2: Introduction to Operating Systems
A layer of systems software that sits between the hardware and the software applications.
* Directly has privileged access to the underlying hardware.
* Hides hardware complexity.
* Manages hardware on behalf of one or more applications according to some predefined policies.
* Ensures applications are isolated and protected from one another.
There is not ONE formal definition of what an OS is.
P1L2: Introduction to Operating Systems
What are the roles of an OS?
P1L2: Introduction to Operating Systems
- Hide hardware complexity from both the applications and application developers.
- Manages the resources of the hardware on behalf of the executing applications.
- Ensures that each application is appriopriately isolated and protected so that they may complete their task(s).
P1L2: Introduction to Operating Systems
Which of the following are likely components of an operating system?
* File Editor
* File System
* Device Driver
* Cache Memory
* Web Browser
* Scheduler
P1L2: Introduction to Operating Systems
- File System
- Device Driver
- Scheduler
P1L2: Introduction to Operating Systems
Indicate for each of the following options whether they are an example of Abstractions (B) or Arbitration (R).
* Distributing memory between multiple processes
* Supporting different types of speakers
* Interchangeable access of hard disk or SSD
Arbitration (manage hardware) | Abstractions (simplify view of hardware)
P1L2: Introduction to Operating Systems
- Distributing memory between multiple processes - Arbitration (R)
- Supporting different types of speakers - Abstractions (B)
- Interchangeable access of hard disk or SSD - Abstractions (B)
P1L2: Introduction to Operating Systems
What are some examples of OS environment types?
P1L2: Introduction to Operating Systems
- Desktop
- Embedded
- Ultra High-end machines (mainframes)
P1L2: Introduction to Operating Systems
What are examples of Desktop OS environments?
P1L2: Introduction to Operating Systems
- Microsoft Windows
- Unix-based (MacOS X [BSD], Linux)
P1L2: Introduction to Operating Systems
What are examples of Embedded OS environments
P1L2: Introduction to Operating Systems
- Andriod
- iOS
- Symbian
P1L2: Introduction to Operating Systems
What are some OS Abstraction examples?
P1L2: Introduction to Operating Systems
- Process
- Thread
- File
- Socket
- Memory Page
P1L2: Introduction to Operating Systems
What are some OS Mechanisim examples?
P1L2: Introduction to Operating Systems
- Create
- Schedule
- Open
- Write
- Allocate
P1L2: Introduction to Operating Systems
What are some OS Policy examples?
P1L2: Introduction to Operating Systems
- Leas-Recently Used (LRU)
- Earliest Deadline First (EDF)
P1L2: Introduction to Operating Systems
OS Design Principles
Describe “Separation of Mechanism & Policy”
P1L2: Introduction to Operating Systems
- Implement flexible mechanisms to support many policies
- Examples: LRU, LFU, random
P1L2: Introduction to Operating Systems
OS Design Principles
Describe “Optimize for Common Case”
P1L2: Introduction to Operating Systems
Based on the Common Case, pick a policy/policies that make support this Common Case given the underlying mechanisms and abstractions available/supported.
Questions used to determine Common Case:
* Where will the OS be used?
* What will the user want to execute on that machine?
* What are the workload requirements?
P1L2: Introduction to Operating Systems
What are the modes computer platforms typically distinguish?
P1L2: Introduction to Operating Systems
- (Unprivileged) User-Level - applications
- (Privileged) Kernel-Level - operating systems with direct hardware access
P1L2: Introduction to Operating Systems
Can you switch from User to Kernal modes?
P1L2: Introduction to Operating Systems
Yes most modern hardware supports switching from User to Kernal modes, if a special bit within the CPU is set.
P1L2: Introduction to Operating Systems
What are Trap Instructions?
P1L2: Introduction to Operating Systems
Special instructions that can be used to switch to Kernal mode, initiated when user-level applications attempt a kernal-level task.
The OS will determine if the task should be allowed, and if so switch to kernal-level and exceute the task.
P1L2: Introduction to Operating Systems
What are System Calls?
P1L2: Introduction to Operating Systems
OS provide an interface, a set of operations that applications can invoke, allowing specific kernal-level services/tasks to be executed on their behalf.
- open (file)
- send (socket)
- mmap (memory)
P1L2: Introduction to Operating Systems
What are Signals?
P1L2: Introduction to Operating Systems
A mechanism for the operating system to pass notifications into applications.
P1L2: Introduction to Operating Systems
What must an Application do to make a System Call?
P1L2: Introduction to Operating Systems
- Write arguments
- Save relevant data at well-defined location
- Execute/make system call
P1L2: Introduction to Operating Systems
What is does it mean when System Calls are executed in “Synchronous Mode?”
P1L2: Introduction to Operating Systems
The Application will wait until the System Call is fully completed before moving to the next step/task.
P1L2: Introduction to Operating Systems
What impact can User/Kernal Transitions have?
P1L2: Introduction to Operating Systems
- Are not cheap in terms of resource usage (cache memory)
- Can cause a switch of locality (hardware cache affected)
P1L2: Introduction to Operating Systems
Describe Hot and Cold Cache
P1L2: Introduction to Operating Systems
- Hot - an application is accessing the cache when it contains the data/addresses it needs
- Cold - an application is accessing the cache when it does not contain the data/address it needs, forcing it to retrieve the data/address from main memory
P1L2: Introduction to Operating Systems