PROGRAMMING; EXAM 2 REVIEW
QUESTIONS AND ANSWERS
A parser will NOT check to see that the input is semantically correct - ANSWER-
Child processes canNOT change variables in its parent process - ANSWER-
new processes are created by the *fork()* system call - ANSWER-
*exec()* is.. - ANSWER-a functionality of an operating system that runs an executable
file in the context of an already existing process, replacing the previous executable
Two UNIX/Linux processes may simultaneously have open file descriptors that... -
ANSWER-refer to the same open file description
INET domain sockets can only send messages to... - ANSWER-a different machine
The UNIX/Linux OS does NOT allow multiple processes per thread - ANSWER-
What is a limitation of unnamed pipes? - ANSWER-Only the process that created them
and its descendents may use the pipe
Which *pthread* operation can be used to accomplish synchronization between
threads? - ANSWER-*pthread_join()*
A function is said to be thread-safe if.. - ANSWER-it can be called from multiple threads
without unwanted interation between the threads
For a given mutex, if 1+ threads are blocked on a call to *pthread_mutex_lock()* and the
thread that is holding the lock calls *pthread_mutex_unlock()*.. - ANSWER-exactly one
of the unblocked threads will be unblocked and thus able to lock the mutex
*pthread_exit* is - ANSWER-a Pthead function that terminates the calling thread and
makes the value (*value_ptr*) available to any successful join with the terminting thread
User level context contains.. - ANSWER-all the states necessary to run a program, such
as the stack, text segment, data section, and heap
Three file descriptors associated with every UNIX/Linux process are.. - ANSWER-
standard input
standard output