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
Q

more restrictive version of semaphores that may take on a value of 0 or 1

A

binary semaphore

26
Q

used to write to a memory location and return its old value as a single atomic operation

A

test-and-set()

27
Q

only process that may enter critical section is one that finds shared variable set to 0; when done, resets shared variable to 0

A

test-and-set()

28
Q

refers to mutual exchanging of values of the variables

A

swap()

29
Q

exchanges contents of register with that of memory location

A

swap()

30
Q

when two or more processes try to use the same resource at the same time

A

race condition

31
Q

race conditions need

A

concurrency, shared object, change state

32
Q

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

A

spinlock

33
Q

where shared data is accessed

A

critical section

34
Q

ensure that when one process is executing in its critical section, no other process is allowed to execute

A

critical section problem

35
Q

if a page’s reference bit is set to 1

A

set its reference bit to zero and skip it

36
Q

if a pages reference bit is set to 0

A

select this page for replacement

37
Q

second chance clock algorithm always starts the search ___

A

from where the last search left off

38
Q

ordered list of pages accessed as process executes

A

reference string

39
Q

if page size is 100 what are the reference string of:

123, 215, 600, 1234, 76, 96

A

1, 2, 6, 12, 0, 0

40
Q

holds virtual address to physical address

A

page table

41
Q

memory is partitioned into chunks called

A

pages

42
Q

the oldest page in physical memory is the one selected for replacement

A

First-in First-out

43
Q

replace the page that will not be referenced for the longest time

A

belady’s min

44
Q

replace the page in memory that has not been accessed for the longest time

A

least recently used

45
Q

does not consider page usage

A

first-in first-out

46
Q

page that has been written to

A

dirty page

47
Q

before a dirty page can be replaced it must

A

be written to disk

48
Q

effective access time formula

A

( 1 - p ) * ( memory access time ) + p * ( page fault overhead )

49
Q

components that make up page fault overhead

A

fault service time, read page time, restart process time

50
Q

total memory space exists to satisfy a request, but it is not contiguous

A

external fragmentation

51
Q

allocated memory may be slightly larger than requested memory

A

internal fragmentation

52
Q

reduce external fragmentation

A

compaction

53
Q

shuffle memory contents to place all free memory together in one large block

A

compaction

54
Q

each whole list; choose block that comes closest to matching the needs of allocation

A

best fit

55
Q

scan the list for the first block that comes closes to matching the needs of allocation

A

first fit

56
Q

choose block that worst matches the request

A

worst fit

57
Q

scan the list for first block that comes closest to matching the needs of allocation

A

next fit