COMP 3000 Lab 6 2011

From Soma-notes
Revision as of 17:25, 13 November 2011 by Soma (talk | contribs) (→‎Part A)
Jump to navigation Jump to search

A few guidelines:

  • Submit your solutions for both Part A and Part B via WebCT by Sunday, November 20th at 11:30 PM.
  • Please answer using a single text file (with a .txt extension). Do not submit doc, docx, pdf, or other formats. Also, please do not submit an archive (zip, tarball, rar) of multiple text files, just upload one. (Please don't just cut and paste your work into a text box on webct.) Anything other than a single text file will receive -1 points
  • Show all your work. Short answers are not sufficient; you should list any websites or individuals you consult and should document any experiments you conducted. For any question that you could just answer without any external reference or experiment, write "(no work required)" after your answer. If you find an answer by browsing code, explain your search path (e.g., I searched for X, which led me to source file Y, where I found function Z.)
  • All submitted code and commands should compile and run. Partial code fragments or explanations may not be given credit. While code may use standard C and UNIX/Linux libraries, no code should rely on external binaries.

Part A

For this section, you will need to refer to the source of the Linux kernel, version 3.1.1. You may download the source code here; however, you will probably prefer to navigate the code through the Linux Cross Reference Project.

  1. Answer the following questions regarding do_execve_common() in fs/exec.c.
    1. What information does brpm hold?
    2. What are the many goto's for?
    3. What are the two lines immediately before this function returns with no error (i.e., the execve succeeds)?
  2. What function is the main consumer of copy_process() in kernel/fork.c?

Part B