Thread: simple question, anyone can answer me..

  1. #1
    Registered User
    Join Date
    Aug 2006
    Posts
    2

    Post simple question, anyone can answer me..

    What mechanism can threads use for communication that is not always available to processes?? Thank you,

  2. #2
    Registered User SKeane's Avatar
    Join Date
    Sep 2006
    Location
    England
    Posts
    234
    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?

  3. #3
    Hurry Slowly vart's Avatar
    Join Date
    Oct 2006
    Location
    Rishon LeZion, Israel
    Posts
    6,788
    Quote Originally Posted by SKeane
    Why would you want a thread to use a communication device
    Not a device just communication...

    Quote Originally Posted by jayhor
    What mechanism can threads use for communication that is not always available to processes?? Thank you,
    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?
    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

  4. #4
    Registered User SKeane's Avatar
    Join Date
    Sep 2006
    Location
    England
    Posts
    234
    Don't take the word device too literally, it does have more than one meaning.

  5. #5
    Hurry Slowly vart's Avatar
    Join Date
    Oct 2006
    Location
    Rishon LeZion, Israel
    Posts
    6,788
    Quote Originally Posted by SKeane
    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.
    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

  6. #6
    Registered User SKeane's Avatar
    Join Date
    Sep 2006
    Location
    England
    Posts
    234
    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.

  7. #7
    Cat without Hat CornedBee's Avatar
    Join Date
    Apr 2003
    Posts
    8,895
    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

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Simple Question!!
    By gameuser in forum C++ Programming
    Replies: 2
    Last Post: 06-06-2009, 05:42 PM
  2. Simple question about the C programming tutorial #1
    By elsheepo in forum C Programming
    Replies: 13
    Last Post: 01-19-2009, 08:59 PM
  3. how would you answer this question?
    By smoking81 in forum Linux Programming
    Replies: 3
    Last Post: 09-08-2008, 03:53 AM
  4. Simple Question from Stupid Person...
    By Monmouth3 in forum A Brief History of Cprogramming.com
    Replies: 6
    Last Post: 10-02-2002, 08:47 AM
  5. Replies: 1
    Last Post: 07-20-2002, 06:33 PM