Solaris Threads

Solaris Threads

Post by Tristan Tarra » Thu, 18 Jul 1996 04:00:00



We are writing an application for Solaris which uses both RPC calls and
threads.

We are using the rusers function to retrieve the names of users which are
logged on to other machines in our building. Unfortunately if a machine is
down, rusers takes a long time to time out. So we decided to use threads: we
create a thread for each rusers call and, wait a while. If a certain maximum
delay has passed, we kill all the threads which haven't completed and
continue.
Unfortunately, because of the nature of rusers, all the processes are
waiting for some network reply. For some reason libthreads sends us a
SIGWAITING and kills the program. Any hints on how to avoid this ?
Is there a way to tell the threads library to wait a while longer before
generating SIGWAITING ?

Tristan

 
 
 

Solaris Threads

Post by Keith Smit » Fri, 19 Jul 1996 04:00:00



>We are writing an application for Solaris which uses both RPC calls and
>threads.

>We are using the rusers function to retrieve the names of users which are
>logged on to other machines in our building. Unfortunately if a machine is
>down, rusers takes a long time to time out. So we decided to use threads: we
>create a thread for each rusers call and, wait a while. If a certain maximum
>delay has passed, we kill all the threads which haven't completed and
>continue.
>Unfortunately, because of the nature of rusers, all the processes are
>waiting for some network reply. For some reason libthreads sends us a
>SIGWAITING and kills the program. Any hints on how to avoid this ?
>Is there a way to tell the threads library to wait a while longer before
>generating SIGWAITING ?

>Tristan

Hey Tristan:

A brief query:  When you kill the thread, what signal do you use?  Whatever
signal you do use, you need to have a signal handler which will issue a
thr_exit();  If not, and you are using some signals' default action, you will
find the complete process dies...

Hope that helps
cheers
keith

 
 
 

1. Differences between Solaris threads and POSIX threads

Can anyone give me a list of the differences and/or a pointer to a document,
that describes the differences between Solaris threads and POSIX threads -
beyond that which is in the man page (man threads) ?

The one difference of which I am aware is that if a multi-threaded app
fork()s, in Pthreads, only the calling thread is duplicated, while in
Solaris threads, the whole thing is duplicated (which, incidentally, the
semantics of fork, if interpreted literally, requires).

2. Realistic limit on number of files in a directory

3. Thread scheduling in Solaris threads

4. hard disk drive

5. Difference between Posix Threads and Solaris threads

6. CNN vs. MSNBC -- OLYMPIC COVERAGE

7. scheduling in Solaris Threads

8. DMAing Conflict

9. Solaris threads again

10. HELP HELP on Solaris Threads...

11. Where can I find Solaris Thread Information?

12. windows 2000 vs solaris threads

13. Book for Solaris Thread programming