Basics Flashcards
What is address space?
The amount of memory allocated to something e.g. a program
Define program counter
The address in memory of the program instruction currently being executed
What are ‘registers’?
Fast storage available to the CPU
- instructions are ‘loaded’ into registers before execution
- separate from main memory
Define stack
An area of memory that is allocated to programs on demand
- used for a variable of a fixed size e.g. integers
Define heap
An area of memory that is allocated to programs on demand
- for variable of unknown size (complex ones)
What is similar about the heap and the stack? And what is different?
Both are an area of memory allocated to programs on demand
- stack is for variables of a fixed size, heap is for unknown size variables
Where do the instructions (of a program) need to be brought in order to execute the program?
Into the register (fast memory)
A process = program + ……
program + the state of all threads operating in the program
(a process is the program in execution)
What are the four main states a program can have?
0 - running on a processor
S - sleeping (waiting for an event to complete)
R - runnable (process is on run queue)
Z - zombie
What are signals?
A UNIX mechanism for controlling processes, it’s a message sent to the process that requires immediate attention
What are signals generated by?
Exceptions
E.g. user interrupt key, illegal instructions, child process calling exit
What does the command cntrl c do? What signal does it send?
Kills a process (interupt signal)
What does the command cntrl s do to a program?
Suspends or pauses the display of output