CSCE3600 - Final Flashcards Preview

Programming > CSCE3600 - Final > Flashcards

Flashcards in CSCE3600 - Final Deck (57):
1

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

syntax analyzer or parser

2

obtain tokens from lexical analyzer

syntax analyzer or parser

3

determine the statement class

syntax analyzer or parser

4

group tokens into statements

syntax analyzer or parser

5

construct hierarchical structures called parse trees

syntax analyzer or parser

6

takes input from the syntax analysis phase

semantic analysis

7

takes input in form of parse tree and symbol table

semantic analysis

8

determine if input has a well defined meaning

semantic analysis

9

concerned with type checking and type coercion based on type rules

semantic analysis

10

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

lexical analyzer or scanner

11

outputs a sequence of tokens to the syntax analyzer

lexical analyzer or scanner

12

works in a uniprocessor environment only

interrupt

13

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

producer

14

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

consumer

15

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

producer problem

16

try not to remove data from empty buffer

consumer problem

17

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;

peterson's algorithm

18

cannot affect or be affected by the execution of another process

independent process

19

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

cooperating process

20

each process waiting for a message from the other process

deadlock

21

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

starvation

22

what does atomic operation mean

non-interruptible

23

three solutions to the critical-section problem

mutual exclusion, progress, and bounded waiting

24

also called mutex locks

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