[so] Sincronizare

Bogdan Sass bogdan.sass at catc.ro
Sun Apr 12 23:44:48 EEST 2009


Razvan Deaconescu wrote:
> On Sun, 2009-04-12 at 23:10 +0300, Bogdan Sass wrote:
>   
>> Continuand cu tema2, incerc sa imi dau seama exact unde si cum este 
>> nevoie de sincronizare.
>>
>>     Fiind vorba de un singur server, operatiile server-side 
>> (add/remove/clear) nu necesita sincronizare. In ceea ce priveste 
>> operatiile print, am doua variante:
>>     1) -iau semafoarele pe masura ce parcurg zona de memorie partajata, 
>> si eliberez fiecare semafor imediat dupa afisarea unui bucket. Solutia 
>> care imi blocheaza cel mai putin timp resursele, dar creez riscul unui 
>> race-condition cu un client care modifica in acelasi timp un bucket.
>>     
>
> Nu vad unde este race condition-ul.
>
>   
    Eu afisez bucket-urile de la 0 la BUCKET_COUNT. In acelasi timp, un 
alt client scrie in bucket-ul X. In functie de momentul in care se 
produc cele 2 actiuni, eu pot sa afisez bucket-ul X asa cum arata 
inainte, sau dupa modificarea realizata de celalalt client.
  
    M-am exprimat eu gresit cand am considerat situatia respectiva un 
"race condition"?

-- 
Bogdan Sass
CCAI,CCSP,JNCIA-ER,CCIE #22221 (RS)
Information Systems Security Professional
"Curiosity was framed - ignorance killed the cat"

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://cursuri.cs.pub.ro/pipermail/so/attachments/20090412/8aa55ef9/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3287 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://cursuri.cs.pub.ro/pipermail/so/attachments/20090412/8aa55ef9/attachment-0001.bin>


More information about the so mailing list