[Subject Prev][Subject Next][Thread Prev][Thread Next][Subject Index][Thread Index]

Re: any tutorial/guide on linux system calls?



M K Saravanan wrote (mksarav@xxxxxxxxxxxxxxxxx):
> I have to take few hours of lectures on Linux system calls to the
> undergraduate students.  Practically I have only used very few system calls.  
> Is there any guide/tutorial on Linux System calls? any ptr. please.
> 

I would recommend against only iterating all avail syscalls and describing
them. Afterall, students can read manuals and textbooks too :)

Your students may also find it interesting to know _what_ happens during a
syscall and _how_ unix/linux implements them (how the user->kernel mode switch
occurs, etc).

I made my students bypass the C wrappers and use gcc assembly to call syscalls
directly. It went well and we all had fun creating 600byte binaries which
called the pause syscall :-P

A blow by blow description of syscall implementation is at -
http://www.linuxdoc.org/LDP/lki/lki-2.html#ss2.11

Asm tricks to use syscalls -
http://www.linuxassembly.org/linasm.html#Syscalls

Lastly, calling syscalls from within the kernel -
http://www.linuxdoc.org/LDP/lkmpg/node20.html

- Raja