Test 2 Part 1 Flashcards

1
Q

Size of the cache in blocks?

A

Bytes / Bytes per block

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

How many writes occur?

A

Every time it gives a variable a value it is writing to it, so multiply the for loops

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Capacity Miss?

A

Capacity misses occur when the amount of data referenced by a program exceeds the capacity of the cache

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Cold Miss

A

This happens when an object is given a value

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Synchronous Events are Caused by?

A

instruction currently being executed

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Asynchronous events are caused by

A

Something outside of the program

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Trap

A

Is intentional and requested by running program

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Fault

A

Is unintentional and recoverable

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Abort

A

Unintentional and unrecoverable

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Fork outputs must include

A

Both the parent and child processes

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What does wait(NULL) do?

A

Waits for child process to terminate

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What does flush() do?

A

Flushs input after it is printed

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Size of points array

A

(64*64)/bytes per block

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

hardware multiprocessing

A

System Timer: At regular intervals, the system timer goes off which causes control to be transferred to the OS scheduler.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Software multiprocessing

A

Schedular: Chooses a process to run from a set of ready to run processes.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

SIGCHLD

A

The SIGCHLD signal is sent to a process when a child processterminates, is interrupted, or resumes after being interrupted.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

What process reaps the parent process

A

the shell

18
Q

what process reaps the child process

A

init process

19
Q

What process reaps the grandchild

A

process the child process

20
Q

What process executes the handler

A

The process that receives the SIGCHLD process

21
Q

Where is a.out executed?

A

foreground, & makes it run in the background

22
Q

What are the two primary system functions that the shell causes when a.out is ran, and what do they do

A

Fork: Creates child process
Exec: Called by child to run a different program

23
Q

What prevents the shell from redisplaying the shell prompt right away rather than after a few seconds when the program completes?

A

the shell has a loop to wait for the child process to terminate

24
Q

how is a builtin cmd handled differently by the shell

A

it doesn’t run either fork or exec

25
Q

what signal will be sent to the shell when ctrlC is pressed?
what signal will be sent to the loopforever process?

A

Sends a SIGINT & SIGCHLD
SIGINT

26
Q

What is Internal Fragmentation

A

This is space that isn’t used for the payload (headers, footers, padding) inside an allocated block (fixed block)

27
Q

What is external fragmentation

A

When there is enough heap memory but not enough space in a single free block

28
Q

What is memory utilization?

A

Memory utilization is the % of heap that is used for payloads, fragmentation decreases this.

29
Q

Define throughput

A

Number of requests per unit of time

30
Q

Which free list provides a higher throughput?

A

Explicit, it uses pointer which is faster

31
Q

Difference between explicit and implicit free list?

A

Explicit only contains free blocks
Implicit contains free blocks and allocated blocks

32
Q

Define virtual memory

A

Mechanism that allows process to share primary memory so they are executed concurrently (execution times overlay)

33
Q

what is a page fault?

A

address is good but page is not, in DRAM

34
Q

what is a seg fault?

A

address is bad

35
Q

Coalescing is performed to avoid?

A

External fragmentation

36
Q

Why is the footer important?

A

Helps find previous block to coalesce, only needed on free blocks.

37
Q

Physical Page

A

Same as page frame, same size as VP (in bytes)

38
Q

Values that are initialized already when ready to use are stored

A

in the data section

39
Q

Memory pointed to by a pointer is stored

A

in the heap

40
Q

Misc variables are stored in the

A

stack

41
Q

Breakdown physical block

A

ppn[ct], ppo[ct, ci, c0(0)]

42
Q

Breakdown virtual block

A

vpn[index(15), tag], vpo