CSCE3600 - Final Flashcards
groups sequences of tokens from from the lexical analysis phase into phrases
syntax analyzer or parser
obtain tokens from lexical analyzer
syntax analyzer or parser
determine the statement class
syntax analyzer or parser
group tokens into statements
syntax analyzer or parser
construct hierarchical structures called parse trees
syntax analyzer or parser
takes input from the syntax analysis phase
semantic analysis
takes input in form of parse tree and symbol table
semantic analysis
determine if input has a well defined meaning
semantic analysis
concerned with type checking and type coercion based on type rules
semantic analysis
scans code from left-to-right, character-by-character, and groups into lexemes
lexical analyzer or scanner
outputs a sequence of tokens to the syntax analyzer
lexical analyzer or scanner
works in a uniprocessor environment only
interrupt
generates a piece of data, put it into the buffer and start again
producer
consuming the data (remove from buffer) one piece at a time
consumer
try not to add data into the buffer if it’s full
producer problem
try not to remove data from empty buffer
consumer problem
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
cannot affect or be affected by the execution of another process
independent process
can affect or be affected by other processes executing in the system
cooperating process
each process waiting for a message from the other process
deadlock
two processes sending messages to each other while another process waits for a message
starvation
what does atomic operation mean
non-interruptible