Difference between revisions of "COMP 3000 Test 2 Study Guide 2011"

From Soma-notes
Jump to navigation Jump to search
(Created page with "==Key Concepts== For this test, you should understand the following terms and how they interrelate at a high level: * execve semantics * how command line variables are processe…")
 
 
(8 intermediate revisions by the same user not shown)
Line 1: Line 1:
==Key Concepts==
==Key Concepts==


For this test, you should understand the following terms and how they interrelate at a high level:
For this test, you should understand the following terms and how they interrelate:


* execve semantics
* execve semantics
Line 8: Line 8:
* signal handlers
* signal handlers
* concurrent operation with fork
* concurrent operation with fork
* producer/consumer
* scheduler and relationship to system calls
* priority scheduling
* round-robin scheduling
* mutual exclusion
* semaphores
* semaphores
* basic pthreads
* basic pthreads
Line 15: Line 18:
* loopback mounting
* loopback mounting
* sparse files
* sparse files
* basic filesystem implementation, VFS abstraction
* basic filesystem implementation
*
* VFS abstraction


You will also likely need material covered in Test 1.
In addition to reading the notes, be sure to review the assigned readings!  You will also need to know the material covered in Test 1.


==Sample Questions==


==Sample Questions==
Note: these questions are more open-ended than the ones that will be on the final test.  There will also be a question session just before the test - the test will only be around 30 minutes long.
 
# Without errors, what does the execve system call return?
# Can a process modify its argument variables?  Environment variables?
# Who calls a signal handler?
# If a parent and child process start printing  "Parent\n" and "Child\n" to standard out, what will be the order of the output?
# In race-demo, why does the consumer sometimes finish before the producer has done hardly anything?
# What does pthread_join() do?
# How is argc calculated?  Note that argc is not specified by execve!
# What parts of the kernel would you need to re-implement in userspace in order to simulate a loopback mount?
# Why are sparse files tricky to copy?
# what is the relationship between lost+found and fsck?

Latest revision as of 15:58, 7 November 2011

Key Concepts

For this test, you should understand the following terms and how they interrelate:

  • execve semantics
  • how command line variables are processed by execve
  • how environment variables are processed by execve
  • signal handlers
  • concurrent operation with fork
  • scheduler and relationship to system calls
  • priority scheduling
  • round-robin scheduling
  • mutual exclusion
  • semaphores
  • basic pthreads
  • System V init scripts versus launchd
  • mounting filesystems
  • loopback mounting
  • sparse files
  • basic filesystem implementation
  • VFS abstraction

In addition to reading the notes, be sure to review the assigned readings! You will also need to know the material covered in Test 1.

Sample Questions

Note: these questions are more open-ended than the ones that will be on the final test. There will also be a question session just before the test - the test will only be around 30 minutes long.

  1. Without errors, what does the execve system call return?
  2. Can a process modify its argument variables? Environment variables?
  3. Who calls a signal handler?
  4. If a parent and child process start printing "Parent\n" and "Child\n" to standard out, what will be the order of the output?
  5. In race-demo, why does the consumer sometimes finish before the producer has done hardly anything?
  6. What does pthread_join() do?
  7. How is argc calculated? Note that argc is not specified by execve!
  8. What parts of the kernel would you need to re-implement in userspace in order to simulate a loopback mount?
  9. Why are sparse files tricky to copy?
  10. what is the relationship between lost+found and fsck?