Click on our Sponsors to help Support SunWorld
Letters to the Editor

Adrian Cockcroft and Jim Mauro take on questions about threads, and readers praise security wizard Carole Fennelly's series on sendmail

July  1999
[Next story]
[Table of Contents]
Subscribe to SunWorld, it's free!

Mail this
article to
a friend

Performance Q&A with Adrian Cockcroft

[Read Me]

Needed: Cache profiling tool


I have been following your SunWorld columns with interest.

We are heavy Solaris users and need a cache profiling tool that will reveal the cache behavior of our processes. We are running mostly Ultra 2 boxes with Solaris 2.5 and Solaris 7.

Is there any available tool that supports the above OS/arch?

Thanks for your time,
Sandeep Joshi


To profile CPU cache usage in detail (line by line) you need to use a simulator like SimICS (; if you want to look at the cache hit rates for each process, we are working on tools to be included in Solaris 8. In the meantime, there are some unsupported tools, so ask your local Sun SE to lookup hstat. Local policy varies on what internal tools can be provided and whether a nondisclosure agreement must be signed first.


Measuring threads' CPU usage


I am writing a multithreaded C application using pthreads. The target architecture is Solaris 7. Can you advise me on how I can measure the CPU usage of threads?

Sam Murray-Smith


Check out ps -L and proc(4):

% ps -Lp 540
   540    20 ?        0:03 dtmail
   540     2 ?        0:00 dtmail
   540     3 ?        0:00 dtmail
   540    22 ?        0:03 dtmail
   540     5 ?        0:00 dtmail
   540    30 ?        0:00 dtmail
   540     8 ?        0:00 dtmail
   540    28 ?        0:03 dtmail
   540    29 ?        0:00 dtmail

One day, I'd like to add this properly to SE.



We read your book (Sun Performance and Tuning: Java and the Internet, Second Edition,) but we didn't find anything about filesystem priority access. The question is: Is there any way to set filesystem access priority on Solaris? For example, suppose that we have two filesystems, A and B. When concurrent requests for blocks are made, we want those in A to be processed first.

Rogerio Pelloso Gelamo


There is no way to do this. Priority for CPU time and network packets can be established using the Solaris Resource Manager and Bandwidth Manager products, but there is no disk or filesystem priority scheme in any of the Unix systems as far as I know.



Inside Solaris: Priorities revisited by Jim Mauro

[Read Me]

What's with the third thread?


This month's Inside Solaris is too informative. Congratulations! In your series of articles about multithreading you mentioned the creation of three threads for a non-multithreaded process when compiled with -lthread. I would like to get more details about the reason for creating the third thread (1-main thread,2-aslwp). I would be very much grateful for your assistance.

Ravindra Babu


The third thread is a scheduler or dispatcher thread. User-level threads are scheduled separately from kernel threads. Kernel threads are scheduled based on scheduling class and priority by the kernel dispatcher, and a kernel thread is placed on a processor for execution.

User threads are scheduled by a thread in the thread's library (scheduled based on priority), and are linked to an LWP (lightweight process) when scheduled for execution.


Wizard's Guide to Security 'Setting up sendmail on a firewall, Parts 1 to 3' by Carole Fennelly

[Read Me] [Read Me] [Read Me]

Thanks for the series


I've been maintaining sendmail on firewalls and mail hubs for five or six years and find your sendmail columns nicely done! They are informative but not verbose. I really appreciate the way you laid out the new features in 8.9.3. I hope to see more sendmail columns from you in the future.

Doug Nomura

More kudos for Carole

Hi Carole,

I just wanted to send an e-mail of thanks for yet another excellent article. I found the "Audits from Hell" article to be extremely interesting (and humorous), and this most recent article to be really useful. One of my coworkers has just been given the responsibility of maintaining sendmail for NCSU, so he'll be very grateful too I'm sure.

Your work is very much appreciated!

Ken Williams

Click on our Sponsors to help Support SunWorld

What did you think of this article?
-Very worth reading
-Worth reading
-Not worth reading
-Too long
-Just right
-Too short
-Too technical
-Just right
-Not technical enough

[Table of Contents]
Subscribe to SunWorld, it's free!
[Next story]
Sun's Site

[(c) Copyright  Web Publishing Inc., and IDG Communication company]

If you have technical problems with this magazine, contact

Last modified: