Message pump !

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
Ramanan
Posts: 1
Joined: Sun Nov 07, 2004 12:00 am

Message pump !

Post 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
User avatar
Kevin McGuire
Member
Member
Posts: 843
Joined: Tue Nov 09, 2004 12:00 am
Location: United States
Contact:

Re: Message pump !

Post 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.
Post Reply