This preview has intentionally blurred sections. Sign up to view the full version.View Full Document
Unformatted text preview: COP4600 Operating Systems Tuba Yavuz-Kahveci October 9, 2007 Student Information Name: UFID: Signature: Important Note: There are four questions. Please read the questions carefully and write your answers on the relevant question page. Good luck! Questions 1. (20 pts) This question is on system calls and has two parts: (a) (6 pts) How is a system call different from a regular (i.e., user defined) function call at run-time? Explain. Answer: A system call causes a trap to the kernel and the CPU runs with kernel priviliges whereas a user defined function call doesn’t cause a trap to the kernel (and the CPU runs with user privilige) unless it makes a system call. 1 (b) (14 pts) Fill in the blanks. Put a single word for each blank. On a UNIX command prompt one can type a command in the form command1 | command2 which makes the parent process (the shell ) create two processes using the fork system call. One of the processes (P1) performs command1 and the other (P2) performs command2. Assigning a particular command to a process is achieved via the exec system call. Once P2 starts executing command2 it gets its input from P1, without being aware of where the data is coming from. Also, P2 outputs its data without being aware of where the data is actually flowing into. The communication between P1 and P2 is established via the pipe system call which is made by the parent process before the fork system call. When P1 stops producing output it calls the...
View Full Document
This test prep was uploaded on 04/18/2008 for the course COP 4600 taught by Professor Yavuz-kahveci during the Fall '07 term at University of Florida.
- Fall '07
- Operating Systems