MUD-Dev
mailing list archive

Other Periods  | Other mailing lists  | Search  ]

Date:  [ Previous  | Next  ]      Thread:  [ Previous  | Next  ]      Index:  [ Author  | Date  | Thread  ]

Re: [MUD-Dev] Two threads forced to one CPU? (was: Collecting ideas for a MUD server...)



On Fri, 24 Dec 1999 cg#ami-cg,GraySage.Edmonton.AB.CA wrote:

> [Greg Miller:]
> 
> > BTW: Here's something else anyone doing MT should be aware of: Your
> > software may have two sets of thread bugs, one for single-CPU execution,
> > and one for MP execution. There may or may not be overlap between the
> > two. That means you *cannot* assume your MT application runs on both,
> > unless you've tested and otherwise verified your code in both
> > situations.
> 
> Excellent advice! At work, I've worked on threaded software on machines
> with 1 2, and 4 CPU's, all on Windows NT. Bugs show up at all levels of
> that, and some of them can be difficult to figure out, since they can be
> timing dependent. You've got to be extremely careful with any locking,
> etc. that you need. And, you've got to make *no* assumptions about
> things getting done and the timing of them.
> 

Yes, or keep assuming the worst possible. Assume that the thread can be 
interrupted, after you have written down 16 of 32 bit of any long word 
in the memory, making the 32-bit value non-valid, which is why you need
thread-safe system calls :-) I actually had this error, though on older 
hardware. 


Hans Henrik Stærfeldt   |    bombman#diku,dk    | work:  hhs#cbs,dtu.dk      |
address:                |___  +45 40383492    __|__       +45 45252425     __|
 Dybendalsvej 74 2. th, | Scientific programmer at Center for Biological     |
 2720 Vanløse, Danmark. |  Sequence Analysis, Technical University of Denmark|




_______________________________________________
MUD-Dev maillist  -  MUD-Dev#kanga,nu
http://www.kanga.nu/lists/listinfo/mud-dev



Other Periods  | Other mailing lists  | Search  ]