What mechanism can threads use for communication that is not always available to processes?? Thank you,
What mechanism can threads use for communication that is not always available to processes?? Thank you,
Why would you want a thread to use a communication device that isn't available to processes? What is it that you think a thread is?
Not a device just communication...Originally Posted by SKeane
Are you talking about exchanging the information (like using the same variables), or about synchronisation (like critical sections) to prevent incorrect usage of the common data?Originally Posted by jayhor
All problems in computer science can be solved by another level of indirection,
except for the problem of too many layers of indirection.
– David J. Wheeler
Don't take the word device too literally, it does have more than one meaning.
Then you should know the answer to your question, because threads share the same address space they CAN DO things that processes can not. So the original question is - what are these things.Originally Posted by SKeane
All problems in computer science can be solved by another level of indirection,
except for the problem of too many layers of indirection.
– David J. Wheeler
It doesn't answer my question at all. I didn't say that there are no things that a thread can do that a process can't. I wanted to ascertain WHAT the OP actually wanted to do that they thought couldn't be done using a mechanism that wasn't availablte to a process. This would help as we would then know if they actually needed to use something not available to a process, or just thought they did. Do we want to exclude (for example) semaphores (because they ARE available to processes) as a means of communication? Or shared memory (again it IS available to processes)?
If we can establish what the OP thinks a thread is, it might also help.
This sounds like some test question. I'm sure the OP has all the necessary context ... somewhere.
All the buzzt!
CornedBee
"There is not now, nor has there ever been, nor will there ever be, any programming language in which it is the least bit difficult to write bad code."
- Flon's Law