[so] intrebare quiz fire de executie
Razvan Deaconescu
razvan.deaconescu at cs.pub.ro
Wed Jun 24 18:38:37 EEST 2009
On Wed, 2009-06-24 at 18:28 +0300, Razvan Deaconescu wrote:
> On Wed, 2009-06-24 at 18:18 +0300, Octavian Rinciog wrote:
> > Intrucat e SIGNAL_AND_CONTINUE coada de signalers ( sau waiters) este vida.
> >
> > Daca era SIGNAL_AND_WAIT atunci era si o astfel de coada.
>
> Andreea are dreptate. Raspunsul este 4 in ambele cazuri:
>
> SIGNAL_AND_CONTINUE
> * 2 cond_queue + entry_queue + waiters_queue
>
> SIGNAL_AND_WAIT
> * 2 cond_queue + entry_queue + signalers queue
Corectie! Bogdan are dreptate. Coada waiters e folosita tot timpul.
Politica SIGNAL_AND_WAIT foloseste 5 cozi.
Spre exemplu, daca un thread foloseste broadcast va trezi N thread-uri
si va intra in signalers_queue, celelalte thread-uri vor intra in
waiters_queue si doar unul va fi planificat.
Razvan
More information about the so
mailing list