OS161 fork System Call

If you're not already familiar with UNIX fork system call, here is it's function description and its entry on Wikipedia.

Basically, in sys_fork, we need to do the follow things:

  1. Copy parent's trap frame, and pass it to child thread
  2. Copy parent's address space
  3. Create child thread (using thread_fork)
  4. Copy parent's file table into child
  5. Parent returns with child's pid immediately
  6. Child returns with 0

So, let's get started.

more ...







Figure Over Two Columns in Latex

You may often find a table or figure is too big to fit into one column when your article has two columns. Use this to insert a figure (same with table) and it will save you:

more ...

Set sty file path of Latex in Linux

From time to time, you may want to compose your own sty files to eliminate long header in your tex file. But it's boring to put you sty file in the same directory of your tex file every time since you really want your sty file to be common, i.e., can be accessed everywhere in your system.

more ...