ECE353-2010-Final - Systems Software Final Exam ECE353,...

Info iconThis preview shows pages 1–4. Sign up to view the full content.

View Full Document Right Arrow Icon
Systems Software Final Exam ECE353, Winter 2010 Student Number: Last Name: First Name: Total marks: ______ (90) Duration: 150 Minutes Examiner: A. Goel 1. Your exam will be eligible for remarking only if you use a pen. 2. Do not turn this page until you have received the signal to start. 3. This exam is closed textbook. You can use a single double-sided, hand-written cheat sheet. Use of computing and/or communicating devices is not permitted. 4. Do not remove any sheets from this test book. Answer all questions in the space provided. No additional sheets are permitted. 5. Work independently. The value of each part of each question is indicated. The total value of all questions is 90. 6. Write your student number and name in the space below. Do the same on the bottom of each sheet of this test book. There are a total of 21 sheets. Marking Guide Q1: ______ (18) Q5: ______ (12) Q2: ______ ( 9) Q6: ______ ( 8) Q3: ______ (10) Q7: ______ (10) Q4: ______ ( 8) Q8: ______ (15) Total: ______ (45) Total: ______ (45) 1
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Systems Software Final Exam ECE353, Winter 2010 For the multiple choice questions below, circle one or more of the true statements below. In the rest of this exam, ½ mark will be deducted for a wrong answer for any multiple choice question. A) copyin and copyout are used in OS161 to 1. Copy data from kernel to user space, and from user space to kernel respectively. 2. Copy data from user space to kernel, and kernel to user space respectively. 3. Copy data from kernel to device driver, and device driver to kernel respectively. 4. Copy data from device driver to kernel, and kernel to device driver respectively. B) Synchronization between waitpid and exit is required in OS161 because 1. waitpid returns exit value of child. 2. waitpid returns exit value of all children processes in hierarchy (e.g., grand child). 3. Parent may die before child exits. 4. Child may die before parent calls waitpid. C) The "func" argument in the md_initpcb function void md_initpcb(struct pcb *pcb, char *stack, void *data1, unsigned long data2, void (*func)(void *, unsigned long)); in OS161 is the 1. Starting address of a new thread is kernel mode. 2. Starting address of a new thread in user mode. 3. Starting address of existing thread that uses a new address space (i.e., execv). 4. None of the above. D) Assume that a program needs to run the executable “/usr/bin/ls” with two parameters “-a” and “-l” (i.e., as if the executable was started from the command line by typing "ls -a -l"). Which of the following will correctly run the executable in OS161? char *prog_args[4]; prog_args[0] = "/usr/bin/ls"; prog_args[1] = "-a"; prog_args[2] = "-l"; prog_args[3] = NULL; 1. execv(prog_args); 2. execv(prog_args[0], prog_args); 3. execv(prog_args[0], prog_args + 1); 4. execv(prog_args[0], prog_args + 4); 1. OS161 Reloaded [18 marks] 2
Background image of page 2
Systems Software Final Exam ECE353, Winter 2010 E) You have decided to implement support for multiple kernel threads in a user-level process in
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 4
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 21

ECE353-2010-Final - Systems Software Final Exam ECE353,...

This preview shows document pages 1 - 4. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online