Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

threads with Linux?

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
Hi, sorry if my message appears twice!
My work consists in translating a work from Windows to Linux. These windows programs are very hungry for CPU. There are a few programs running at the same time but some have to get higher priority than others etc... I was told to use threads but i'm no sure it exists on Linux. What would be the equivalent?

thank you!

thomas
 
threads in linux call processes,you can run multiple pocesses at the same time. If you are programming, you can use fork() to start a new process. For more information,check this or the c++ for unix forum on "fork".
Greetz,

The Muppeteer.

themuppeteer@hotmail.com

Don't eat yellow snow...
 
You can use threads in linux as well, take a look at the manpage for pthread(3).
 
Traditional UNIXes normally have a pthread library with pthread_create(), pthread_destroy() calls. Linux supports these calls but the underlying call is clone() which creates threads. Dont be surprised to see an extra thread created.fork() will crate two instances of the same process but they cant share data segments whereas threads can.

cheers
-Amit

amit
crazy_indian@mailcity.com

to bug is human to debug devine
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top