Tagged Questions
0
votes
1answer
30 views
Understanding a XINU system call - getstk.c [closed]
I am having trouble conceptually understanding what is going on towards the end of this system call, and why. I understand the getstk.c method returns the highest memory address of available space, ...
1
vote
1answer
402 views
Calculating total CPU system usage in C
I found this answer on StackOverflow for calculating total CPU usage: http://stackoverflow.com/questions/1420426/calculating-cpu-usage-of-a-process-in-linux/4497769#4497769
But how do I calculate ...
4
votes
2answers
1k views
How to find the header file where a c function is defined?
Is there an easy way to find out which header file a C function declaration is in? cding into /usr/include and running (grep -E 'system.*\(' *.h -R) works with some trial and error, but isn't there an ...
4
votes
2answers
125 views
System programming: How to gather info?
According to this question, a good way to learn system programming would be to implement the existing tools. I decided to try to rewrite ls and ps.
My question is how would one proceed to get ...
7
votes
3answers
1k views
Why should a child of a vfork or fork call _exit() instead of exit()?
From the man page of vfork():
vfork() differs from fork() in that
the parent is suspended until the
child makes a call to execve(2) or
_exit(2). The child shares all memory with its ...