[so] [Tema4][Linux] Testul 8
Mihail Costea
mihail.costea90 at gmail.com
Thu Apr 26 17:10:56 EEST 2012
Salut,
Consider ca testul 8 de pe Linux are un bug, care apare pentru procesul cu
prioritate 4 (P4) la rularea <so_signal(DEV1)>.
Dupa cum am inteles eu enuntul, ordinea rularii proceselor pentru acest caz
e urmatoarea:
- Main process forks and starts P2
- P2 waits DEV3, which doesn't exist
- P2 forks and starts P4
- P4 waits DEV0 and blocks
- P2 forks and starts P3
- P3 waits DEV0 and blocks
- P2 forks and starts P1, but is preempted because total quantum time is 1
- P1 signals DEV3, which doesn't exist
- P2 exec and is preempted, because of quantum time
- P1 exec
- P2 exec and is preempted, because of quantum time
- P1 signals DEV0 and awakes P3, P4 => we will have P2, P3, P4 in READY
- P4 runs because it has the best priority and signals DEV1 => ERROR
Eroarea apare fiindca P2 nu a ajuns sa dea wait pe DEV1, care era
urmatoarea comanda pe care trebuia sa o execute, dar P4 a luat-o inainte
datorita prioritatii,
si astfel ruleaza <so_fail("P4 should wake P2 (dev1)")>.
Mihai
--
Mihail Costea
E-mail : mihail.costea90 at gmail.com
Telephone : +40725245085
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://cursuri.cs.pub.ro/pipermail/so/attachments/20120426/98899ea1/attachment.html>
More information about the so
mailing list