Usenet comp.unix.osf.osf1 (1992-2004)
 help / color / mirror / Atom feed
From: trin0008@ermine.ox.ac.uk (Rick Heylen)
Subject: Kernel multithreading.
Date: 1997/03/17	[thread overview]
Message-ID: <5gju7p$i2e@news.ox.ac.uk> (raw)


I'm writing a multithreaded program on a 4 CPU Digital UNIX 4.0 system.
When I view the running process using ps -m I see that two extra threads
are created by any process compiled with cc -pthread. I presume that they
babysit any threads the user creates explicitly. I can bind the threads to
cpus and they do appear to be bound when viewing with ps -m -Opsr but the
percentage cpu usage is never above 100%. In other words, the
multithreading is not taking advantage of the multiprocessor nature of my
machine and runs very slowly.
Can somebody please explain how the threading is implemented please?

One of the sysadmins mentioned something about a change in the
implementation of multithreading with the new POSIX or something so I
accepted that real multiprocessor multithreading might be impossible.
I see however that dxmandel found in /usr/bin/X11/demos/dxmandel does
multithread properly. 

erm0>ps -mp 8376 -Opcpu
   PID %CPU S    TTY             TIME COMMAND
  8376 216.1 R N  ??          15:03:04 dxmandel
        0.0 I N               0:00.15
        0.0 I N               0:00.00
       44.2 R N              03:44:58
        0.0 I N               0:00.16
       49.1 R N              03:46:17
       48.1 R N              03:46:45
       74.7 R N              03:45:02

I would like to know how to make my multithreaded programs run properly
over multiple processors. Can anybody help?

	Rick
-- 
All I could see was the B-side of the disc which had assumed an oval shape
with the label on the outside rim.  
PGP key 512/CA5CADED Differential Cryptanalyst and C/C++, Java Programmer
Key fingerprint =  00 00 00 00 00 65 AB 2F  76 EB EF F7 9C 10 FA 88




             reply	other threads:[~1997-03-17  5:00 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1997-03-17  5:00 Rick Heylen [this message]
1997-03-18  5:00 ` Kernel multithreading Dave Butenhof
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox