state-threads
[Top] [All Lists]

Re: Porting from POSIX threads to State Threads

To: Dan Melomedman <dmelomed@xxxxxxxx>
Subject: Re: Porting from POSIX threads to State Threads
From: Claude Johnson <cjohnson@xxxxxxxxxx>
Date: Tue, 31 Jul 2001 02:11:21 -0700 (PDT)
Cc: state-threads@xxxxxxxxxxx
In-reply-to: <20010730191919.B307@xxxxxxxx>
Sender: owner-state-threads@xxxxxxxxxxx
Okay, cool.

What about differences in the libraries themselves?

For example, the Pthread library has a pthread_attr_t type.
What is the closest equivalent in the ST library? Is it 
even possible to control STs with that much granularity?

NOTE: I am not a programmer but doing some investigation, so
      feel free to correct me if I say something that doesn't
      make sense.

Example:

The pthread_attr_t type. Since it doesn't appear that 
any similar device exists in ST, what solutions have 
been arrived at by those who have converted from Pthreads
to ST? These are the kind of issues that concern me when 
I look at the code I'm working with and read the ST docs.

On Mon, 30 Jul 2001, Dan Melomedman wrote:

[*]On Mon, Jul 30, 2001 at 02:14:31PM -0700, Claude Johnson wrote the following:
[*]> Alright, my basic question is what are the gotchas in 
[*]> making this move? 
[*]> 
[*]> I couldn't find anything in the archives about experiences
[*]> or "good to knows" in making the move from POSIX threads 
[*]> to ST. I'm guessing the list would be fairly extensive.
[*]> So if someone can run down the major gotchas, that would
[*]> be helpful, in the sense of what are major differences 
[*]> between Pthreads and State Threads.
[*]
[*]If your thread blocks in ST, then your process blocks. Because of this,
[*]all network and disk I/O calls that are not implemented with ST library
[*]should either be converted to use ST, or should be used in an external
[*]process. Usually you do not need mutexes or thread safety like in most
[*]Pthread libraries in ST.
[*]

Claude Johnson
Network Scientist
Avamar Technologies
949.743.5145 Vox
949.743.5190 Fax
www.avamar.com




<Prev in Thread] Current Thread [Next in Thread>