Difference between revisions of "Prova Teorica 2009.09.18"
Jump to navigation
Jump to search
(Created page with "=[http://www.cs.unibo.it/~renzo/so/compiti/2009-09-18.tot.pdf TESTO COMPITO]= =CONCORRENZA= ==Esercizio 1== {| CELLSPACING="0" COLS="13" BORDER="0"<COLGROUP WIDTH="103"></COL...") |
|||
Line 408: | Line 408: | ||
| STYLE="border-top: 1px solid #000000; border-bottom: 1px solid #000000; border-left: 1px solid #000000; border-right: 1px solid #000000" ALIGN="CENTER" VALIGN=MIDDLE SDVAL="1" SDNUM="1033;" | 1 | | STYLE="border-top: 1px solid #000000; border-bottom: 1px solid #000000; border-left: 1px solid #000000; border-right: 1px solid #000000" ALIGN="CENTER" VALIGN=MIDDLE SDVAL="1" SDNUM="1033;" | 1 | ||
| STYLE="border-top: 1px solid #000000; border-bottom: 1px solid #000000; border-left: 1px solid #000000; border-right: 1px solid #000000" ALIGN="CENTER" VALIGN=MIDDLE SDVAL="1" SDNUM="1033;" | 1 | | STYLE="border-top: 1px solid #000000; border-bottom: 1px solid #000000; border-left: 1px solid #000000; border-right: 1px solid #000000" ALIGN="CENTER" VALIGN=MIDDLE SDVAL="1" SDNUM="1033;" | 1 | ||
− | | STYLE="border-top: 1px solid #000000; border-bottom: 1px solid #000000; border-left: 1px solid #000000; border-right: 1px solid #000000" ALIGN="CENTER" VALIGN=MIDDLE SDVAL=" | + | | STYLE="border-top: 1px solid #000000; border-bottom: 1px solid #000000; border-left: 1px solid #000000; border-right: 1px solid #000000" ALIGN="CENTER" VALIGN=MIDDLE SDVAL="2" SDNUM="1033;" | 2 |
− | | STYLE="border-top: 1px solid #000000; border-bottom: 1px solid #000000; border-left: 1px solid #000000; border-right: 1px solid #000000" ALIGN="CENTER" VALIGN=MIDDLE SDVAL=" | + | | STYLE="border-top: 1px solid #000000; border-bottom: 1px solid #000000; border-left: 1px solid #000000; border-right: 1px solid #000000" ALIGN="CENTER" VALIGN=MIDDLE SDVAL="2" SDNUM="1033;" | 2 |
− | | STYLE="border-top: 1px solid #000000; border-bottom: 1px solid #000000; border-left: 1px solid #000000; border-right: 1px solid #000000" ALIGN="CENTER" VALIGN=MIDDLE SDVAL=" | + | | STYLE="border-top: 1px solid #000000; border-bottom: 1px solid #000000; border-left: 1px solid #000000; border-right: 1px solid #000000" ALIGN="CENTER" VALIGN=MIDDLE SDVAL="2" SDNUM="1033;" | 2 |
− | | STYLE="border-top: 1px solid #000000; border-bottom: 1px solid #000000; border-left: 1px solid #000000; border-right: 1px solid #000000" ALIGN="CENTER" VALIGN=MIDDLE SDVAL=" | + | | STYLE="border-top: 1px solid #000000; border-bottom: 1px solid #000000; border-left: 1px solid #000000; border-right: 1px solid #000000" ALIGN="CENTER" VALIGN=MIDDLE SDVAL="2" SDNUM="1033;" | 2 |
| STYLE="border-top: 1px solid #000000; border-bottom: 1px solid #000000; border-left: 1px solid #000000; border-right: 1px solid #000000" ALIGN="CENTER" VALIGN=MIDDLE SDVAL="1" SDNUM="1033;" | 1 | | STYLE="border-top: 1px solid #000000; border-bottom: 1px solid #000000; border-left: 1px solid #000000; border-right: 1px solid #000000" ALIGN="CENTER" VALIGN=MIDDLE SDVAL="1" SDNUM="1033;" | 1 | ||
| STYLE="border-top: 1px solid #000000; border-bottom: 1px solid #000000; border-left: 1px solid #000000; border-right: 1px solid #000000" ALIGN="CENTER" VALIGN=MIDDLE SDVAL="1" SDNUM="1033;" | 1 | | STYLE="border-top: 1px solid #000000; border-bottom: 1px solid #000000; border-left: 1px solid #000000; border-right: 1px solid #000000" ALIGN="CENTER" VALIGN=MIDDLE SDVAL="1" SDNUM="1033;" | 1 | ||
Line 436: | Line 436: | ||
| STYLE="border-top: 1px solid #000000; border-bottom: 1px solid #000000; border-left: 1px solid #000000; border-right: 1px solid #000000" ALIGN="CENTER" VALIGN=MIDDLE SDVAL="2" SDNUM="1033;" | 2 | | STYLE="border-top: 1px solid #000000; border-bottom: 1px solid #000000; border-left: 1px solid #000000; border-right: 1px solid #000000" ALIGN="CENTER" VALIGN=MIDDLE SDVAL="2" SDNUM="1033;" | 2 | ||
| STYLE="border-top: 1px solid #000000; border-bottom: 1px solid #000000; border-left: 1px solid #000000; border-right: 1px solid #000000" ALIGN="CENTER" VALIGN=MIDDLE SDVAL="2" SDNUM="1033;" | 2 | | STYLE="border-top: 1px solid #000000; border-bottom: 1px solid #000000; border-left: 1px solid #000000; border-right: 1px solid #000000" ALIGN="CENTER" VALIGN=MIDDLE SDVAL="2" SDNUM="1033;" | 2 | ||
− | | STYLE="border-top: 1px solid #000000; border-bottom: 1px solid #000000; border-left: 1px solid #000000; border-right: 1px solid #000000" ALIGN="CENTER" VALIGN=MIDDLE SDVAL=" | + | | STYLE="border-top: 1px solid #000000; border-bottom: 1px solid #000000; border-left: 1px solid #000000; border-right: 1px solid #000000" ALIGN="CENTER" VALIGN=MIDDLE SDVAL="3" SDNUM="1033;" | 3 |
− | | STYLE="border-top: 1px solid #000000; border-bottom: 1px solid #000000; border-left: 1px solid #000000; border-right: 1px solid #000000" ALIGN="CENTER" VALIGN=MIDDLE SDVAL=" | + | | STYLE="border-top: 1px solid #000000; border-bottom: 1px solid #000000; border-left: 1px solid #000000; border-right: 1px solid #000000" ALIGN="CENTER" VALIGN=MIDDLE SDVAL="3" SDNUM="1033;" | 3 |
− | | STYLE="border-top: 1px solid #000000; border-bottom: 1px solid #000000; border-left: 1px solid #000000; border-right: 1px solid #000000" ALIGN="CENTER" VALIGN=MIDDLE SDVAL=" | + | | STYLE="border-top: 1px solid #000000; border-bottom: 1px solid #000000; border-left: 1px solid #000000; border-right: 1px solid #000000" ALIGN="CENTER" VALIGN=MIDDLE SDVAL="3" SDNUM="1033;" | 3 |
− | | STYLE="border-top: 1px solid #000000; border-bottom: 1px solid #000000; border-left: 1px solid #000000; border-right: 1px solid #000000" ALIGN="CENTER" VALIGN=MIDDLE SDVAL=" | + | | STYLE="border-top: 1px solid #000000; border-bottom: 1px solid #000000; border-left: 1px solid #000000; border-right: 1px solid #000000" ALIGN="CENTER" VALIGN=MIDDLE SDVAL="3" SDNUM="1033;" | 3 |
| STYLE="border-top: 1px solid #000000; border-bottom: 1px solid #000000; border-left: 1px solid #000000; border-right: 1px solid #000000" ALIGN="CENTER" VALIGN=MIDDLE SDVAL="2" SDNUM="1033;" | 2 | | STYLE="border-top: 1px solid #000000; border-bottom: 1px solid #000000; border-left: 1px solid #000000; border-right: 1px solid #000000" ALIGN="CENTER" VALIGN=MIDDLE SDVAL="2" SDNUM="1033;" | 2 | ||
| STYLE="border-top: 1px solid #000000; border-bottom: 1px solid #000000; border-left: 1px solid #000000; border-right: 1px solid #000000" ALIGN="CENTER" VALIGN=MIDDLE SDVAL="2" SDNUM="1033;" | 2 | | STYLE="border-top: 1px solid #000000; border-bottom: 1px solid #000000; border-left: 1px solid #000000; border-right: 1px solid #000000" ALIGN="CENTER" VALIGN=MIDDLE SDVAL="2" SDNUM="1033;" | 2 | ||
Line 464: | Line 464: | ||
| STYLE="border-top: 1px solid #000000; border-bottom: 1px solid #000000; border-left: 1px solid #000000; border-right: 1px solid #000000" ALIGN="CENTER" VALIGN=MIDDLE SDVAL="3" SDNUM="1033;" | 3 | | STYLE="border-top: 1px solid #000000; border-bottom: 1px solid #000000; border-left: 1px solid #000000; border-right: 1px solid #000000" ALIGN="CENTER" VALIGN=MIDDLE SDVAL="3" SDNUM="1033;" | 3 | ||
| STYLE="border-top: 1px solid #000000; border-bottom: 1px solid #000000; border-left: 1px solid #000000; border-right: 1px solid #000000" ALIGN="CENTER" VALIGN=MIDDLE SDVAL="3" SDNUM="1033;" | 3 | | STYLE="border-top: 1px solid #000000; border-bottom: 1px solid #000000; border-left: 1px solid #000000; border-right: 1px solid #000000" ALIGN="CENTER" VALIGN=MIDDLE SDVAL="3" SDNUM="1033;" | 3 | ||
− | | STYLE="border-top: 1px solid #000000; border-bottom: 1px solid #000000; border-left: 1px solid #000000; border-right: 1px solid #000000" ALIGN="CENTER" VALIGN=MIDDLE SDVAL=" | + | | STYLE="border-top: 1px solid #000000; border-bottom: 1px solid #000000; border-left: 1px solid #000000; border-right: 1px solid #000000" ALIGN="CENTER" VALIGN=MIDDLE SDVAL="4" SDNUM="1033;" | 4 |
− | | STYLE="border-top: 1px solid #000000; border-bottom: 1px solid #000000; border-left: 1px solid #000000; border-right: 1px solid #000000" ALIGN="CENTER" VALIGN=MIDDLE SDVAL=" | + | | STYLE="border-top: 1px solid #000000; border-bottom: 1px solid #000000; border-left: 1px solid #000000; border-right: 1px solid #000000" ALIGN="CENTER" VALIGN=MIDDLE SDVAL="4" SDNUM="1033;" | 4 |
− | | STYLE="border-top: 1px solid #000000; border-bottom: 1px solid #000000; border-left: 1px solid #000000; border-right: 1px solid #000000" ALIGN="CENTER" VALIGN=MIDDLE SDVAL=" | + | | STYLE="border-top: 1px solid #000000; border-bottom: 1px solid #000000; border-left: 1px solid #000000; border-right: 1px solid #000000" ALIGN="CENTER" VALIGN=MIDDLE SDVAL="4" SDNUM="1033;" | 4 |
− | | STYLE="border-top: 1px solid #000000; border-bottom: 1px solid #000000; border-left: 1px solid #000000; border-right: 1px solid #000000" ALIGN="CENTER" VALIGN=MIDDLE SDVAL=" | + | | STYLE="border-top: 1px solid #000000; border-bottom: 1px solid #000000; border-left: 1px solid #000000; border-right: 1px solid #000000" ALIGN="CENTER" VALIGN=MIDDLE SDVAL="4" SDNUM="1033;" | 4 |
| STYLE="border-top: 1px solid #000000; border-bottom: 1px solid #000000; border-left: 1px solid #000000; border-right: 1px solid #000000" ALIGN="CENTER" VALIGN=MIDDLE SDVAL="3" SDNUM="1033;" | 3 | | STYLE="border-top: 1px solid #000000; border-bottom: 1px solid #000000; border-left: 1px solid #000000; border-right: 1px solid #000000" ALIGN="CENTER" VALIGN=MIDDLE SDVAL="3" SDNUM="1033;" | 3 | ||
| STYLE="border-top: 1px solid #000000; border-bottom: 1px solid #000000; border-left: 1px solid #000000; border-right: 1px solid #000000" ALIGN="CENTER" VALIGN=MIDDLE SDVAL="3" SDNUM="1033;" | 3 | | STYLE="border-top: 1px solid #000000; border-bottom: 1px solid #000000; border-left: 1px solid #000000; border-right: 1px solid #000000" ALIGN="CENTER" VALIGN=MIDDLE SDVAL="3" SDNUM="1033;" | 3 | ||
Line 487: | Line 487: | ||
| STYLE="border-top: 1px solid #000000; border-bottom: 1px solid #000000; border-left: 1px solid #000000; border-right: 1px solid #000000" ALIGN="CENTER" VALIGN=MIDDLE SDVAL="4" SDNUM="1033;" | 4 | | STYLE="border-top: 1px solid #000000; border-bottom: 1px solid #000000; border-left: 1px solid #000000; border-right: 1px solid #000000" ALIGN="CENTER" VALIGN=MIDDLE SDVAL="4" SDNUM="1033;" | 4 | ||
| STYLE="border-top: 1px solid #000000; border-bottom: 1px solid #000000; border-left: 1px solid #000000; border-right: 1px solid #000000" ALIGN="CENTER" VALIGN=MIDDLE SDVAL="4" SDNUM="1033;" | 4 | | STYLE="border-top: 1px solid #000000; border-bottom: 1px solid #000000; border-left: 1px solid #000000; border-right: 1px solid #000000" ALIGN="CENTER" VALIGN=MIDDLE SDVAL="4" SDNUM="1033;" | 4 | ||
− | | STYLE="border-top: 1px solid #000000; border-bottom: 1px solid #000000; border-left: 1px solid #000000; border-right: 1px solid #000000" ALIGN="CENTER" VALIGN=MIDDLE SDVAL=" | + | | STYLE="border-top: 1px solid #000000; border-bottom: 1px solid #000000; border-left: 1px solid #000000; border-right: 1px solid #000000" ALIGN="CENTER" VALIGN=MIDDLE SDVAL="5" SDNUM="1033;" | 5 |
− | | STYLE="border-top: 1px solid #000000; border-bottom: 1px solid #000000; border-left: 1px solid #000000; border-right: 1px solid #000000" ALIGN="CENTER" VALIGN=MIDDLE | + | | STYLE="border-top: 1px solid #000000; border-bottom: 1px solid #000000; border-left: 1px solid #000000; border-right: 1px solid #000000" ALIGN="CENTER" VALIGN=MIDDLE | <BR> |
− | | STYLE="border-top: 1px solid #000000; border-bottom: 1px solid #000000; border-left: 1px solid #000000; border-right: 1px solid #000000" ALIGN="CENTER" VALIGN=MIDDLE | + | | STYLE="border-top: 1px solid #000000; border-bottom: 1px solid #000000; border-left: 1px solid #000000; border-right: 1px solid #000000" ALIGN="CENTER" VALIGN=MIDDLE | <BR> |
− | | STYLE="border-top: 1px solid #000000; border-bottom: 1px solid #000000; border-left: 1px solid #000000; border-right: 1px solid #000000" ALIGN="CENTER" VALIGN=MIDDLE | + | | STYLE="border-top: 1px solid #000000; border-bottom: 1px solid #000000; border-left: 1px solid #000000; border-right: 1px solid #000000" ALIGN="CENTER" VALIGN=MIDDLE | <BR> |
− | | STYLE="border-top: 1px solid #000000; border-bottom: 1px solid #000000; border-left: 1px solid #000000; border-right: 1px solid #000000" ALIGN="CENTER" VALIGN=MIDDLE | + | | STYLE="border-top: 1px solid #000000; border-bottom: 1px solid #000000; border-left: 1px solid #000000; border-right: 1px solid #000000" ALIGN="CENTER" VALIGN=MIDDLE | <BR> |
− | | | + | | ALIGN="LEFT" | <BR> |
− | | STYLE="border-top: 1px solid #000000; border-bottom: 1px solid #000000; border-left | + | | STYLE="border-top: 1px solid #000000; border-bottom: 1px solid #000000; border-left: 1px solid #000000" ALIGN="LEFT" | <BR> |
− | | STYLE="border-top: 1px solid #000000; border-bottom: 1px solid #000000; border-left: 1px solid #000000; border-right: 1px solid #000000" ALIGN=" | + | | STYLE="border-top: 1px solid #000000; border-bottom: 1px solid #000000; border-left: 1px solid #000000; border-right: 1px solid #000000" ALIGN="LEFT" | <BR> |
− | | STYLE="border-top: 1px solid #000000; border-bottom | + | | STYLE="border-top: 1px solid #000000; border-bottom: 1px solid #000000" ALIGN="LEFT" | <BR> |
| STYLE="border-top: 1px solid #000000; border-bottom: 1px solid #000000; border-left: 1px solid #000000; border-right: 1px solid #000000" ALIGN="CENTER" VALIGN=MIDDLE SDVAL="4" SDNUM="1033;" | 4 | | STYLE="border-top: 1px solid #000000; border-bottom: 1px solid #000000; border-left: 1px solid #000000; border-right: 1px solid #000000" ALIGN="CENTER" VALIGN=MIDDLE SDVAL="4" SDNUM="1033;" | 4 | ||
| STYLE="border-top: 1px solid #000000; border-bottom: 1px solid #000000; border-left: 1px solid #000000; border-right: 1px solid #000000" ALIGN="CENTER" VALIGN=MIDDLE SDVAL="4" SDNUM="1033;" | 4 | | STYLE="border-top: 1px solid #000000; border-bottom: 1px solid #000000; border-left: 1px solid #000000; border-right: 1px solid #000000" ALIGN="CENTER" VALIGN=MIDDLE SDVAL="4" SDNUM="1033;" | 4 | ||
Line 515: | Line 515: | ||
| STYLE="border-top: 1px solid #000000; border-bottom: 1px solid #000000; border-left: 1px solid #000000; border-right: 1px solid #000000" ALIGN="CENTER" VALIGN=MIDDLE SDVAL="5" SDNUM="1033;" | 5 | | STYLE="border-top: 1px solid #000000; border-bottom: 1px solid #000000; border-left: 1px solid #000000; border-right: 1px solid #000000" ALIGN="CENTER" VALIGN=MIDDLE SDVAL="5" SDNUM="1033;" | 5 | ||
| STYLE="border-top: 1px solid #000000; border-bottom: 1px solid #000000; border-left: 1px solid #000000; border-right: 1px solid #000000" ALIGN="CENTER" VALIGN=MIDDLE SDVAL="5" SDNUM="1033;" | 5 | | STYLE="border-top: 1px solid #000000; border-bottom: 1px solid #000000; border-left: 1px solid #000000; border-right: 1px solid #000000" ALIGN="CENTER" VALIGN=MIDDLE SDVAL="5" SDNUM="1033;" | 5 | ||
− | | STYLE="border-top: 1px solid #000000; border-bottom: 1px solid #000000; border-left: 1px solid #000000; border-right: 1px solid #000000" ALIGN=" | + | | STYLE="border-top: 1px solid #000000; border-bottom: 1px solid #000000; border-left: 1px solid #000000; border-right: 1px solid #000000" ALIGN="LEFT" | <BR> |
− | | STYLE="border-top: 1px solid #000000; border-bottom: 1px solid #000000; border-left: 1px solid #000000; border-right: 1px solid #000000" ALIGN="CENTER" VALIGN=MIDDLE | + | | STYLE="border-top: 1px solid #000000; border-bottom: 1px solid #000000; border-left: 1px solid #000000; border-right: 1px solid #000000" ALIGN="CENTER" VALIGN=MIDDLE | <BR> |
− | | STYLE="border-top: 1px solid #000000; border-bottom: 1px solid #000000; border-left: 1px solid #000000; border-right: 1px solid #000000" ALIGN="CENTER" VALIGN=MIDDLE | + | | STYLE="border-top: 1px solid #000000; border-bottom: 1px solid #000000; border-left: 1px solid #000000; border-right: 1px solid #000000" ALIGN="CENTER" VALIGN=MIDDLE | <BR> |
− | | STYLE="border-top: 1px solid #000000; border-bottom: 1px solid #000000; border-left: 1px solid #000000; border-right: 1px solid #000000" ALIGN="CENTER" VALIGN=MIDDLE | + | | STYLE="border-top: 1px solid #000000; border-bottom: 1px solid #000000; border-left: 1px solid #000000; border-right: 1px solid #000000" ALIGN="CENTER" VALIGN=MIDDLE | <BR> |
− | | STYLE="border-top: 1px solid #000000; border-bottom: 1px solid #000000; border-left: 1px solid #000000; border-right: 1px solid #000000" ALIGN="CENTER" VALIGN=MIDDLE | + | | STYLE="border-top: 1px solid #000000; border-bottom: 1px solid #000000; border-left: 1px solid #000000; border-right: 1px solid #000000" ALIGN="CENTER" VALIGN=MIDDLE | <BR> |
− | | STYLE="border-top: 1px solid #000000; border-bottom: 1px solid #000000; border-left: 1px solid #000000; border-right: 1px solid #000000" ALIGN="CENTER" VALIGN=MIDDLE | + | | STYLE="border-top: 1px solid #000000; border-bottom: 1px solid #000000; border-left: 1px solid #000000; border-right: 1px solid #000000" ALIGN="CENTER" VALIGN=MIDDLE | <BR> |
− | | STYLE="border-top: 1px solid #000000; border-bottom: 1px solid #000000; border-left: 1px solid #000000; border-right: 1px solid #000000" ALIGN="CENTER" VALIGN=MIDDLE | + | | STYLE="border-top: 1px solid #000000; border-bottom: 1px solid #000000; border-left: 1px solid #000000; border-right: 1px solid #000000" ALIGN="CENTER" VALIGN=MIDDLE | <BR> |
− | | STYLE="border-top: 1px solid #000000; border-bottom: 1px solid #000000; border-left: 1px solid #000000; border-right: 1px solid #000000" ALIGN="CENTER" VALIGN=MIDDLE | + | | STYLE="border-top: 1px solid #000000; border-bottom: 1px solid #000000; border-left: 1px solid #000000; border-right: 1px solid #000000" ALIGN="CENTER" VALIGN=MIDDLE | <BR> |
− | | STYLE="border-top: 1px solid #000000; border-bottom: 1px solid #000000; border-left: 1px solid #000000; border-right: 1px solid #000000" ALIGN="CENTER" VALIGN=MIDDLE | + | | STYLE="border-top: 1px solid #000000; border-bottom: 1px solid #000000; border-left: 1px solid #000000; border-right: 1px solid #000000" ALIGN="CENTER" VALIGN=MIDDLE | <BR> |
− | | STYLE="border-top: 1px solid #000000; border-bottom: 1px solid #000000; border-left: 1px solid #000000; border-right: 1px solid #000000" ALIGN="CENTER" VALIGN=MIDDLE | + | | STYLE="border-top: 1px solid #000000; border-bottom: 1px solid #000000; border-left: 1px solid #000000; border-right: 1px solid #000000" ALIGN="CENTER" VALIGN=MIDDLE | <BR> |
− | | STYLE="border-top: 1px solid #000000; border-bottom: 1px solid #000000; border-left: 1px solid #000000; border-right: 1px solid #000000" ALIGN="CENTER" VALIGN=MIDDLE | + | | STYLE="border-top: 1px solid #000000; border-bottom: 1px solid #000000; border-left: 1px solid #000000; border-right: 1px solid #000000" ALIGN="CENTER" VALIGN=MIDDLE | <BR> |
− | | STYLE="border-top: 1px solid #000000; border-bottom: 1px solid #000000; border-left: 1px solid #000000; border-right: 1px solid #000000" ALIGN="CENTER" VALIGN=MIDDLE | + | | STYLE="border-top: 1px solid #000000; border-bottom: 1px solid #000000; border-left: 1px solid #000000; border-right: 1px solid #000000" ALIGN="CENTER" VALIGN=MIDDLE | <BR> |
− | | STYLE="border-top: 1px solid #000000; border-bottom: 1px solid #000000; border-left: 1px solid #000000; border-right: 1px solid #000000" ALIGN="CENTER" VALIGN=MIDDLE | + | | STYLE="border-top: 1px solid #000000; border-bottom: 1px solid #000000; border-left: 1px solid #000000; border-right: 1px solid #000000" ALIGN="CENTER" VALIGN=MIDDLE | <BR> |
|- | |- | ||
| HEIGHT="17" ALIGN="LEFT" | Osservazioni: | | HEIGHT="17" ALIGN="LEFT" | Osservazioni: | ||
Line 562: | Line 562: | ||
| COLSPAN=28 HEIGHT="30" ALIGN="LEFT" | <I>Il meccanismo del WS e' orientato ad ottimizzare la CPU utilization, evitando il cosidetto trashing. Non costituisce un algoritmo di page replacement.</I> | | COLSPAN=28 HEIGHT="30" ALIGN="LEFT" | <I>Il meccanismo del WS e' orientato ad ottimizzare la CPU utilization, evitando il cosidetto trashing. Non costituisce un algoritmo di page replacement.</I> | ||
|- | |- | ||
− | | COLSPAN=28 HEIGHT="30" ALIGN="LEFT" SDNUM="1033;0;@" | <I>Tuttavia, puo' essere utilmente impiegato nell'ambito dell'algoritmo LRU, in quanto definisce una window di riferimenti da mantenere in memoria | + | | COLSPAN=28 HEIGHT="30" ALIGN="LEFT" SDNUM="1033;0;@" | <I>Tuttavia, puo' essere utilmente impiegato nell'ambito dell'algoritmo LRU, in quanto definisce una window di riferimenti da mantenere in memoria.</I> |
|- | |- | ||
| COLSPAN=28 HEIGHT="30" ALIGN="LEFT" | <I>Il problema precipuo dell'algoritmo LRU e' giustappunto il metodo di memorizzazione della serie storica delle pagine accedute.</I> | | COLSPAN=28 HEIGHT="30" ALIGN="LEFT" | <I>Il problema precipuo dell'algoritmo LRU e' giustappunto il metodo di memorizzazione della serie storica delle pagine accedute.</I> |
Latest revision as of 09:57, 23 April 2014
TESTO COMPITO
CONCORRENZA
Esercizio 1
Operation | Urgent Stack | c[0] | c[1] | … | c[N-2] | c[N-1] | n[0] | n[1] | … | n[N-2] | n[N-1] | tot | |
initialization | nil | nil | nil | … | nil | nil | 0 | 0 | … | 0 | 0 | ||
p[0]: bar(0) | p[0] | 1 | 0 | ||||||||||
p[1]: bar(1) | p[1] | 1 | 0 | ||||||||||
… | … | … | … | ||||||||||
p[N-2]: bar(N-2) | p[N-2] | 1 | 0 | ||||||||||
p[N-1]: bar(N-1) | p[N-1] | 1 | 1 | ||||||||||
p[0]: bar(0) | p[N-1], p[0] | nil | |||||||||||
p[1]: bar(1) | p[N-1], p[0], p[1] | nil | |||||||||||
… | p[N-1], p[0], p[1], … | … | |||||||||||
p[N-2]: bar(N-2) | p[N-1], p[0], p[1], …, p[N-3] | nil | 0 | ||||||||||
… | … | … | |||||||||||
p[1]: bar(1) | p[N-1], p[0] | 0 | |||||||||||
p[0]: bar(0) | p[N-1] | 0 | |||||||||||
p[N-1]: bar(N-1) | nill | 0 | |||||||||||
Descrizione: | I processi si disattivano fino a quando tutti gli elementi dell'array <n> assumono valore maggiore di 0. | ||||||||||||
Il processo che ha assegnato l'ultimo valore riattiva il processo con indice successivo (in modo circolare), e cosi' via a cascata. | |||||||||||||
Viene popolato e consumato l'urgent stack. | |||||||||||||
Progressivamente i valori contenuti nell'array risultano diminuiti di 1. | |||||||||||||
Non necessariamente tornano a 0. |
Esercizio 2
Queue recvdigest()
{
Queue buffer;
asend(BookMark, getpid());
message = arecv(*);
if (message == BookMark)
buffer.enqueue(arecv(*));
else
{
do
{
buffer.enqueue(message);
message = arecv(*);
} until (message == BookMark)
}
return buffer;
}
GENERALE
Esercizio 1
Reference String | 1 | 2 | 3 | 4 | 5 | 1 | 2 | 3 | 4 | 5 | 1 | 2 | 3 | 1 | 2 | 3 | 2 | 3 | 4 | 2 | 3 | 4 | 1 | 2 | 3 | 4 | 5 |
Least Recently Used policy: | |||||||||||||||||||||||||||
frame 1 | 1 | 1 | 1 | 4 | 4 | 4 | 2 | 2 | 2 | 5 | 5 | 5 | 3 | 3 | 3 | 3 | 3 | 3 | 3 | 3 | 3 | 3 | 3 | 2 | 2 | 2 | 5 |
frame 2 | 2 | 2 | 2 | 5 | 5 | 4 | 3 | 3 | 3 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 4 | 4 | 4 | 4 | 4 | 4 | 3 | 3 | 3 | |
frame 3 | 3 | 3 | 3 | 1 | 5 | 5 | 4 | 4 | 4 | 2 | 2 | 2 | 2 | 2 | 2 | 2 | 2 | 2 | 2 | 2 | 1 | 1 | 1 | 4 | 4 | ||
Working Set: | |||||||||||||||||||||||||||
Working Set Window | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 2 | 2 | 2 | 2 | 1 | 1 | 1 | 1 |
2 | 2 | 2 | 2 | 2 | 2 | 2 | 2 | 2 | 2 | 2 | 2 | 2 | 2 | 2 | 2 | 2 | 2 | 3 | 3 | 3 | 3 | 2 | 2 | 2 | 2 | ||
3 | 3 | 3 | 3 | 3 | 3 | 3 | 3 | 3 | 3 | 3 | 3 | 3 | 3 | 3 | 3 | 3 | 4 | 4 | 4 | 4 | 3 | 3 | 3 | 3 | |||
4 | 4 | 4 | 4 | 4 | 4 | 4 | 4 | 4 | 4 | 4 | 5 | 4 | 4 | 4 | 4 | ||||||||||||
5 | 5 | 5 | 5 | 5 | 5 | 5 | 5 | 5 | 5 | ||||||||||||||||||
Osservazioni: | |||||||||||||||||||||||||||
Ambedue i meccanismi si fondano sul fenomeno denominato principle of locality. | |||||||||||||||||||||||||||
Il meccanismo del WS e' orientato ad ottimizzare la CPU utilization, evitando il cosidetto trashing. Non costituisce un algoritmo di page replacement. | |||||||||||||||||||||||||||
Tuttavia, puo' essere utilmente impiegato nell'ambito dell'algoritmo LRU, in quanto definisce una window di riferimenti da mantenere in memoria. | |||||||||||||||||||||||||||
Il problema precipuo dell'algoritmo LRU e' giustappunto il metodo di memorizzazione della serie storica delle pagine accedute. | |||||||||||||||||||||||||||
Nella fattispecie, data una reference string contenente una permutazione di 5 riferimenti, e dato un WS con window size pari a 5, tutte le pagine rimpiazzate si ritrovano nel WS. |