hello all
I was wondering what is a common way to implement it? It might be useful for example while communicating with a text mode GUI (yea, that's my great idea ))
Adrian
interprocess communication
RE:interprocess communication
1. Use an os service were the first process calls an os software interrupt with a message to save in an 'inbox' messaging system. The target task when executing then checks this inbox for any messages addressed to it.
2. The first task places its messages on a stack, then requests the os to switch tasks to the second task, which when executed pops the messages off the same stack.
I can't think of any other ways. Try reading some osdev theory books.
2. The first task places its messages on a stack, then requests the os to switch tasks to the second task, which when executed pops the messages off the same stack.
I can't think of any other ways. Try reading some osdev theory books.
RE:interprocess communication
I thought of some other ways. They might be similar to the other 2 though.
3. Use a loopback device supplied from network support to connect to the target task and send messages.
4. Save information inside a file on disk that could be opened by the target task.
3. Use a loopback device supplied from network support to connect to the target task and send messages.
4. Save information inside a file on disk that could be opened by the target task.
RE:interprocess communication
You could use a shared section of memory in combination with a message queue.
Process 1 asks the OS for a block of shared memory.
Process 1 places the data in shared memory.
Process 1 then sends a message to process 2 saying it has data waiting.
Process 2 gets the message and uses the data.
Process 2 sends a reply to process 1
Process 1 tells the OS to free the memory.
The advantage to this is that if you are using paging you can map the memory to the same logical location in both processes. That gives you the ability to simply pass a pointer in the message and both processes can resolve the address to the correct physical memory location.
Process 1 asks the OS for a block of shared memory.
Process 1 places the data in shared memory.
Process 1 then sends a message to process 2 saying it has data waiting.
Process 2 gets the message and uses the data.
Process 2 sends a reply to process 1
Process 1 tells the OS to free the memory.
The advantage to this is that if you are using paging you can map the memory to the same logical location in both processes. That gives you the ability to simply pass a pointer in the message and both processes can resolve the address to the correct physical memory location.
RE:interprocess communication
Thanx,
I'll consider these solutions, as soon as I get multitasking working.
Cheers,
Adrian.
I'll consider these solutions, as soon as I get multitasking working.
Cheers,
Adrian.