Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ################
- YOUR INFO
- ################
- Name1: Kelvin He
- EID1: kh33866
- CS login: kelvinhe
- Email: kelvinhe1995@gmail.com
- Unique Number: 51095
- Slip days used:
- ****EACH student submits a (unique) design document.****
- ################
- YOUR PARTNER'S INFO
- ################
- Name1: Rambo Wu
- EID1: rw24388
- CS login: rambowu
- Email: rambo.wu95@gmail.com
- Unique Number: 51090
- Your partner's ranking (scale below):
- ################
- PARTNER EVALUATION SCALE
- ################
- Excellent: Consistently went above and beyond - tutored others, carried
- more than his/her fair share of the load.
- Very Good: Consistently did what he/she was supposed to do, very well
- prepared and cooperative.
- Satisfactory: Usually did what he/she was supposed to do, minimally
- prepared and cooperative.
- Marginal: Sometimes failed to show up and/or rarely prepared.
- Deficient: Often failed to show up and/or rarely prepared.
- Unsatisfactory: Consistently failed to show up and/or unprepared.
- Superficial: Practically no participation.
- No Show: No participation at all.
- ################
- Preliminaries
- ################
- (1) If you have any preliminary comments on your submission, notes for
- the TAs, or extra credit, please give them here.
- (2) Please cite any offline or online sources you consulted while
- preparing your submission, other than the Linux documentation,
- course text, and lecture notes.
- ################
- Questions regarding Part 0
- ################
- (1) How many child processes are created when doFib() begins with
- an input of 5? Show the return value for each child process, numbering
- the processes beginning with 0 (the original process) and incrementing for
- each child process.
- 14 child processes are created when doFib is run with an input of 5.
- 0 - 5
- 1 - (Child of process 0) 2
- 2 - (Child of process 0) 3
- 3 - (Child of process 1) 1 (base case)
- 4 - (Child of process 1) 1
- 5 - (Child of process 2) 1
- 6 - (Child of process 2) 2
- 7 - (Child of process 4) 0 (base case)
- 8 - (Child of process 4) 1 (base case)
- 9 - (Child of process 5) 0 (base case)
- 10 - (Child of process 5) 1 (base case)
- 11 - (Child of process 6) 1 (base case)
- 12 - (Child of process 6) 1
- 13 - (Child of process 12) 0 (base case)
- 14 - (Child of process 12) 1 (base case)
- (2) In part 0.3, which flavor of exec did you choose to use? Why?
- We used execve because we already used parseline earlier to get the filename.
- ################
- Questions regarding Part 1
- ################
- (1) In the provided utility function Signal(), what does the call to
- sigaction() do? Why was sigaction() used instead of signal()?
- (2) What is the last assembly language instruction executed by the
- signal handler function that you write? (You may choose either signal
- handler.)
- (3) After the instruction identified in the previous question executes,
- what is the next assembly language instruction executed?
- (4) When the signal handler finishes running, it must restore all of
- the registers from the interrupted thread to exactly their values
- before the signal occurred. How is this done?
- ################
- Questions regarding Part 2
- ################
- (1) In msh.c, we use three separate signal handlers to catch our signals.
- You can also use a single signal handler to catch all three signals. Is
- there a design advantage of one over the other? Explain your answer.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement