simple question, anyone can answer me..

This is a discussion on simple question, anyone can answer me.. within the C++ Programming forums, part of the General Programming Boards category; What mechanism can threads use for communication that is not always available to processes?? Thank you,...

  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
    CSharpener vart's Avatar
    Join Date
    Oct 2006
    Location
    Rishon LeZion, Israel
    Posts
    6,474
    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?
    The first 90% of a project takes 90% of the time,
    the last 10% takes the other 90% of the time.

  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
    CSharpener vart's Avatar
    Join Date
    Oct 2006
    Location
    Rishon LeZion, Israel
    Posts
    6,474
    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.
    The first 90% of a project takes 90% of the time,
    the last 10% takes the other 90% of the time.

  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,893
    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, 07: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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21