Hints for A2a


Quick Topic Links


General

  • Don't forget to re-configure your kernel for Assignment 2, and to do all of your kernel builds in kern/compile/ASST2
    % cd $HOME/cs350-os161/os161-1.99/kern/conf
    % ./config ASST2
    % cd ../compile/ASST2
    % bmake depend
    % bmake
    % bmake install
    

  • Don't forget that if you add any new source files to the kernel code, you need to update the file kern/conf/conf.kern and you need to reconfigure your kernel. If you don't do this, the code in your new source file will not be included in the kernel build.

  • Don't worry about trying to reclaim physical frames in the kernel when they are no longer used. However, you should make sure that you kfree kernel memory that you've allocated using kmalloc but that the kernel no longer needs.

  • You may like to have lots of debugging information printing out from your kernel, but the kernel you submit to us must not do so. OS/161's DEBUG facility that can help with this problem - you can bury lots of debugging statements into your code, and you can turn them all off by just changing the value of a single variable. You can even turn them off conditionally by labeling them properly.

    You encountered the DEBUG mechanism in A0, but as a reminder:


  • _exit


    fork


    Kernel include files


    proper use of kmalloc and kfree


    testing