Final Flashcards
(107 cards)
Explain What CPU Registers are
Fast memory units on the CPU
- split into two categories: control and status registers and user-visible registers
What is the Program Counter
A register which contains the address of the next instruction to be fetched
What is the instruction Register?
Register containing instruction most recently fetched
Explain the Basic Instruction Cycle
- CPU fetches next instruction from memory
- CPU executes instruction
- Program counter is consulted for next instruction and incremented
- CPU must wait for IO to complete
Explain how Interrupts fit into the Instruction cycle
computers allow IO modules to interrupt the CPU. CPU checks for interrupts after each instruction
and if there are none fetches the next instruction from the current program. If an interrupt is found execution of program is suspended and interrupt handling is entered
Explain what an Interrupt Handler is
A program that determines the nature of the interrupt and responds accordingly. It then transfers control of the program back to the stored interrupt point of the program
List the 4 interrupt Classes
IO, Program exception, Timer, Hardware failure
Explain what happens with Multiple interrupts
further interrupts are disabled during an interrupt. Others remain pending until current interrupt is resolved. Interrupts have priority
Explain the three possible Communication techniques for IO operation
- Programmed IO - no interrupts (cpu must wait), IO module preforms actions on processors behalf
- Interrupt-driven IO - CPU can execute code during IO operation: it gets interrupted when IO happens - no needless waiting but takes a lot of processor time watching for interrupts
- Direct memory access - block of data is transferred directly from memory without going through CPU
Explain Cache memory
Small cache of expensive but extremely fast memory which interacts with larger slower memory. Cache is checked first to determine if info is present, if it is, info is used from cache. Otherwise, data is copied from main memory and temporarily stored in the cache
Explain Access Time
Time to bring referenced word into the processor
Access time for cache (T1) + access time for main memory (T2)= total access time (T)
if word in cache T= T1
What is an operating system and what are its goals?
An operating system is a program that acts as an intermediary between a user and the hardware by managing resources and conflicts
Goals:
- Execute user programs
- make the computer convenient
- use hardware efficiently
What is the Kernel
The one program running at all times on the computer. It operates on a different layer than things the user can access and is responsible for providing secure access to machines hardware.
Explain the Computer System Structure
Can be divided into 4 components
Hardware - cpu, memory, IO devices
Operating System - controls and coordinates use of hardware
Application programs - define the ways system resources are used
Users
Explain Storage structure
Main memory (RAM) - only large storage media CPU can directly access (volatile)
Secondary storage - extension of main memory that is non-volatile but can’t be directly accessed by CPU
What are priveleged Instructions?
Instructions that can only be executed in Kernel mode
What is the purpose of System Calls?
System calls allow user-level processes to request services of the operating system. system calls are
implemented using software interrupts. Realize that the OS is interrupt driven and that interrupts are received
both from the hardware and software as requests to perform some action.
Explain the two types of Multiprocessing
Asymmetric Multiprocessing - each processor is assigned a specific task but they are all running simultaneously
Symmetric - each processor performs all tasks
Explain Multi-programming
Multiprogramming organizes jobs so CPU always has one to execute. (a subset of total jobs kept in memory)
one job is selected and run. if a task has to wait on something (say an IO) OS switches to another job
What is a Process?
A process is a program in execution
What activities in regards to process management is the OS responsible for?
-Creating and deleting processes
-suspending and resuming processes
-providing mechanisms for process synchronization and communication
-providing methods to handle deadlocks
List the 5 Process states
new: process being created
running: instructions being executed
waiting: waiting for event
ready: waiting to be assigned to processor
terminated: finished executing
Explain the process control block (PCB)
Info associated with each process
- program counter - process state - Cpu registers - memory allocated to process - accounting info (cpu used, clock time elapsed) - IO devices allocated and open files
Explain the purpose of process scheduling?
Maximizes CPU use by quickly switching processes onto the CPU for time sharing. The process scheduler selects next execution from available processes