正在加载图片...
Example: Test-and-Set (TAs)locks TAS locks acq i Tickets local succ. succ: false while(! succ i succ: =cas(L, 0, 1): re Unfair!Example: Test-and-Set (TAS) locks acq() { local succ; succ := false; while( ! succ ) { succ := cas(L, 0, 1); } } rel() { L := 0; } TAS locks Tickets Unfair!
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有