CSCE3600 - Final Flashcards

1
Q

groups sequences of tokens from from the lexical analysis phase into phrases

A

syntax analyzer or parser

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

obtain tokens from lexical analyzer

A

syntax analyzer or parser

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

determine the statement class

A

syntax analyzer or parser

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

group tokens into statements

A

syntax analyzer or parser

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

construct hierarchical structures called parse trees

A

syntax analyzer or parser

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

takes input from the syntax analysis phase

A

semantic analysis

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

takes input in form of parse tree and symbol table

A

semantic analysis

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

determine if input has a well defined meaning

A

semantic analysis

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

concerned with type checking and type coercion based on type rules

A

semantic analysis

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

scans code from left-to-right, character-by-character, and groups into lexemes

A

lexical analyzer or scanner

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

outputs a sequence of tokens to the syntax analyzer

A

lexical analyzer or scanner

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

works in a uniprocessor environment only

A

interrupt

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

generates a piece of data, put it into the buffer and start again

A

producer

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

consuming the data (remove from buffer) one piece at a time

A

consumer

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

try not to add data into the buffer if it’s full

A

producer problem

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

try not to remove data from empty buffer

A

consumer problem

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q
int flag[2] = {FALSE, FALSE};
int turn = 0;
flag[i] = true;
turn = 1 - i;
while (flag[1 - i] && turn == 1 - i;
CSi;
flag[i] = FALSE;
A

peterson’s algorithm

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

cannot affect or be affected by the execution of another process

A

independent process

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

can affect or be affected by other processes executing in the system

A

cooperating process

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

each process waiting for a message from the other process

A

deadlock

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

two processes sending messages to each other while another process waits for a message

A

starvation

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

what does atomic operation mean

A

non-interruptible

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

three solutions to the critical-section problem

A

mutual exclusion, progress, and bounded waiting

24
Q

also called mutex locks

A

binary semaphores

25
more restrictive version of semaphores that may take on a value of 0 or 1
binary semaphore
26
used to write to a memory location and return its old value as a single atomic operation
test-and-set()
27
only process that may enter critical section is one that finds shared variable set to 0; when done, resets shared variable to 0
test-and-set()
28
refers to mutual exchanging of values of the variables
swap()
29
exchanges contents of register with that of memory location
swap()
30
when two or more processes try to use the same resource at the same time
race condition
31
race conditions need
concurrency, shared object, change state
32
a lock that causes a process/thread trying to acquire it to simply wait in a loop while repeatedly checking if the lock is available
spinlock
33
where shared data is accessed
critical section
34
ensure that when one process is executing in its critical section, no other process is allowed to execute
critical section problem
35
if a page's reference bit is set to 1
set its reference bit to zero and skip it
36
if a pages reference bit is set to 0
select this page for replacement
37
second chance clock algorithm always starts the search ___
from where the last search left off
38
ordered list of pages accessed as process executes
reference string
39
if page size is 100 what are the reference string of: | 123, 215, 600, 1234, 76, 96
1, 2, 6, 12, 0, 0
40
holds virtual address to physical address
page table
41
memory is partitioned into chunks called
pages
42
the oldest page in physical memory is the one selected for replacement
First-in First-out
43
replace the page that will not be referenced for the longest time
belady's min
44
replace the page in memory that has not been accessed for the longest time
least recently used
45
does not consider page usage
first-in first-out
46
page that has been written to
dirty page
47
before a dirty page can be replaced it must
be written to disk
48
effective access time formula
( 1 - p ) * ( memory access time ) + p * ( page fault overhead )
49
components that make up page fault overhead
fault service time, read page time, restart process time
50
total memory space exists to satisfy a request, but it is not contiguous
external fragmentation
51
allocated memory may be slightly larger than requested memory
internal fragmentation
52
reduce external fragmentation
compaction
53
shuffle memory contents to place all free memory together in one large block
compaction
54
each whole list; choose block that comes closest to matching the needs of allocation
best fit
55
scan the list for the first block that comes closes to matching the needs of allocation
first fit
56
choose block that worst matches the request
worst fit
57
scan the list for first block that comes closest to matching the needs of allocation
next fit