CS360 Final -- December 10, 2002
Answers to Question 5
- A. Malloc() buffers the sbrk() system call. True.
See the Malloc lecture notes.
- B. Zombie processes waste a significant amount of memory. False.
They are just placeholder processes -- yes, they waste a process id and
enough information to return to wait(), but that is just a few
bytes. If you don't believe me, see this quote from the
exec/wait lecture notes:
By a "zombie", we mean that it takes up no resources, and doesn't run, but it is just being maintained by the operating system so that when the parent calls wait(), it will get the proper information.
- C. My program will typically generate a segmentation violation if I
try to overwrite the instructions in memory. True. See the
memory
lecture notes.
- D. Processes communicate through shared memory
with the fork() system call. False. They can only communicate
through the operating system.
- E. You can avoid catching the SIGPIPE signal if you
use threads. False. If your process tries to write to a pipe (or socket)
with no read end, it will generate SIGPIPE, and if you don't catch it,
your process will die. Even if you use threads.
- F. My program will typically generate a segmentation violation if I
try to write into memory that is above (less than) the
current value of the stack pointer. False. You get stack space by decrementing
the stack pointer -- the memory is already there.
See the Malloc lecture notes.
- G. Pipe() allows processes to communicate through a buffer
in the operating system. True. See the
pipe
lecture notes.
- H. Telnet allows me to write a server program that others
on the Internet may use effectively even if all they know is
my server's host name and port number. True. Telnet is a generalized
client program that serves that exact function.
Grading: 8 points
1 point for each question. I gave 3/4 credit for putting true
to part F, since technically all of the void is above the stack pointer.