Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how can a kernel process send some data asynchronously to a user level process

I was asked this question in an interview.But the only thing I could think of is allocating a shared memory segment and by some means both kernel and user level processes to write to that segment.Even I am not satisfied with that answer.Can someone please expalin some other mechanism to do so? Any help will be appreciated.

Regards,

like image 854
liv2hak Avatar asked May 02 '26 11:05

liv2hak


2 Answers

I would think they probably wanted to hear about the NetLink Interface. This interface provides an API for a kernel process and user process to communicate through which looks just like a socket, and is considered a successor to ioctl which is easier to use and asynchronous.

Overview here: http://www.linuxjournal.com/article/7356

like image 137
bdk Avatar answered May 07 '26 11:05

bdk


They probably wanted to hear about APC (Asynchronous Procedure Call).

like image 35
ruslik Avatar answered May 07 '26 09:05

ruslik



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!