Chapter 2 Flashcards
What is the role of an OS?
A computer is a set of resources for the movement, storage and processing of data
The OS is responsible for managing these resources
What are the key interfaces of an OS?
The key interfaces are:
- The instruction set architecture (ISA)
- Application Binary Interface (ABI)
- Application Programming Interface (API)
What is a simple batch system?
Early computers were really expensive, so we had simple batch systems which allowed users to submit jobs to a computer, which the computer would execute and would display results back to a monitor when finished.
What is the processor point of view?
- The processor executes instructions from memory containing the monitor
- Executes the instructions in the user program until it requires the ending or an error condition
What are two modes of operation?
- User mode
- Kernel Mode
What are the differences between user-mode and kernel-mode?
- User program executes in user mode, vs a monitor executing a program in kernel mode.
- User-mode priveledges prevents certain instructions from being executed, where as in kernel mode, any instruction may be executed
- User-mode prevents certain areas of memory from being accessed whereas kernel mode does not.
What is Uniprogramming?
Uniprogramming is wehre the processor spends a certain amount of time executing, until it reaches an I/O instruction; it must then wait until that I/O instruction finishes before proceeding
What is Multiprogramming? Is it better than Uniprogramming?
When one job needs to wait for I/O to finish, the processor can switch to another job which is likely not waiting for I/O.
It is better than uniprogramming because it utilizes the processor better while waiting for an I/O operation to finish.
What is time slicing?
Time slicing is where a short amount of time is allotted to a user or program on a multiprogramming or time shared system.
When it was time to switch, old user programs and data are written out to disk.
The old user prgoram code and data were restored in main memory when the program was next given a turn
What is a process?
There are multiple definitions of a process (any of them are fine):
- A program in execution
- An instance of a running program
- The entitty that can be assigned to, and executed on, a processor
- A unit of activity characterized by a single sequential thread of execution, a current state, and an associated set of system resources.
- Simply put, some sort of task, executed by a procesor.
What are the 4 main causes of errors in an O.S?
- Improper synchronization (Improper design of callbacks/signaling mechanisms can result in loss or duplication)
- Nondeterminate program operation (order in which programs are scheduled may affect their outcome)
- Failed mutual exclusion (when more than one user/program/thread attemps to make use of a shared resource at a time)
- Deadlocks (two or more programs waiting on each other)
What are the 3 components of a process?
- An executable program
- The associated data needed by the program (variables, methods, etc)
- The execution context (or “process state”) of the program
What is “Paging”?
Paging allows processes to be comprised of an umber of fixed-size blocks called pages.
A program references a word by means of a virtual address
- Consists of a page number an offset within the page
- Each page may be located anywhere in main memory
- Provides for a dynamic mapping between the virtual address used in the program and a real (or physical) address in main memory.
What policies must resource allocation consider?
- efficiency
- fairness
- differential responsiveness
What is multithreading?
- Technique in which a process, executing an application, is divided into threads that can run concurrently.