Test 2 Part 1 Flashcards
Size of the cache in blocks?
Bytes / Bytes per block
How many writes occur?
Every time it gives a variable a value it is writing to it, so multiply the for loops
Capacity Miss?
Capacity misses occur when the amount of data referenced by a program exceeds the capacity of the cache
Cold Miss
This happens when an object is given a value
Synchronous Events are Caused by?
instruction currently being executed
Asynchronous events are caused by
Something outside of the program
Trap
Is intentional and requested by running program
Fault
Is unintentional and recoverable
Abort
Unintentional and unrecoverable
Fork outputs must include
Both the parent and child processes
What does wait(NULL) do?
Waits for child process to terminate
What does flush() do?
Flushs input after it is printed
Size of points array
(64*64)/bytes per block
hardware multiprocessing
System Timer: At regular intervals, the system timer goes off which causes control to be transferred to the OS scheduler.
Software multiprocessing
Schedular: Chooses a process to run from a set of ready to run processes.
SIGCHLD
The SIGCHLD signal is sent to a process when a child processterminates, is interrupted, or resumes after being interrupted.
What process reaps the parent process
the shell
what process reaps the child process
init process
What process reaps the grandchild
process the child process
What process executes the handler
The process that receives the SIGCHLD process
Where is a.out executed?
foreground, & makes it run in the background
What are the two primary system functions that the shell causes when a.out is ran, and what do they do
Fork: Creates child process
Exec: Called by child to run a different program
What prevents the shell from redisplaying the shell prompt right away rather than after a few seconds when the program completes?
the shell has a loop to wait for the child process to terminate
how is a builtin cmd handled differently by the shell
it doesn’t run either fork or exec
what signal will be sent to the shell when ctrlC is pressed?
what signal will be sent to the loopforever process?
Sends a SIGINT & SIGCHLD
SIGINT
What is Internal Fragmentation
This is space that isn’t used for the payload (headers, footers, padding) inside an allocated block (fixed block)
What is external fragmentation
When there is enough heap memory but not enough space in a single free block
What is memory utilization?
Memory utilization is the % of heap that is used for payloads, fragmentation decreases this.
Define throughput
Number of requests per unit of time
Which free list provides a higher throughput?
Explicit, it uses pointer which is faster
Difference between explicit and implicit free list?
Explicit only contains free blocks
Implicit contains free blocks and allocated blocks
Define virtual memory
Mechanism that allows process to share primary memory so they are executed concurrently (execution times overlay)
what is a page fault?
address is good but page is not, in DRAM
what is a seg fault?
address is bad
Coalescing is performed to avoid?
External fragmentation
Why is the footer important?
Helps find previous block to coalesce, only needed on free blocks.
Physical Page
Same as page frame, same size as VP (in bytes)
Values that are initialized already when ready to use are stored
in the data section
Memory pointed to by a pointer is stored
in the heap
Misc variables are stored in the
stack
Breakdown physical block
ppn[ct], ppo[ct, ci, c0(0)]
Breakdown virtual block
vpn[index(15), tag], vpo