Click here to Skip to main content
15,912,072 members
Home / Discussions / .NET (Core and Framework)
   

.NET (Core and Framework)

 
AnswerRe: upper limit on the number of projects for soultion in vs2005 Pin
Paul Conrad26-Jul-08 5:21
professionalPaul Conrad26-Jul-08 5:21 
AnswerRe: upper limit on the number of projects for soultion in vs2005 Pin
PIEBALDconsult3-Aug-08 17:29
mvePIEBALDconsult3-Aug-08 17:29 
QuestionAbout timeseries plot Pin
mahabir25-Jul-08 19:22
mahabir25-Jul-08 19:22 
AnswerRe: About timeseries plot Pin
Paul Conrad2-Aug-08 21:03
professionalPaul Conrad2-Aug-08 21:03 
QuestionSetting a timeout time for MarshalByRefObject? Pin
jeffb4225-Jul-08 10:48
jeffb4225-Jul-08 10:48 
AnswerRe: Setting a timeout time for MarshalByRefObject? Pin
Mark Salsbery25-Jul-08 11:51
Mark Salsbery25-Jul-08 11:51 
GeneralRe: Setting a timeout time for MarshalByRefObject? Pin
jeffb4225-Jul-08 13:57
jeffb4225-Jul-08 13:57 
QuestionAny good way to update an object reference plus something else in a single CompareExchange? Pin
supercat925-Jul-08 8:00
supercat925-Jul-08 8:00 
If an object reference were stored adjacent to an integer in the same oct-word, or if two object references were stored likewise, is there any reasonable way to to a single CompareExchange that will update both of neither has changed or leave both alone if either has changed? Many algorithms for non-blocking updates seem to want a 'CompareExchange-plus'. From a hardware perspective there should be no difficulty(*), but since .net needs to "know" about objects, storing two object references in a Long would seem problematical.

The closest approaches I can figure would be to either (1) when it's necessary to have one 'extra bit' with the object reference, create two objects that the object reference can point to, both of which have pointers to each other. One of them is the real object, and one is a spare. If the object reference points directly at the "real" object, the "extra" bit is "zero"; if it points to the spare, it's "one". This avoids any need to create new objects while doing the update; (2) have the object reference point to an intermediate object which holds the real object reference and the other data; to do an update, copy the data from the old intermediate object to a new one and then CompareExchange the reference to the old to point to the new. That approach allows an arbitrary amount of supplemental data, but is more apt to tax the garbage collector. Further, even if the rest of the algorithm is interference-free, the memory allocation isn't.

Anyone have any brilliant insights?

(*) I wouldn't be surprised if object references in IA64 fill up the largest available CompareExchange type, but I can't see any real reason they should. If an object reference stores an index into a system-maintained array of objects, then 32 bits should be plenty for that purpose. I don't want to sound like Bill Gates' "640K is enough for everyone", but I can't see much use for having four billion live objects. If an application would need anything near that number, I would think it would be more efficient to use fewer objects and store more information in each.
AnswerRe: Any good way to update an object reference plus something else in a single CompareExchange? Pin
Mike Dimmick28-Jul-08 0:47
Mike Dimmick28-Jul-08 0:47 
GeneralRe: Any good way to update an object reference plus something else in a single CompareExchange? Pin
supercat928-Jul-08 5:50
supercat928-Jul-08 5:50 
GeneralRe: Any good way to update an object reference plus something else in a single CompareExchange? Pin
Luc Pattyn28-Jul-08 7:00
sitebuilderLuc Pattyn28-Jul-08 7:00 
GeneralRe: Any good way to update an object reference plus something else in a single CompareExchange? Pin
supercat928-Jul-08 9:37
supercat928-Jul-08 9:37 
GeneralRe: Any good way to update an object reference plus something else in a single CompareExchange? Pin
led mike28-Jul-08 9:53
led mike28-Jul-08 9:53 
GeneralRe: Any good way to update an object reference plus something else in a single CompareExchange? Pin
Luc Pattyn28-Jul-08 10:09
sitebuilderLuc Pattyn28-Jul-08 10:09 
GeneralRe: Any good way to update an object reference plus something else in a single CompareExchange? Pin
supercat928-Jul-08 15:20
supercat928-Jul-08 15:20 
GeneralRe: Any good way to update an object reference plus something else in a single CompareExchange? Pin
Luc Pattyn28-Jul-08 16:05
sitebuilderLuc Pattyn28-Jul-08 16:05 
GeneralRe: Any good way to update an object reference plus something else in a single CompareExchange? Pin
supercat928-Jul-08 15:54
supercat928-Jul-08 15:54 
Questionrounding to five decimal digits Pin
CICCIOLO6924-Jul-08 22:50
CICCIOLO6924-Jul-08 22:50 
Answercross-post Pin
Luc Pattyn25-Jul-08 5:18
sitebuilderLuc Pattyn25-Jul-08 5:18 
Answer[Cross Post]Re: rounding to five decimal digits (with link to original message) Pin
Scott Dorman25-Jul-08 5:21
professionalScott Dorman25-Jul-08 5:21 
AnswerRe: rounding to five decimal digits Pin
ghle26-Jul-08 5:47
ghle26-Jul-08 5:47 
QuestionWindows Service : More than one user Service may run within the same process Pin
Krugger40424-Jul-08 21:48
Krugger40424-Jul-08 21:48 
Answer[Cross Post]Re: Windows Service : More than one user Service may run within the same process Pin
Scott Dorman25-Jul-08 4:18
professionalScott Dorman25-Jul-08 4:18 
GeneralRe: [Cross Post]Re: Windows Service : More than one user Service may run within the same process Pin
Krugger40425-Jul-08 11:01
Krugger40425-Jul-08 11:01 
GeneralRe: [Cross Post]Re: Windows Service : More than one user Service may run within the same process Pin
Scott Dorman25-Jul-08 14:15
professionalScott Dorman25-Jul-08 14:15 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.