Thats similar to the way pipes are implemented in my operating system. They are just circular buffers in shared memory. The data structure itself is not a pipe but a simple buffer, but it can be used as a pipe. Operations on messages are usually atomic (the receiver either gets the full message or no message at all) so I would not call this structure a message box.
Quote:
Another question.....when reading some data, does that data get deleted? How does the kernel know what data is used so another program doesn't overwrite it?
The easiest way to handle this is having two pointers/position counters: One pointer to the current "read offset" and one to the current "write offset". Usually a
circular buffer is used for data structures like that. You don't have to delete the read data although there are some implementations that delete it, e.g. some
lock-free pipe implementations.