Page 1 of 1

Message pump !

Posted: Tue Nov 09, 2004 12:00 am
by Ramanan
Hi,
Now i'm bit concern about the way i designed my OS. Serveral doubts arising when i tried to redesign my OS. Following are some of them.

1) How dows the message pump works (in windows) ?
2) Does Linux has the message pump ? (since i don't kno abt Linux)
3) How message pump is it linked with memory managr & task scheduler?

Thanks in advance
Ramanan

Re: Message pump !

Posted: Wed Nov 10, 2004 12:00 am
by Kevin McGuire
The message pump in windows works by calling a common run-time library function witch may or may not perform a system call into the kernel.

Once the call returns the message pumps continues by either looping around again or processing the message that it finds after doing the message call.

I do not think linux has a message pump of the nature window's has one. Windows's message pump is majorly for event driven applications in the graphical user environment.

The message pump is not directly linked with the memory manager or task scheduler. Instead it is a completely seperate system. Alhough the application uses all three systems to work:
process/thread
memory allocation/deallocation
message que(pump)

To write a message pump you need to make a few system calls that applications running under you're kernel can call while they run. You would absolutly only need one called "getmsg" that returns -1 if no message exists to get or otherwise it returns the message data or contents depending on the type of message pump you are wanting to design.