[Subject Prev][Subject Next][Thread Prev][Thread Next][Subject Index][Thread Index]
Re: looking at the kernel
On Sat, Nov 25, 2000 at 04:41:36AM +0000, Rajeev Rao wrote:
> I'm a newbie to linux. I'm studying Operating Systems, and I want to do a
> case study of the linux kernel, by looking at its source. I'm not sure which
> source file to start of with. Can anyone help me?
Look for "tour" in the above URL. I'd start by going into arch/i386
and tracing the path from where BIOS hands control over to the kernel.
> This may sound stupid, but does the linux kernel have main() fuction
> somewhere inside it?
Look in linux/init/main.c:start_kernel
> Another Question(off topic from the above), how does one delete a file of
> a given directory from c, in linux. For that matter, how can one perform
> simple shell activities, (ls, rm, mkdir,..etc) within a c program?
rm = unlink
For others, run the commands under "strace" and see the system calls
they make. You can do the same things in your C program to achieve
the same results.
For more info, read "Advanced programming in the UNIX environment" by