Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / General / February 2006

Tip: Looking for answers? Try searching our database.

Caveats associated with dual processor systems

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Ben Fidge - 16 Feb 2006 19:38 GMT
My client has upgraded their server to dual-Xeon and we're getting some
strange symptoms. Mostly this is happening in static classes where static
properties and members aren't protected, but also strange things like a
booking has been created by User A but the record was saved with User B's
information.

I was wondering, are there any gothcas to look out for when an app is
running on dual processor systems. I understand the granularity of thread
time-slices is down to a single clock-tick. Is there a list of do's and
don't and best practices to follow.

Thanks

Ben
Scott Allen - 17 Feb 2006 16:24 GMT
>My client has upgraded their server to dual-Xeon and we're getting some
>strange symptoms. Mostly this is happening in static classes where static
[quoted text clipped - 10 lines]
>
>Ben

If the code has race conditions [1], then an MP system can certainly
bring out the worst in the software. It's not because the timeslice
changes, it's because threads really do execute concurrently (instead
of just appearing to execute concurrently on uniproc system).

One approach would be to scour through the code and place locks and
Monitors where appropriate, but a better approach might be to get rid
of the static state where ever possible. It's hard to find all the
places you need a lock. It's easier to write the code so that you
don't have to worry about a lock, or let another service (like a
database) worry about locking.

[1] http://en.wikipedia.org/wiki/Race_condition
--
Scott
http://www.OdeToCode.com/blogs/scott/

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.