Salut,<div><br></div><div>Consider ca testul 8 de pe Linux are un bug, care apare pentru procesul cu prioritate 4 (P4) la rularea <so_signal(DEV1)>.</div><div>Dupa cum am inteles eu enuntul, ordinea rularii proceselor pentru acest caz e urmatoarea:</div>
<div><br></div><div>- Main process forks and starts P2</div><div>- P2 waits DEV3, which doesn't exist</div><div>- P2 forks and starts P4</div><div>- P4 waits DEV0 and blocks</div><div>- P2 forks and starts P3</div><div>
- P3 waits DEV0 and blocks</div><div>- P2 forks and starts P1, but is preempted because total quantum time is 1</div><div>- P1 signals DEV3, which doesn't exist</div><div>- P2 exec and is preempted, because of quantum time</div>
<div>- P1 exec</div><div>- P2 exec and is preempted, because of quantum time</div><div>- P1 signals DEV0 and awakes P3, P4 => we will have P2, P3, P4 in READY</div><div>- P4 runs because it has the best priority and signals DEV1 => ERROR</div>
<div><br></div><div>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, </div><div>si astfel ruleaza <so_fail("P4 should wake P2 (dev1)")>.</div>
<div><br></div><div>Mihai</div><div><br></div><div><div><br></div>-- <br>Mihail Costea<div>E-mail : <a href="mailto:mihail.costea90@gmail.com" target="_blank">mihail.costea90@gmail.com</a></div><div>Telephone : +40725245085</div>
<br>
</div>