Process behaviour inside the kernel

Ravi Wijayaratne (ravi@jumprun.tamu.edu)
Thu, 31 Dec 1998 18:14:09 -0600 (CST)


Hi,

I have some questions about the behaviour of a process when its execution
is switched to kernel mode by a system call.

This is best explained by an example

Eg:

Suppose a application program calls read() system call.
The system call goes through the system call interface and then the file
system. (Say ext2) If the required block is not in the memory <Buffer
cache> a call has to be made to the disk. The order of function calls
to this is like this <this is my understanding>

1.generic_file_read() < in mm/filemeap.c>
2. inode->i_op->readpage which is mapped to generic_readpage() <in
fs/buffer.c>
3. brw_page() <in fs/buffer.c >
4. ll_rw_block() in < drivers/block/ll_rw_blk.c>
5. make_request() ,,
6. add_request() ,,
7. after this the requeest is handed over to the device driver. Say an IDE
disk device driver.

Here is the question.
In what process context are these routines executed

Is it the process that called the read() system call initially or is it
another kernel process that executes the routines ?

Is the process binding to the task maintained inside the device driver ?
In other words can we determine which process made which request in the
request queue of the device inside the device driver ?

Some help or some pointers to places I can get some information is much
appreciated. I have read Mr Allesandro Rubini s book but I did not come
accross a place where this is discussed.

Thank you

Ravi

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/