更新时间:2023-02-26 18:12:51
自旋锁使过程不断循环直到自旋锁被释放,而信号量则导致自旋锁进入睡眠直到释放的过程.
如果您要等待更长的时间才能满足条件,通常***使用信号灯.
A spinlock causes the process to continuously loop until the spinlock is released, while a semaphore causes the process to sleep until it''s released.
A semaphore is usually better if you''re going to be waiting a longer time for the criteria to be met.
请购买一本书,而不是在此处发布所有家庭作业问题
Please buy a book instead of posting all of your homework questions here