Results 1 to 4 of 4

Thread: What is 'multi-threaded' ?

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Aug 2001
    Posts
    484

    What is 'multi-threaded' ?

    Hi,

    I often hear ppl saying multi-threaded or multi-thread applications from time to time. But can anyone tell me what exactly is a multi-threaded program?

    thnx in advance

  2. #2
    Conquistador
    Join Date
    Dec 1999
    Location
    Australia
    Posts
    4,527
    have a look on www.planetsourcecode.com

    for

    "multi tasking"

  3. #3
    Randalf the Red honeybee's Avatar
    Join Date
    Jun 2000
    Location
    off others' brains
    Posts
    4,345

    Well ...

    The CPU of a computer is able to execute only one process at any given point of time. When multi-tasking came into existence, it made efficient use of the CPU's huge speed by introducing the time shares. A certain piece of time is given to each process to execute. Once the time slice is up, the process is put on hold, and the next process is taken up for execution. Since the CPUs run at huge speeds, you wouldn't notice this and think that the processes are running parellel.

    The same concept, when applied to an individual process, becomes multi-threading. A single process, when being executed, executes line by line. You can identify code segments in your process which do not need to be run one after the other. This means, both the code segments would give the same result if run simultaneously, they wouldn't affect each other's working if both were run together. In such a case, the process is split into threads, and each thread runs for a slice of time, then is put on hold and the next thread is run and so on.

    In short, if you know how multi-tasking works conceptually, multi-threading is almost the same in concept.

    .
    I am not a complete idiot. Some parts are still missing.
    Check out the rtf-help tutorial
    General VB Faq Thread
    Change is the only constant thing. I have not changed my signature in a long while and now it has started to stink!
    Get more power for your floppy disks. ; View honeybee's Elite Club:
    Use meaningfull thread titles. And add "[Resolved]" in the thread title when you have got a satisfactory response.
    And if that response was mine, please think about giving me a rep. I like to collect them!

  4. #4

    Thread Starter
    Hyperactive Member
    Join Date
    Aug 2001
    Posts
    484
    I think i get the idea. But to help me understand it a lil more, can someone upload a very basic app that demonstrates the process pls?

    many thnx

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width