[pso] busy waiting
Andrei Hagiescu
pso@cursuri.cs.pub.ro
Sun, 28 Mar 2004 15:22:35 +0300
This is a multi-part message in MIME format.
------=_NextPart_000_0085_01C414D8.7F3FB6F0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
De fapt mai am o intrebare daca tot am intrat in "hora intrebarilor":
while (true) {
ExInterlockedExchange(...)
}
care face busy waiting este mai putin performant decat un spin lock =
(care nu stiu ce mecanism foloseste exact)?
pentru ca asa as putea implementa un fel de mutex pe lista...
------=_NextPart_000_0085_01C414D8.7F3FB6F0
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2800.1400" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>De fapt mai am o intrebare daca tot am =
intrat in=20
"hora intrebarilor":</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>while (true) {</FONT></DIV>
<DIV><FONT face=3DArial size=3D2> =20
ExInterlockedExchange(...)</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>}</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>care face busy waiting este =
mai putin=20
performant decat un spin lock (care nu stiu ce mecanism foloseste=20
exact)?</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>pentru ca asa as putea implementa un =
fel de mutex=20
pe lista...</FONT></DIV></BODY></HTML>
------=_NextPart_000_0085_01C414D8.7F3FB6F0--