Use LEFT and RIGHT arrow keys to navigate between flashcards;
Use UP and DOWN arrow keys to flip the card;
H to show hint;
A reads text to speech;
21 Cards in this Set
- Front
- Back
Two units in a CPU |
1) Control Unit 2) Arithmetic and Logic Unit |
|
What connects to a CPU |
Input/Output, secondary and primary memory (RAM) |
|
Interrupt |
a signal that tells of a change in a program or hardware |
|
clock |
regular pulse that signals the beginning of an action |
|
address |
location within memory in bytes |
|
kinds of multiprocessor |
1) tightly coupled (shared clock & memory) 2) loosely coupled (each CPU is autonomous) |
|
kinds of tightly coupled processor |
1) symmetric multiprocessing: all working on same program 2) asymmetric multiprocessing: all working on one program |
|
goal of multiprogramming |
keep CPU busy at all times by swapping jobs in and out |
|
timesharing |
swap users in and out of CPU so all users can work seemingly simultaneously |
|
what does OS keep track of for process management? |
-address of program -location of next instruction -process table (current values) -child processes |
|
mounting |
add (usually external) file system to current file system |
|
virtual machines |
run code independent of platform, like JVM (java virtual machine) |
|
two main functions of an operating system |
1) provide a layer of abstraction to users and applications to make them easier to use 2) handle resource allocation and usage, such as memory, processors, and input/output devices |
|
on early computers, every byte of data read or written was handled by CPU. what implications does this have for multiprogramming? |
multiprogramming would not be possible as we wouldn't be able to save midway values within memory, so we'd have to run everything sequentially |
|
two CPUs, each with two threads. Three programs, P0, P1, and P2, which each take 5, 10, and 20 msec, respectively. How long will execution of all three take? |
P0 and P1 on one CPU and P2 on the second, will take 20 msec |
|
Why are part of interrupt handlers written in assembly language? |
certain actions required of input handlers are unable to be performed by high level languages, and so must be done in assembly language. these actions include saving registers into the process table and setting the stack pointer |
|
formula for CPU utilization |
1-p^n where p = % time spent waiting for I/O to complete and n = number of processes |
|
.h files |
lists of declarations of variables and methods used in code files which can then be imported by compiler.
improves organization and removes redundancy in code |
|
.o files |
translated binary instructs of C++ code to be executed by CPU |
|
what does the preprocessor do when compiling C++ files? |
puts header files into .c files and turns into .o files |
|
what does the linker do when compiling C++ files? |
combines all .o files into one file, and makes adjustments so the output a.out file will be executable |