Find the answer to your Linux question:
Results 1 to 2 of 2
I have a project assignment that I need help with. The following is the description. ////////////////////////////////////////////////////////////////////////// There are four system calls in Linux related to creating new processes: fork, vfork, ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Jun 2012
    Posts
    1

    new system command implementation/design help


    I have a project assignment that I need help with. The following is the description.
    //////////////////////////////////////////////////////////////////////////
    There are four system calls in Linux related to creating new processes: fork, vfork, execve, and clone. (The man pages will describe for you the differences among them.) Instrument the kernel so that we can write a user-level program that will print counts of the number of times each of these four system calls has been invoked (by any process on the system); that is, I want to write a garden-variety C program that prints out the total number of invocations of each of these four system calls (by any process on the system).

    To do this requires three things:

    ***1. Modify the kernel to keep track of this information.***

    ***2. Design and implement a new system call that will get this data back to the user application.***

    3. Write the user application.

    We'd also like to be able to reset these statistics periodically. So we need a way to clear the request information we've tracked so far. This requires either parameterizing the above system call to add a clear option, or adding another system call.
    /////////////////////////////////////////////////////////////////////////////

    I found these sources on how to add system calls in general.
    kernel hacking lessons
    Implementing a System Call on Linux 2.6 for i386

    ***I need direction on how to do step 1 and step 2.***
    Here is the full project description.
    www . cs . washington . edu / homes / z...all / proj1 . html
    I have part one done.
    This is an independent study assignment so there are no notes or lectures and I have no kernel development experience.

    Also, I have the kernel source tree but am unable to make it because the memory space on the server is too low. So I will be unable to do any testing of the kernel until the administrator fixes the memory issue. The compiling was going along for almost an hour before space ran out. Is it normal for it to take that long?
    Any help will be nice.Is this the right forum or should I of put this in the newbie section?

  2. #2
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    Location
    I can be found either 40 miles west of Chicago, in Chicago, or in a galaxy far, far away.
    Posts
    11,755
    Terms of use on the forums: no help with homework assignments.

    That disclaimer aside, assuming you are running your own Linux system, then if you don't have enough RAM to build the kernel, add swap space. It will run slow, but it will run. Also, how are you building the kernel? If you are running a Red Hat (or clone) system, then when you install the kernel source package, you need to use rpmbuild to build the source, otherwise parts will not come out right.
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •