Mailing List Archive

Support open source code!


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

tlug: Thread Programming.



>>>>> "Sanjay" == Sanjay Agnani <s.agnani@example.com> writes:

    Sanjay> I apologize in advance if this is off-topic. Any help is
    Sanjay> highly appreciated and thank you very much for your time.

    Sanjay> I am trying to develop a server application. I want to
    Sanjay> develop it using multithreads (preferred) or
    Sanjay> multiprocesses. I am new to the concept of multithreading.

Threading is rather OS-specific, despite standards like POSIX.  So if
you're developing on Linux this is not an unreasonable question if you
want to use kernel threads.

There are a number of thread libraries which run in a single kernel
process and do their own scheduling (a kernel thread is scheduled by
the kernel) as well.  The coda-fs uses an implementation called LWP,
the docs are available at www.coda.cs.cmu.edu.  There are probably a
number of packages for Linux, look in your package list.

AFAIK most thread implementations allow you to solve all the problems
you mentioned.  The only real problem is "trouble" recovery; I presume
you need to catch all of the signals that can kill the process and
handle them.  And I seem to recall that some thread implementations,
including Linux, have the problem that you can't signal an individual
thread; signals go to all threads.  So you'd have to hack around that.

I can't help with the details, though.

-- 
University of Tsukuba                Tennodai 1-1-1 Tsukuba 305-8573 JAPAN
Institute of Policy and Planning Sciences       Tel/fax: +81 (298) 53-5091
_________________  _________________  _________________  _________________
What are those straight lines for?  "XEmacs rules."
--------------------------------------------------------------------
Next Technical Meeting: March 11 (Sat) 13:00 Temple University Japan
* Topic: "What's new in Perl 5.6"
Guest speaker: Simon Cozens (TLUG Perl guru)
Next Nomikai Meeting: April 20 (Thu) Linux Conference 2000 Spring Ed.
--------------------------------------------------------------------
more info: http://www.tlug.gr.jp        Sponsor: Global Online Japan


Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links