Week7 Flashcards

1
Q

What’s a dirtybit?

A

A bit in a page that say whether or not that page has been modified

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

What is the FIFO replacement algorithm?

A

First in first out, Page that is replaced is the oldest page

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

What is the LRU algorithm?

A

Past behaviour predicts future behaviour. In essence, the page referenced longest ago gets replaced

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

What is the optimal algorithm?

A

Knock out the page that will not be referenced for the longest period of time

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

What is global vs local Frame allocation?

A

Local: A frame is picked that is already owned by the process. Therefore, there is a set amount of frames to pick from
Global: A frame can be from another process. Dynamic!

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

What is Thrashing

A

When the CPU is always paging (swapping pages), resource intensive.

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

If page fault rate is too small….

A

Then take frames away

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

What’s a segment

A

A logical address space to store parts of a program (code, stack, libraries). Is eventually transferred to a physical address through the MCU

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

How does the segmentation process work? (hint, CPU to…)

A

CPU (in logical address) -> MCU -> Ram (physical address)

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

what does * do?

A

It’s a bash wildcard

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

what does “quotes” do vs ‘quotes’

A

”” or {} is evaluated, ‘’ is not

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

How do you do a bash variable

A

destDir=/home/student/trd/lab4/dest then to call: echo $destDir

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

______ is by default a read only file connected to the terminal window

A

stdin

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

How do you write an if statement in bash?

A
if test command ; then true commands
elif another test command ; then otherwise true commands
else
false commands
fi
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

How do you write an while statement in bash

A

while (( i < 10)) ; do
echo $i (( i++ ))
done

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

What does shift do?

A

shift shifts the position arguments $2 → $1, $3 → $2, $4 → $3, etc.

17
Q

What does find /home/student -name ‘*.c‘ do?

A

find all .c files in home/student-name

18
Q

What does grep do?

A

allows for searching

19
Q

What does sed do?

A

Allow changes to a file inside of a shell