COMP 3000 Lab 6 2011: Difference between revisions

From Soma-notes
Nhoda (talk | contribs)
Nhoda (talk | contribs)
Line 18: Line 18:


==Part B==
==Part B==
# [6 pts] Briefly explain what each statement does in <tt>vfs_write()</tt> in fs/read_write.c.  Your explanation for each line should take up two lines at most.
# [6 pts] Briefly explain what each statement does in <tt>[http://lxr.linux.no/linux+*/fs/read_write.c#L404 vfs_write()]</tt> in fs/read_write.c.  Your explanation for each line should take up two lines at most.
# [3 pts] What is the purpose of each field in the struct <tt>atl1e_tx_ring</tt>?  (Note: the last two fields are extra credit!)
# [3 pts] What is the purpose of each field in the struct <tt>atl1e_tx_ring</tt>?  (Note: the last two fields are extra credit!)

Revision as of 20:57, 18 November 2011

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. 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.) Also, list any websites or individuals you consult.

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. *** Students have found it easier to navigate this link ***

  1. Answer the following questions regarding do_execve_common() in fs/exec.c.
    1. What information does bprm 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?
  3. In mm/mmap.c, what does the line SYSCALL_DEFINE1(brk, unsigned long, brk) do?
  4. What is the call down_write(&mm->mmap_sem); for?
  5. In what file is atl1e_tx_ring declared?

Part B

  1. [6 pts] Briefly explain what each statement does in vfs_write() in fs/read_write.c. Your explanation for each line should take up two lines at most.
  2. [3 pts] What is the purpose of each field in the struct atl1e_tx_ring? (Note: the last two fields are extra credit!)