Re: D2006 Hyperthreading Win32
- From: "Craig Stuntz [TeamB]" <craig_stuntz@xxxxxxxxxxxxx [a.k.a. acm.org]>
- Date: 27 Jan 2006 05:23:35 -0700
Danijel Tkalcec [RTC] wrote:
> But, this isn't very problematic, even though one might think so.
> Critical sections are very often used in applications and the Win32
> API calls EnterCriticalSection/LeaveCriticalSection have well written
> by M$.
>
> In any case, most Memory Managers (including FastMM - which is the
> new default MM in D2006) have to do the same (use critical sections).
You're under-stating the problem with the old MM. FastMM uses separate
locks for small, medium, and large allocations. If a request is unable
to obtain a lock for the size it needs, it can try to obtain a lock for
a larger size before waiting. The old MM had only a single lock, so it
would *always* wait if another thread was working on an allocation.
It's not just locking /per se/ which hurts performance, but also the
granularity of the lock.
This sounds like it should result in a waste of memory, but other
optimizations (anti-fragmentation management) in the new MM offset that
in favor of the new MM.
Again, I don't think the old behavior has anything to do with what is
described in the top post, but I do think it's misleading to equate the
consequences of turning on multi-threaded mode in the old and new MMs.
--
Craig Stuntz [TeamB] · Vertex Systems Corp. · Columbus, OH
Delphi/InterBase Weblog : http://blogs.teamb.com/craigstuntz
Useful articles about InterBase development:
http://blogs.teamb.com/craigstuntz/category/21.aspx
.
- Follow-Ups:
- Re: D2006 Hyperthreading Win32
- From: Ender
- Re: D2006 Hyperthreading Win32
- References:
- D2006 Hyperthreading Win32
- From: Mike
- Re: D2006 Hyperthreading Win32
- From: Piotr Szturmaj
- Re: D2006 Hyperthreading Win32
- From: Mike
- Re: D2006 Hyperthreading Win32
- From: Francois Malan
- Re: D2006 Hyperthreading Win32
- From: Craig Stuntz [TeamB]
- Re: D2006 Hyperthreading Win32
- From: Danijel Tkalcec [RTC]
- Re: D2006 Hyperthreading Win32
- From: Craig Stuntz [TeamB]
- Re: D2006 Hyperthreading Win32
- From: Danijel Tkalcec [RTC]
- D2006 Hyperthreading Win32
- Prev by Date: Re: Windows 95
- Next by Date: Re: Borland/Delphi Dying blog entry from Ken Henderson at MS ( a gratuitous digression....)
- Previous by thread: Re: D2006 Hyperthreading Win32
- Next by thread: Re: D2006 Hyperthreading Win32
- Index(es):
Relevant Pages
|