PDA

View Full Version : multithread example


sod
04-14-02, 11:50 AM
could anyone provide me with some links to simple working examples of multithreading programming. The programming language and/or platform don't matter since I am mainly interested in seeing how algorithms are implemented.

Istari1
04-14-02, 01:01 PM
I'll upload an exmaple if you want, but I dont have any very simple ones. . . Mostly stuff from my Operating Systems class. Page Fault handlers and stuff.

Josh

sod
04-14-02, 01:15 PM
please do, when I said simple I didn't mean "Hello World" simple;) .

Istari1
04-15-02, 01:31 PM
Ok, heres the simplest explain of threading I had, programmed this for an Operating Systems class. It basically mimics the UNIX environment on a unix box and should run any commands you type, it handles errors and output of the commands. Just a side note on threading, different systems handle threading differently so if you runs this on a Unix box you will see different output then on a Windows machine, its kinda interesting to see the different implementations and such. Also there are 2 ways to do threads, you can extend class Thread and create a void run() method or you can implement Runnable interface, I usually do the former.

Josh