Tags:
tag this topic
create new tag
view all tags
<html> <head> <title>SO 12-1-99</title> </head> <body> <p><b><font face="Arial"><font size=+1>Compito di Sistemi Operativi, Prof. Mancini - 12 gennaio 1999</font></font></b></center> <p> <hr> <p><b><font size=+1>1.</font></b> (punti: -1,4) <p>Esistono sistemi operativi dove, <ol TYPE="a"> <li> alcuni processi sono permanenti, cioè definiti staticamente come componenti del sistema;</li> <li> alcuni processi sono permanenti, cioè definiti dinamicamente come componenti del sistema;</li> <li> tutti i processi sono permanenti, cioè definiti staticamente come componenti del sistema;</li> <li> tutti i processi sono permanenti, cioè definiti dinamicamente come componenti del sistema;</li> <li> nessun processo e' permanente, cioè definito staticamente come componente del sistema;</li> <li> nessun processo e' permanente, cioè definito dinamicamente come componente del sistema;</li> <li> nessuna delle affermazioni precedenti è corretta.</li> </ol> <b><font size=+1>2.</font></b> (punti: -1,4) <p>Nel sistema Unix la chiamata di sistema denominata fork eseguita dal processo P<sub>i</sub>: <ol TYPE="a"> <li> genera un processo P<sub>j</sub> che e' una copia di P<sub>i</sub>, e restituisce a P<sub>i</sub> l'indice zero e a P<sub>j</sub> il file-descriptor di P<sub>i</sub>. I processi P<sub>i</sub> e P<sub>j</sub> hanno descrittori e immagini in memoria distinte.</li> <li> genera un processo P<sub>j</sub> che e' una copia di P<sub>i</sub>, e restituisce a P<sub>i</sub> il file-descriptor di P<sub>j</sub> e a P<sub>j</sub> l'indice zero. I processi P<sub>i</sub> e P<sub>j</sub> hanno descrittori e immagini in memoria distinte.</li> <li> genera un processo P<sub>j</sub> che e' una copia di P<sub>i</sub>, e restituisce a P<sub>i</sub> l'indice zero e a P<sub>j</sub> il PID di P<sub>i</sub>. I processi P<sub>i</sub> e P<sub>j</sub> hanno descrittori e immagini in memoria distinte.</li> <li> genera un processo P<sub>j</sub> che e' una copia di P<sub>i</sub>, e restituisce a P<sub>i</sub> l'indice zero e a P<sub>j</sub> il PID di P<sub>i</sub>. I processi P<sub>i</sub> e P<sub>j</sub> non hanno descrittori e immagini in memoria distinte.</li> <li> genera un processo P<sub>j</sub> che e' una copia di P<sub>i</sub>, e restituisce a P<sub>i</sub> il PID di P<sub>j</sub> e a P<sub>j</sub> l'indice zero. I processi P<sub>i</sub> e P<sub>j</sub> hanno descrittori e immagini in memoria distinte.</li> <li> genera un processo P<sub>j</sub> che e' una copia di P<sub>i</sub>, e restituisce a P<sub>i</sub> il PID di P<sub>j</sub> e a P<sub>j</sub> l'indice zero. I processi P<sub>i</sub> e P<sub>j</sub> non hanno descrittori e immagini in memoria distinte.</li> <li> consente dopo la generazione l'avanzamento dei due processi P<sub>i</sub> e P<sub>j</sub> eseguendo il medesimo programma a partire da un indirizzo logico comune;</li> <li> consente dopo la generazione l'avanzamento dei due processi P<sub>i</sub> e P<sub>j</sub> eseguendo il medesimo programma a partire da un indirizzo fisico comune;</li> <li> nessuna delle affermazioni precedenti e' corretta.</li> </ol> <b><font size=+1>3.</font></b> (punti: -1,4) <p>Le seguenti quattro condizioni (1) le risorse sono seriali, (2) le risorse sono non prerilasciabili, (3) le risorse sono gestite con richiesta bloccante, e (4) il sistema raggiunge uno stato di attesa circolare, solo collettivamente: <ol TYPE="a"> <li> necessarie affinche' si verifichi lo stallo;</li> <li> sufficienti affinche' si verifichi lo stallo;</li> <li> necessarie affinche' si verifichi l'attesa indefinita;</li> <li> sufficienti affinche' si verifichi l'attesa indefinita;</li> <li> necessarie e sufficienti affinche' si verifichi l'attesa indefinita;</li> <li> nessuna delle affermazioni precedenti e' corretta.</li> </ol> <b><font size=+1>4.</font></b> (punti: -1,4) <p>Nei sistemi operativi l'identificazione degli utenti avviene tramite una parola d'ordine password. Ipotizzando parole d'ordine di 8 caratteri, scelti in un alfabeto di 80 simboli (lettere maiuscole, minuscole, cifre decimali e caratteri speciali): <ol TYPE="a"> <li> le possibili combinazioni sarebbero 8<sup>80</sup> e per scoprire la vera parola d'ordine bisognerebbe provarne in media la meta';</li> <li> le possibili combinazioni sarebbero 80<sup>8</sup> e per scoprire la vera parola d'ordine bisognerebbe provarne in media la meta';</li> <li> le possibili combinazioni sarebbero 80 * 8 e per scoprire la vera parola d'ordine bisognerebbe provarne in media la radice quadrata;</li> <li> le possibili combinazioni sarebbero 8<sup>80</sup> e per scoprire la vera parola d'ordine bisognerebbe provarne in media un numero lineare;</li> <li> le possibili combinazioni sarebbero 80<sup>8</sup> e per scoprire la vera parola d'ordine bisognerebbe provarne in media il doppio;</li> <li> le possibili combinazioni sarebbero 80 * 8 e per scoprire la vera parola d'ordine bisognerebbe provarne in media un numero esponenziale;</li> <li> nessuna delle affermazioni precedenti è corretta.</li> </ol> <b><font size=+1>5.</font></b> (punti: 6) <p>Illustrare in al più 60 parole il fenomeno conosciuto sotto il nome di thrashing <p><b><font size=+1>6.</font></b> Considerare un insieme di cinque processi P1, P2, P3, P4, P5 con i seguenti tempi di arrivo e tempi di esecuzione in millisecondi: <br> <table BORDER CELLPADDING=4 WIDTH="373" > <tr> <td VALIGN=TOP WIDTH="22%" BGCOLOR="#C0C0C0"> <center><b>Processo</b></center> </td> <td VALIGN=TOP WIDTH="33%" BGCOLOR="#C0C0C0"> <center><b>Tempo di arrivo</b></center> </td> <td VALIGN=TOP WIDTH="46%" BGCOLOR="#C0C0C0"> <center><b>Tempo di esecuzione</b></center> </td> </tr> <tr> <td VALIGN=TOP WIDTH="22%" BGCOLOR="#C0C0C0"> <center><b>P1</b></center> </td> <td VALIGN=TOP WIDTH="33%"> <center>0</center> </td> <td VALIGN=TOP WIDTH="46%"> <center>20</center> </td> </tr> <tr> <td VALIGN=TOP WIDTH="22%" BGCOLOR="#C0C0C0"> <center><b>P2</b></center> </td> <td VALIGN=TOP WIDTH="33%"> <center>8</center> </td> <td VALIGN=TOP WIDTH="46%"> <center>5</center> </td> </tr> <tr> <td VALIGN=TOP WIDTH="22%" BGCOLOR="#C0C0C0"> <center><b>P3</b></center> </td> <td VALIGN=TOP WIDTH="33%"> <center>3</center> </td> <td VALIGN=TOP WIDTH="46%"> <center>12</center> </td> </tr> <tr> <td VALIGN=TOP WIDTH="22%" BGCOLOR="#C0C0C0"> <center><b>P4</b></center> </td> <td VALIGN=TOP WIDTH="33%"> <center>10</center> </td> <td VALIGN=TOP WIDTH="46%"> <center>6</center> </td> </tr> <tr> <td VALIGN=TOP WIDTH="22%" BGCOLOR="#C0C0C0"> <center><b>P5</b></center> </td> <td VALIGN=TOP WIDTH="33%"> <center>7</center> </td> <td VALIGN=TOP WIDTH="46%"> <center>8</center> </td> </tr> </table> <dir> <dir><b>a</b> (punti: 4) <p>Assegnare questo insieme di processi ad un processore in base alla politica Shortest Job First. <p><b>b</b> (punti: 2) <p>Calcolare il valor medio del tempo di attesa dei processi. <p><b>c</b> (punti: 2) <p>Calcolare il valor medio del tempo di turnaround dei processi. <br> <br> </dir> </dir> <b><font size=+1>7.</font></b> Considerare la seguente stringa di riferimenti di un processo alla memoria in un sistema con memoria virtuale <p>S = 9 3 1 0 1 3 5 9 15 1 3 6 4 6 5 1 7 4 6 3 <dir> <dir><b>a</b> (punti: 3) <p>Illustrare il comportamento dell'algoritmo Second Chance di sostituzione delle pagine per una memoria fisica di 5 blocchi. Calcolare il numero di page fault che si verificano. <p><b>b</b> (punti: 3) <p>Illustrare il comportamento dell'algoritmo LRU di sostituzione delle pagine per una memoria fisica di 5 blocchi. Calcolare il numero di page fault che si verificano.</dir> </dir> <b><font size=+1>8.</font></b> (punti: 10) <p>Utilizzare le primitive P e V definite sui semafori per realizzare un semplice programma concorrente che possa causare l'attesa indefinita ma non lo stallo dei processi componenti. <p><b><font size=+1>9.</font></b> (punti: 8) <p>Realizzare un Perl script efficiente che legga il contenuto degli archivi passati come parametro e stampi ciascuna linea nello standard output a meno che la linea non sia già stata stampata prima. Si assuma che i dati da leggere non possano essere contenuti completamente in memoria centrale. <br> <br> <p> <hr> <center> <p><b><font face="Arial"><font size=+1>Risultati della prova</font></font></b></center> <p> <hr> <pre><b>1.a,c 2.e,g 3.a,b 4.b</b></pre> <hr> <p><font size=+1><b>5. </b>In caso di gestione di memoria virtuale, il thrashing consiste nella frequente alternanza di caricamenti e scaricamenti di un ristretto numero di pagine di memoria durante l'esecuzione di un processo. Questo fenomeno contribuisce a ridurre la velocita' di avanzamento dei processi.</font> <p> <hr> <p><b><font size=+1>6.</font></b> <p><font face="Courier New"><font size=-1>a) Algoritmo <b>Shortest Job First</b>:</font></font> <br> <table BORDER WIDTH="635" > <tr> <td VALIGN=TOP WIDTH="11%"> <center><b><font face="Courier New"><font size=-1>P<sub>1</sub></font></font></b></center> </td> <td VALIGN=TOP WIDTH="11%"> <center><b><font face="Courier New"><font size=-1>P<sub>3</sub></font></font></b></center> </td> <td VALIGN=TOP WIDTH="11%"> <center><b><font face="Courier New"><font size=-1>P<sub>2</sub></font></font></b></center> </td> <td VALIGN=TOP WIDTH="11%"> <center><b><font face="Courier New"><font size=-1>P<sub>4</sub></font></font></b></center> </td> <td VALIGN=TOP WIDTH="11%"> <center><b><font face="Courier New"><font size=-1>P<sub>3</sub></font></font></b></center> </td> <td VALIGN=TOP WIDTH="11%"> <center><b><font face="Courier New"><font size=-1>P<sub>5</sub></font></font></b></center> </td> <td VALIGN=TOP WIDTH="11%"> <center><b><font face="Courier New"><font size=-1>P<sub>1</sub></font></font></b></center> </td> </tr> <tr> <td VALIGN=TOP WIDTH="11%"> <center><font face="Courier New"><font size=-1>0-3</font></font></center> </td> <td VALIGN=TOP WIDTH="11%"> <center><font face="Courier New"><font size=-1>3-8</font></font></center> </td> <td VALIGN=TOP WIDTH="11%"> <center><font face="Courier New"><font size=-1>8-13</font></font></center> </td> <td VALIGN=TOP WIDTH="11%"> <center><font face="Courier New"><font size=-1>13-19</font></font></center> </td> <td VALIGN=TOP WIDTH="11%"> <center><font face="Courier New"><font size=-1>19-26</font></font></center> </td> <td VALIGN=TOP WIDTH="11%"> <center><font face="Courier New"><font size=-1>26-34</font></font></center> </td> <td VALIGN=TOP WIDTH="11%"> <center><font face="Courier New"><font size=-1>34-51</font></font></center> </td> </tr> </table> <p><font face="Courier New"><font size=-1>b) media tempo di attesa dei processi: <b>64/5</b></font></font> <br><font face="Courier New"><font size=-1>c) turnaround medio: <b>115/5</b></font></font> <p> <hr> <p><b><font size=+1>7.</font></b> <p><b><font size=+1>a.</font></b><font face="Courier New"><font size=-1> Algoritmo <b>Second Chance</b>:</font></font> <br> <table BORDER WIDTH="94" > <tr> <td VALIGN=CENTER WIDTH="31%" HEIGHT="20" BGCOLOR="#00FF00"> </td> <td VALIGN=CENTER WIDTH="69%" HEIGHT="20"> <center><font face="Courier New"><font size=-1>TurnoMS</font></font></center> </td> </tr> </table> <p> <font face="Courier New"><font size=-1>TurnoMS e' inizializzato a 4.</font></font> <br> <table BORDER CELLPADDING=4 WIDTH="681" > <tr> <td VALIGN=TOP WIDTH="5%" BGCOLOR="#C0C0C0"><font face="Courier New"> </font></td> <td VALIGN=TOP WIDTH="5%" BGCOLOR="#C0C0C0"> <center><b><font face="Courier New"><font size=-1>9</font></font></b></center> </td> <td VALIGN=TOP WIDTH="5%" BGCOLOR="#C0C0C0"> <center><b><font face="Courier New"><font size=-1>3</font></font></b></center> </td> <td VALIGN=TOP WIDTH="5%" BGCOLOR="#C0C0C0"> <center><b><font face="Courier New"><font size=-1>1</font></font></b></center> </td> <td VALIGN=TOP WIDTH="5%" BGCOLOR="#C0C0C0"> <center><b><font face="Courier New"><font size=-1>0</font></font></b></center> </td> <td VALIGN=TOP WIDTH="5%" BGCOLOR="#C0C0C0"> <center><b><font face="Courier New"><font size=-1>1</font></font></b></center> </td> <td VALIGN=TOP WIDTH="5%" BGCOLOR="#C0C0C0"> <center><b><font face="Courier New"><font size=-1>3</font></font></b></center> </td> <td VALIGN=TOP WIDTH="5%" BGCOLOR="#C0C0C0"> <center><b><font face="Courier New"><font size=-1>5</font></font></b></center> </td> <td VALIGN=TOP WIDTH="5%" BGCOLOR="#C0C0C0"> <center><b><font face="Courier New"><font size=-1>9</font></font></b></center> </td> <td VALIGN=TOP WIDTH="5%" BGCOLOR="#C0C0C0"> <center><b><font face="Courier New"><font size=-1>15</font></font></b></center> </td> <td VALIGN=TOP WIDTH="5%" BGCOLOR="#C0C0C0"> <center><b><font face="Courier New"><font size=-1>1</font></font></b></center> </td> <td VALIGN=TOP WIDTH="5%" BGCOLOR="#C0C0C0"> <center><b><font face="Courier New"><font size=-1>3</font></font></b></center> </td> <td VALIGN=TOP WIDTH="5%" BGCOLOR="#C0C0C0"> <center><b><font face="Courier New"><font size=-1>6</font></font></b></center> </td> <td VALIGN=TOP WIDTH="5%" BGCOLOR="#C0C0C0"> <center><b><font face="Courier New"><font size=-1>4</font></font></b></center> </td> <td VALIGN=TOP WIDTH="5%" BGCOLOR="#C0C0C0"> <center><b><font face="Courier New"><font size=-1>6</font></font></b></center> </td> <td VALIGN=TOP WIDTH="5%" BGCOLOR="#C0C0C0"> <center><b><font face="Courier New"><font size=-1>5</font></font></b></center> </td> <td VALIGN=TOP WIDTH="5%" BGCOLOR="#C0C0C0"> <center><b><font face="Courier New"><font size=-1>1</font></font></b></center> </td> <td VALIGN=TOP WIDTH="5%" BGCOLOR="#C0C0C0"> <center><b><font face="Courier New"><font size=-1>7</font></font></b></center> </td> <td VALIGN=TOP WIDTH="5%" BGCOLOR="#C0C0C0"> <center><b><font face="Courier New"><font size=-1>4</font></font></b></center> </td> <td VALIGN=TOP WIDTH="5%" BGCOLOR="#C0C0C0"> <center><b><font face="Courier New"><font size=-1>6</font></font></b></center> </td> <td VALIGN=TOP WIDTH="5%" BGCOLOR="#C0C0C0"> <center><b><font face="Courier New"><font size=-1>3</font></font></b></center> </td> </tr> <tr> <td VALIGN=CENTER WIDTH="5%" BGCOLOR="#C0C0C0"> <center><b><font face="Courier New"><font size=-1>0</font></font></b></center> </td> <td VALIGN=TOP WIDTH="5%" BGCOLOR="#00FF00"> <center><font face="Courier New"><font color="#FF0000"><font size=-1>9<sup>1</sup></font></font></font></center> </td> <td VALIGN=TOP WIDTH="5%"> <center><font face="Courier New"><font size=-1>9<sup>1</sup></font></font></center> </td> <td VALIGN=TOP WIDTH="5%"> <center><font face="Courier New"><font size=-1>9<sup>1</sup></font></font></center> </td> <td VALIGN=TOP WIDTH="5%"> <center><font face="Courier New"><font size=-1>9<sup>1</sup></font></font></center> </td> <td VALIGN=TOP WIDTH="5%"> <center><font face="Courier New"><font size=-1>9<sup>1</sup></font></font></center> </td> <td VALIGN=TOP WIDTH="5%"> <center><font face="Courier New"><font size=-1>9<sup>1</sup></font></font></center> </td> <td VALIGN=TOP WIDTH="5%" BGCOLOR="#FFFFFF"> <center><font face="Courier New"><font size=-1>9<sup>1</sup></font></font></center> </td> <td VALIGN=TOP WIDTH="5%" BGCOLOR="#FFFFFF"> <center><font face="Courier New"><font size=-1>9<sup>1</sup></font></font></center> </td> <td VALIGN=TOP WIDTH="5%" BGCOLOR="#00FF00"> <center><font face="Courier New"><font color="#FF0000"><font size=-1>15<sup>1</sup></font></font></font></center> </td> <td VALIGN=TOP WIDTH="5%" BGCOLOR="#00FF00"> <center><font face="Courier New"><font size=-1>15<sup>1</sup></font></font></center> </td> <td VALIGN=TOP WIDTH="5%" BGCOLOR="#00FF00"> <center><font face="Courier New"><font size=-1>15<sup>1</sup></font></font></center> </td> <td VALIGN=TOP WIDTH="5%" BGCOLOR="#FFFFFF"> <center><font face="Courier New"><font size=-1>15<sup>1</sup></font></font></center> </td> <td VALIGN=TOP WIDTH="5%" BGCOLOR="#FFFFFF"> <center><font face="Courier New"><font size=-1>15<sup>1</sup></font></font></center> </td> <td VALIGN=TOP WIDTH="5%" BGCOLOR="#FFFFFF"> <center><font face="Courier New"><font size=-1>15<sup>1</sup></font></font></center> </td> <td VALIGN=TOP WIDTH="5%" BGCOLOR="#FFFFFF"> <center><font face="Courier New"><font size=-1>15<sup>0</sup></font></font></center> </td> <td VALIGN=TOP WIDTH="5%" BGCOLOR="#FFFFFF"> <center><font face="Courier New"><font size=-1>15<sup>0</sup></font></font></center> </td> <td VALIGN=TOP WIDTH="5%" BGCOLOR="#00FF00"> <center><font face="Courier New"><font color="#FF0000"><font size=-1>7<sup>1</sup></font></font></font></center> </td> <td VALIGN=TOP WIDTH="5%" BGCOLOR="#00FF00"> <center><font face="Courier New"><font size=-1>7<sup>1</sup></font></font></center> </td> <td VALIGN=TOP WIDTH="5%" BGCOLOR="#00FF00"> <center><font face="Courier New"><font size=-1>7<sup>1</sup></font></font></center> </td> <td VALIGN=TOP WIDTH="5%" BGCOLOR="#FFFFFF"> <center><font face="Courier New"><font size=-1>7<sup>1</sup></font></font></center> </td> </tr> <tr> <td VALIGN=CENTER WIDTH="5%" BGCOLOR="#C0C0C0"> <center><b><font face="Courier New"><font size=-1>1</font></font></b></center> </td> <td VALIGN=TOP WIDTH="5%"><font face="Courier New"> </font></td> <td VALIGN=TOP WIDTH="5%" BGCOLOR="#00FF00"> <center><font face="Courier New"><font color="#FF0000"><font size=-1>3<sup>1</sup></font></font></font></center> </td> <td VALIGN=TOP WIDTH="5%"> <center><font face="Courier New"><font size=-1>3<sup>1</sup></font></font></center> </td> <td VALIGN=TOP WIDTH="5%"> <center><font face="Courier New"><font size=-1>3<sup>1</sup></font></font></center> </td> <td VALIGN=TOP WIDTH="5%"> <center><font face="Courier New"><font size=-1>3<sup>1</sup></font></font></center> </td> <td VALIGN=TOP WIDTH="5%"> <center><font face="Courier New"><font size=-1>3<sup>1</sup></font></font></center> </td> <td VALIGN=TOP WIDTH="5%"> <center><font face="Courier New"><font size=-1>3<sup>1</sup></font></font></center> </td> <td VALIGN=TOP WIDTH="5%" BGCOLOR="#FFFFFF"> <center><font face="Courier New"><font size=-1>3<sup>1</sup></font></font></center> </td> <td VALIGN=TOP WIDTH="5%" BGCOLOR="#FFFFFF"> <center><font face="Courier New"><font size=-1>3<sup>0</sup></font></font></center> </td> <td VALIGN=TOP WIDTH="5%" BGCOLOR="#FFFFFF"> <center><font face="Courier New"><font size=-1>3<sup>0</sup></font></font></center> </td> <td VALIGN=TOP WIDTH="5%" BGCOLOR="#FFFFFF"> <center><font face="Courier New"><font size=-1>3<sup>1</sup></font></font></center> </td> <td VALIGN=TOP WIDTH="5%" BGCOLOR="#FFFFFF"> <center><font face="Courier New"><font size=-1>3<sup>0</sup></font></font></center> </td> <td VALIGN=TOP WIDTH="5%" BGCOLOR="#FFFFFF"> <center><font face="Courier New"><font size=-1>3<sup>0</sup></font></font></center> </td> <td VALIGN=TOP WIDTH="5%" BGCOLOR="#FFFFFF"> <center><font face="Courier New"><font size=-1>3<sup>0</sup></font></font></center> </td> <td VALIGN=TOP WIDTH="5%" BGCOLOR="#00FF00"> <center><font face="Courier New"><font color="#FF0000"><font size=-1>5<sup>1</sup></font></font></font></center> </td> <td VALIGN=TOP WIDTH="5%" BGCOLOR="#00FF00"> <center><font face="Courier New"><font size=-1>5<sup>1</sup></font></font></center> </td> <td VALIGN=TOP WIDTH="5%" BGCOLOR="#FFFFFF"> <center><font face="Courier New"><font size=-1>5<sup>1</sup></font></font></center> </td> <td VALIGN=TOP WIDTH="5%" BGCOLOR="#FFFFFF"> <center><font face="Courier New"><font size=-1>5<sup>1</sup></font></font></center> </td> <td VALIGN=TOP WIDTH="5%" BGCOLOR="#FFFFFF"> <center><font face="Courier New"><font size=-1>5<sup>1</sup></font></font></center> </td> <td VALIGN=TOP WIDTH="5%" BGCOLOR="#FFFFFF"> <center><font face="Courier New"><font size=-1>5<sup>0</sup></font></font></center> </td> </tr> <tr> <td VALIGN=CENTER WIDTH="5%" BGCOLOR="#C0C0C0"> <center><b><font face="Courier New"><font size=-1>2</font></font></b></center> </td> <td VALIGN=TOP WIDTH="5%"><font face="Courier New"> </font></td> <td VALIGN=TOP WIDTH="5%"><font face="Courier New"> </font></td> <td VALIGN=TOP WIDTH="5%" BGCOLOR="#00FF00"> <center><font face="Courier New"><font color="#FF0000"><font size=-1>1<sup>1</sup></font></font></font></center> </td> <td VALIGN=TOP WIDTH="5%"> <center><font face="Courier New"><font size=-1>1<sup>1</sup></font></font></center> </td> <td VALIGN=TOP WIDTH="5%"> <center><font face="Courier New"><font size=-1>1<sup>1</sup></font></font></center> </td> <td VALIGN=TOP WIDTH="5%"> <center><font face="Courier New"><font size=-1>1<sup>1</sup></font></font></center> </td> <td VALIGN=TOP WIDTH="5%"> <center><font face="Courier New"><font size=-1>1<sup>1</sup></font></font></center> </td> <td VALIGN=TOP WIDTH="5%" BGCOLOR="#FFFFFF"> <center><font face="Courier New"><font size=-1>1<sup>1</sup></font></font></center> </td> <td VALIGN=TOP WIDTH="5%" BGCOLOR="#FFFFFF"> <center><font face="Courier New"><font size=-1>1<sup>0</sup></font></font></center> </td> <td VALIGN=TOP WIDTH="5%" BGCOLOR="#FFFFFF"> <center><font face="Courier New"><font size=-1>1<sup>1</sup></font></font></center> </td> <td VALIGN=TOP WIDTH="5%" BGCOLOR="#FFFFFF"> <center><font face="Courier New"><font size=-1>1<sup>1</sup></font></font></center> </td> <td VALIGN=TOP WIDTH="5%" BGCOLOR="#FFFFFF"> <center><font face="Courier New"><font size=-1>1<sup>0</sup></font></font></center> </td> <td VALIGN=TOP WIDTH="5%" BGCOLOR="#FFFFFF"> <center><font face="Courier New"><font size=-1>1<sup>0</sup></font></font></center> </td> <td VALIGN=TOP WIDTH="5%" BGCOLOR="#FFFFFF"> <center><font face="Courier New"><font size=-1>1<sup>0</sup></font></font></center> </td> <td VALIGN=TOP WIDTH="5%" BGCOLOR="#FFFFFF"> <center><font face="Courier New"><font size=-1>1<sup>0</sup></font></font></center> </td> <td VALIGN=TOP WIDTH="5%" BGCOLOR="#FFFFFF"> <center><font face="Courier New"><font size=-1>1<sup>1</sup></font></font></center> </td> <td VALIGN=TOP WIDTH="5%" BGCOLOR="#FFFFFF"> <center><font face="Courier New"><font size=-1>1<sup>0</sup></font></font></center> </td> <td VALIGN=TOP WIDTH="5%" BGCOLOR="#FFFFFF"> <center><font face="Courier New"><font size=-1>1<sup>0</sup></font></font></center> </td> <td VALIGN=TOP WIDTH="5%" BGCOLOR="#FFFFFF"> <center><font face="Courier New"><font size=-1>1<sup>0</sup></font></font></center> </td> <td VALIGN=TOP WIDTH="5%" BGCOLOR="#00FF00"> <center><font face="Courier New"><font color="#FF0000"><font size=-1>3<sup>1</sup></font></font></font></center> </td> </tr> <tr> <td VALIGN=CENTER WIDTH="5%" BGCOLOR="#C0C0C0"> <center><b><font face="Courier New"><font size=-1>3</font></font></b></center> </td> <td VALIGN=TOP WIDTH="5%"><font face="Courier New"> </font></td> <td VALIGN=TOP WIDTH="5%"><font face="Courier New"> </font></td> <td VALIGN=TOP WIDTH="5%"><font face="Courier New"> </font></td> <td VALIGN=TOP WIDTH="5%" BGCOLOR="#00FF00"> <center><font face="Courier New"><font color="#FF0000"><font size=-1>0<sup>1</sup></font></font></font></center> </td> <td VALIGN=TOP WIDTH="5%" BGCOLOR="#00FF00"> <center><font face="Courier New"><font size=-1>0<sup>1</sup></font></font></center> </td> <td VALIGN=TOP WIDTH="5%" BGCOLOR="#00FF00"> <center><font face="Courier New"><font size=-1>0<sup>1</sup></font></font></center> </td> <td VALIGN=TOP WIDTH="5%"> <center><font face="Courier New"><font size=-1>0<sup>1</sup></font></font></center> </td> <td VALIGN=TOP WIDTH="5%" BGCOLOR="#FFFFFF"> <center><font face="Courier New"><font size=-1>0<sup>1</sup></font></font></center> </td> <td VALIGN=TOP WIDTH="5%" BGCOLOR="#FFFFFF"> <center><font face="Courier New"><font size=-1>0<sup>0</sup></font></font></center> </td> <td VALIGN=TOP WIDTH="5%" BGCOLOR="#FFFFFF"> <center><font face="Courier New"><font size=-1>0<sup>0</sup></font></font></center> </td> <td VALIGN=TOP WIDTH="5%" BGCOLOR="#FFFFFF"> <center><font face="Courier New"><font size=-1>0<sup>0</sup></font></font></center> </td> <td VALIGN=TOP WIDTH="5%" BGCOLOR="#00FF00"> <center><font face="Courier New"><font color="#FF0000"><font size=-1>6<sup>1</sup></font></font></font></center> </td> <td VALIGN=TOP WIDTH="5%" BGCOLOR="#FFFFFF"> <center><font face="Courier New"><font size=-1>6<sup>1</sup></font></font></center> </td> <td VALIGN=TOP WIDTH="5%" BGCOLOR="#FFFFFF"> <center><font face="Courier New"><font size=-1>6<sup>1</sup></font></font></center> </td> <td VALIGN=TOP WIDTH="5%" BGCOLOR="#FFFFFF"> <center><font face="Courier New"><font size=-1>6<sup>1</sup></font></font></center> </td> <td VALIGN=TOP WIDTH="5%" BGCOLOR="#FFFFFF"> <center><font face="Courier New"><font size=-1>6<sup>1</sup></font></font></center> </td> <td VALIGN=TOP WIDTH="5%" BGCOLOR="#FFFFFF"> <center><font face="Courier New"><font size=-1>6<sup>0</sup></font></font></center> </td> <td VALIGN=TOP WIDTH="5%" BGCOLOR="#FFFFFF"> <center><font face="Courier New"><font size=-1>6<sup>0</sup></font></font></center> </td> <td VALIGN=TOP WIDTH="5%" BGCOLOR="#FFFFFF"> <center><font face="Courier New"><font size=-1>6<sup>1</sup></font></font></center> </td> <td VALIGN=TOP WIDTH="5%" BGCOLOR="#FFFFFF"> <center><font face="Courier New"><font size=-1>6<sup>1</sup></font></font></center> </td> </tr> <tr> <td VALIGN=CENTER WIDTH="5%" BGCOLOR="#C0C0C0"> <center><b><font face="Courier New"><font size=-1>4</font></font></b></center> </td> <td VALIGN=TOP WIDTH="5%"><font face="Courier New"> </font></td> <td VALIGN=TOP WIDTH="5%"><font face="Courier New"> </font></td> <td VALIGN=TOP WIDTH="5%"><font face="Courier New"> </font></td> <td VALIGN=TOP WIDTH="5%"><font face="Courier New"> </font></td> <td VALIGN=TOP WIDTH="5%" BGCOLOR="#FFFFFF"><font face="Courier New"> </font></td> <td VALIGN=TOP WIDTH="5%" BGCOLOR="#FFFFFF"><font face="Courier New"> </font></td> <td VALIGN=TOP WIDTH="5%" BGCOLOR="#00FF00"> <center><font face="Courier New"><font color="#FF0000"><font size=-1>5<sup>1</sup></font></font></font></center> </td> <td VALIGN=TOP WIDTH="5%" BGCOLOR="#00FF00"> <center><font face="Courier New"><font size=-1>5<sup>1</sup></font></font></center> </td> <td VALIGN=TOP WIDTH="5%" BGCOLOR="#FFFFFF"> <center><font face="Courier New"><font size=-1>5<sup>0</sup></font></font></center> </td> <td VALIGN=TOP WIDTH="5%" BGCOLOR="#FFFFFF"> <center><font face="Courier New"><font size=-1>5<sup>0</sup></font></font></center> </td> <td VALIGN=TOP WIDTH="5%" BGCOLOR="#FFFFFF"> <center><font face="Courier New"><font size=-1>5<sup>0</sup></font></font></center> </td> <td VALIGN=TOP WIDTH="5%" BGCOLOR="#FFFFFF"> <center><font face="Courier New"><font size=-1>5<sup>0</sup></font></font></center> </td> <td VALIGN=TOP WIDTH="5%" BGCOLOR="#00FF00"> <center><font face="Courier New"><font color="#FF0000"><font size=-1>4<sup>1</sup></font></font></font></center> </td> <td VALIGN=TOP WIDTH="5%" BGCOLOR="#00FF00"> <center><font face="Courier New"><font size=-1>4<sup>1</sup></font></font></center> </td> <td VALIGN=TOP WIDTH="5%" BGCOLOR="#FFFFFF"> <center><font face="Courier New"><font size=-1>4<sup>1</sup></font></font></center> </td> <td VALIGN=TOP WIDTH="5%" BGCOLOR="#FFFFFF"> <center><font face="Courier New"><font size=-1>4<sup>1</sup></font></font></center> </td> <td VALIGN=TOP WIDTH="5%" BGCOLOR="#FFFFFF"> <center><font face="Courier New"><font size=-1>4<sup>0</sup></font></font></center> </td> <td VALIGN=TOP WIDTH="5%" BGCOLOR="#FFFFFF"> <center><font face="Courier New"><font size=-1>4<sup>1</sup></font></font></center> </td> <td VALIGN=TOP WIDTH="5%" BGCOLOR="#FFFFFF"> <center><font face="Courier New"><font size=-1>4<sup>1</sup></font></font></center> </td> <td VALIGN=TOP WIDTH="5%" BGCOLOR="#FFFFFF"> <center><font face="Courier New"><font size=-1>4<sup>1</sup></font></font></center> </td> </tr> <tr> <td VALIGN=TOP WIDTH="5%"><font face="Courier New"> </font></td> <td VALIGN=TOP WIDTH="5%"> <center><font face="Courier New"><font color="#FF0000"><font size=-1>p</font></font></font></center> </td> <td VALIGN=TOP WIDTH="5%"> <center><font face="Courier New"><font color="#FF0000"><font size=-1>p</font></font></font></center> </td> <td VALIGN=TOP WIDTH="5%"> <center><font face="Courier New"><font color="#FF0000"><font size=-1>p</font></font></font></center> </td> <td VALIGN=TOP WIDTH="5%"> <center><font face="Courier New"><font color="#FF0000"><font size=-1>p</font></font></font></center> </td> <td VALIGN=TOP WIDTH="5%"><font face="Courier New"> </font></td> <td VALIGN=TOP WIDTH="5%"><font face="Courier New"> </font></td> <td VALIGN=TOP WIDTH="5%"> <center><font face="Courier New"><font color="#FF0000"><font size=-1>p</font></font></font></center> </td> <td VALIGN=TOP WIDTH="5%"><font face="Courier New"> </font></td> <td VALIGN=TOP WIDTH="5%"> <center><font face="Courier New"><font color="#FF0000"><font size=-1>p</font></font></font></center> </td> <td VALIGN=TOP WIDTH="5%"><font face="Courier New"> </font></td> <td VALIGN=TOP WIDTH="5%"><font face="Courier New"> </font></td> <td VALIGN=TOP WIDTH="5%"> <center><font face="Courier New"><font color="#FF0000"><font size=-1>p</font></font></font></center> </td> <td VALIGN=TOP WIDTH="5%"> <center><font face="Courier New"><font color="#FF0000"><font size=-1>p</font></font></font></center> </td> <td VALIGN=TOP WIDTH="5%"><font face="Courier New"> </font></td> <td VALIGN=TOP WIDTH="5%"> <center><font face="Courier New"><font color="#FF0000"><font size=-1>p</font></font></font></center> </td> <td VALIGN=TOP WIDTH="5%"><font face="Courier New"> </font></td> <td VALIGN=TOP WIDTH="5%"> <center><font face="Courier New"><font color="#FF0000"><font size=-1>p</font></font></font></center> </td> <td VALIGN=TOP WIDTH="5%"><font face="Courier New"> </font></td> <td VALIGN=TOP WIDTH="5%"><font face="Courier New"> </font></td> <td VALIGN=TOP WIDTH="5%"> <center><font face="Courier New"><font color="#FF0000"><font size=-1>p</font></font></font></center> </td> </tr> </table> <p><font face="Courier New"><font size=-1>Numero page fault: <b>4+7</b></font></font> <p><font face="Courier New"><font size=+1>b. </font><font size=-1>Algoritmo <b>LRU</b> (pag. 469 del Maestrini):</font></font> <br> <table BORDER WIDTH="170" > <tr> <td VALIGN=CENTER WIDTH="17%" BGCOLOR="#FFFF00"><font size=+1> </font></td> <td VALIGN=CENTER WIDTH="83%"> <center><font face="Courier New"><font size=-1>Pagina riferita</font></font></center> </td> </tr> </table> <table BORDER CELLPADDING=7 WIDTH="635" > <tr> <td VALIGN=TOP WIDTH="5%" BGCOLOR="#C0C0C0"></td> <td VALIGN=TOP WIDTH="5%" BGCOLOR="#C0C0C0"> <center><b><font face="Courier New"><font size=-1>9</font></font></b></center> </td> <td VALIGN=TOP WIDTH="5%" BGCOLOR="#C0C0C0"> <center><b><font face="Courier New"><font size=-1>3</font></font></b></center> </td> <td VALIGN=TOP WIDTH="5%" BGCOLOR="#C0C0C0"> <center><b><font face="Courier New"><font size=-1>1</font></font></b></center> </td> <td VALIGN=TOP WIDTH="5%" BGCOLOR="#C0C0C0"> <center><b><font face="Courier New"><font size=-1>0</font></font></b></center> </td> <td VALIGN=TOP WIDTH="5%" BGCOLOR="#C0C0C0"> <center><b><font face="Courier New"><font size=-1>1</font></font></b></center> </td> <td VALIGN=TOP WIDTH="5%" BGCOLOR="#C0C0C0"> <center><b><font face="Courier New"><font size=-1>3</font></font></b></center> </td> <td VALIGN=TOP WIDTH="5%" BGCOLOR="#C0C0C0"> <center><b><font face="Courier New"><font size=-1>5</font></font></b></center> </td> <td VALIGN=TOP WIDTH="5%" BGCOLOR="#C0C0C0"> <center><b><font face="Courier New"><font size=-1>9</font></font></b></center> </td> <td VALIGN=TOP WIDTH="5%" BGCOLOR="#C0C0C0"> <center><b><font face="Courier New"><font size=-1>15</font></font></b></center> </td> <td VALIGN=TOP WIDTH="5%" BGCOLOR="#C0C0C0"> <center><b><font face="Courier New"><font size=-1>1</font></font></b></center> </td> <td VALIGN=TOP WIDTH="5%" BGCOLOR="#C0C0C0"> <center><b><font face="Courier New"><font size=-1>3</font></font></b></center> </td> <td VALIGN=TOP WIDTH="5%" BGCOLOR="#C0C0C0"> <center><b><font face="Courier New"><font size=-1>6</font></font></b></center> </td> <td VALIGN=TOP WIDTH="5%" BGCOLOR="#C0C0C0"> <center><b><font face="Courier New"><font size=-1>4</font></font></b></center> </td> <td VALIGN=TOP WIDTH="5%" BGCOLOR="#C0C0C0"> <center><b><font face="Courier New"><font size=-1>6</font></font></b></center> </td> <td VALIGN=TOP WIDTH="5%" BGCOLOR="#C0C0C0"> <center><b><font face="Courier New"><font size=-1>5</font></font></b></center> </td> <td VALIGN=TOP WIDTH="5%" BGCOLOR="#C0C0C0"> <center><b><font face="Courier New"><font size=-1>1</font></font></b></center> </td> <td VALIGN=TOP WIDTH="5%" BGCOLOR="#C0C0C0"> <center><b><font face="Courier New"><font size=-1>7</font></font></b></center> </td> <td VALIGN=TOP WIDTH="5%" BGCOLOR="#C0C0C0"> <center><b><font face="Courier New"><font size=-1>4</font></font></b></center> </td> <td VALIGN=TOP WIDTH="5%" BGCOLOR="#C0C0C0"> <center><b><font face="Courier New"><font size=-1>6</font></font></b></center> </td> <td VALIGN=TOP WIDTH="5%" BGCOLOR="#C0C0C0"> <center><b><font face="Courier New"><font size=-1>3</font></font></b></center> </td> </tr> <tr> <td VALIGN=TOP WIDTH="5%" BGCOLOR="#C0C0C0"> <center><b><font face="Courier New"><font size=-1>0</font></font></b></center> </td> <td VALIGN=TOP WIDTH="5%" BGCOLOR="#FFFF00"> <center><font face="Courier New"><font color="#FF0000"><font size=-1>9</font></font></font></center> </td> <td VALIGN=TOP WIDTH="5%"> <center><font face="Courier New"><font size=-1>9</font></font></center> </td> <td VALIGN=TOP WIDTH="5%"> <center><font face="Courier New"><font size=-1>9</font></font></center> </td> <td VALIGN=TOP WIDTH="5%"> <center><font face="Courier New"><font size=-1>9</font></font></center> </td> <td VALIGN=TOP WIDTH="5%"> <center><font face="Courier New"><font size=-1>9</font></font></center> </td> <td VALIGN=TOP WIDTH="5%"> <center><font face="Courier New"><font size=-1>9</font></font></center> </td> <td VALIGN=TOP WIDTH="5%"> <center><font face="Courier New"><font size=-1>9</font></font></center> </td> <td VALIGN=TOP WIDTH="5%" BGCOLOR="#FFFF00"> <center><font face="Courier New"><font size=-1>9</font></font></center> </td> <td VALIGN=TOP WIDTH="5%"> <center><font face="Courier New"><font size=-1>9</font></font></center> </td> <td VALIGN=TOP WIDTH="5%"> <center><font face="Courier New"><font size=-1>9</font></font></center> </td> <td VALIGN=TOP WIDTH="5%"> <center><font face="Courier New"><font size=-1>9</font></font></center> </td> <td VALIGN=TOP WIDTH="5%"> <center><font face="Courier New"><font size=-1>9</font></font></center> </td> <td VALIGN=TOP WIDTH="5%" BGCOLOR="#FFFF00"> <center><font face="Courier New"><font color="#FF0000"><font size=-1>4</font></font></font></center> </td> <td VALIGN=TOP WIDTH="5%"> <center><font face="Courier New"><font size=-1>4</font></font></center> </td> <td VALIGN=TOP WIDTH="5%"> <center><font face="Courier New"><font size=-1>4</font></font></center> </td> <td VALIGN=TOP WIDTH="5%"> <center><font face="Courier New"><font size=-1>4</font></font></center> </td> <td VALIGN=TOP WIDTH="5%"> <center><font face="Courier New"><font size=-1>4</font></font></center> </td> <td VALIGN=TOP WIDTH="5%" BGCOLOR="#FFFF00"> <center><font face="Courier New"><font size=-1>4</font></font></center> </td> <td VALIGN=TOP WIDTH="5%"> <center><font face="Courier New"><font size=-1>4</font></font></center> </td> <td VALIGN=TOP WIDTH="5%"> <center><font face="Courier New"><font size=-1>4</font></font></center> </td> </tr> <tr> <td VALIGN=TOP WIDTH="5%" BGCOLOR="#C0C0C0"> <center><b><font face="Courier New"><font size=-1>1</font></font></b></center> </td> <td VALIGN=TOP WIDTH="5%"><font size=-1> </font></td> <td VALIGN=TOP WIDTH="5%" BGCOLOR="#FFFF00"> <center><font face="Courier New"><font color="#FF0000"><font size=-1>3</font></font></font></center> </td> <td VALIGN=TOP WIDTH="5%"> <center><font face="Courier New"><font size=-1>3</font></font></center> </td> <td VALIGN=TOP WIDTH="5%"> <center><font face="Courier New"><font size=-1>3</font></font></center> </td> <td VALIGN=TOP WIDTH="5%"> <center><font face="Courier New"><font size=-1>3</font></font></center> </td> <td VALIGN=TOP WIDTH="5%" BGCOLOR="#FFFF00"> <center><font face="Courier New"><font size=-1>3</font></font></center> </td> <td VALIGN=TOP WIDTH="5%"> <center><font face="Courier New"><font size=-1>3</font></font></center> </td> <td VALIGN=TOP WIDTH="5%"> <center><font face="Courier New"><font size=-1>3</font></font></center> </td> <td VALIGN=TOP WIDTH="5%"> <center><font face="Courier New"><font size=-1>3</font></font></center> </td> <td VALIGN=TOP WIDTH="5%"> <center><font face="Courier New"><font size=-1>3</font></font></center> </td> <td VALIGN=TOP WIDTH="5%" BGCOLOR="#FFFF00"> <center><font face="Courier New"><font size=-1>3</font></font></center> </td> <td VALIGN=TOP WIDTH="5%"> <center><font face="Courier New"><font size=-1>3</font></font></center> </td> <td VALIGN=TOP WIDTH="5%"> <center><font face="Courier New"><font size=-1>3</font></font></center> </td> <td VALIGN=TOP WIDTH="5%"> <center><font face="Courier New"><font size=-1>3</font></font></center> </td> <td VALIGN=TOP WIDTH="5%"> <center><font face="Courier New"><font size=-1>3</font></font></center> </td> <td VALIGN=TOP WIDTH="5%"> <center><font face="Courier New"><font size=-1>3</font></font></center> </td> <td VALIGN=TOP WIDTH="5%" BGCOLOR="#FFFF00"> <center><font face="Courier New"><font color="#FF0000"><font size=-1>7</font></font></font></center> </td> <td VALIGN=TOP WIDTH="5%"> <center><font face="Courier New"><font size=-1>7</font></font></center> </td> <td VALIGN=TOP WIDTH="5%"> <center><font face="Courier New"><font size=-1>7</font></font></center> </td> <td VALIGN=TOP WIDTH="5%"> <center><font face="Courier New"><font size=-1>7</font></font></center> </td> </tr> <tr> <td VALIGN=TOP WIDTH="5%" BGCOLOR="#C0C0C0"> <center><b><font face="Courier New"><font size=-1>2</font></font></b></center> </td> <td VALIGN=TOP WIDTH="5%"><font size=-1> </font></td> <td VALIGN=TOP WIDTH="5%"><font size=-1> </font></td> <td VALIGN=TOP WIDTH="5%" BGCOLOR="#FFFF00"> <center><font face="Courier New"><font color="#FF0000"><font size=-1>1</font></font></font></center> </td> <td VALIGN=TOP WIDTH="5%"> <center><font face="Courier New"><font size=-1>1</font></font></center> </td> <td VALIGN=TOP WIDTH="5%" BGCOLOR="#FFFF00"> <center><font face="Courier New"><font size=-1>1</font></font></center> </td> <td VALIGN=TOP WIDTH="5%"> <center><font face="Courier New"><font size=-1>1</font></font></center> </td> <td VALIGN=TOP WIDTH="5%"> <center><font face="Courier New"><font size=-1>1</font></font></center> </td> <td VALIGN=TOP WIDTH="5%"> <center><font face="Courier New"><font size=-1>1</font></font></center> </td> <td VALIGN=TOP WIDTH="5%"> <center><font face="Courier New"><font size=-1>1</font></font></center> </td> <td VALIGN=TOP WIDTH="5%" BGCOLOR="#FFFF00"> <center><font face="Courier New"><font size=-1>1</font></font></center> </td> <td VALIGN=TOP WIDTH="5%"> <center><font face="Courier New"><font size=-1>1</font></font></center> </td> <td VALIGN=TOP WIDTH="5%"> <center><font face="Courier New"><font size=-1>1</font></font></center> </td> <td VALIGN=TOP WIDTH="5%"> <center><font face="Courier New"><font size=-1>1</font></font></center> </td> <td VALIGN=TOP WIDTH="5%"> <center><font face="Courier New"><font size=-1>1</font></font></center> </td> <td VALIGN=TOP WIDTH="5%"> <center><font face="Courier New"><font size=-1>1</font></font></center> </td> <td VALIGN=TOP WIDTH="5%" BGCOLOR="#FFFF00"> <center><font face="Courier New"><font size=-1>1</font></font></center> </td> <td VALIGN=TOP WIDTH="5%"> <center><font face="Courier New"><font size=-1>1</font></font></center> </td> <td VALIGN=TOP WIDTH="5%"> <center><font face="Courier New"><font size=-1>1</font></font></center> </td> <td VALIGN=TOP WIDTH="5%"> <center><font face="Courier New"><font size=-1>1</font></font></center> </td> <td VALIGN=TOP WIDTH="5%"> <center><font face="Courier New"><font size=-1>1</font></font></center> </td> </tr> <tr> <td VALIGN=TOP WIDTH="5%" BGCOLOR="#C0C0C0"> <center><b><font face="Courier New"><font size=-1>3</font></font></b></center> </td> <td VALIGN=TOP WIDTH="5%"><font size=-1> </font></td> <td VALIGN=TOP WIDTH="5%"><font size=-1> </font></td> <td VALIGN=TOP WIDTH="5%"><font size=-1> </font></td> <td VALIGN=TOP WIDTH="5%" BGCOLOR="#FFFF00"> <center><font face="Courier New"><font color="#FF0000"><font size=-1>0</font></font></font></center> </td> <td VALIGN=TOP WIDTH="5%"> <center><font face="Courier New"><font size=-1>0</font></font></center> </td> <td VALIGN=TOP WIDTH="5%"> <center><font face="Courier New"><font size=-1>0</font></font></center> </td> <td VALIGN=TOP WIDTH="5%"> <center><font face="Courier New"><font size=-1>0</font></font></center> </td> <td VALIGN=TOP WIDTH="5%"> <center><font face="Courier New"><font size=-1>0</font></font></center> </td> <td VALIGN=TOP WIDTH="5%" BGCOLOR="#FFFF00"> <center><font face="Courier New"><font color="#FF0000"><font size=-1>15</font></font></font></center> </td> <td VALIGN=TOP WIDTH="5%"> <center><font face="Courier New"><font size=-1>15</font></font></center> </td> <td VALIGN=TOP WIDTH="5%"> <center><font face="Courier New"><font size=-1>15</font></font></center> </td> <td VALIGN=TOP WIDTH="5%"> <center><font face="Courier New"><font size=-1>15</font></font></center> </td> <td VALIGN=TOP WIDTH="5%"> <center><font face="Courier New"><font size=-1>15</font></font></center> </td> <td VALIGN=TOP WIDTH="5%"> <center><font face="Courier New"><font size=-1>15</font></font></center> </td> <td VALIGN=TOP WIDTH="5%" BGCOLOR="#FFFF00"> <center><font face="Courier New"><font color="#FF0000"><font size=-1>5</font></font></font></center> </td> <td VALIGN=TOP WIDTH="5%"> <center><font face="Courier New"><font size=-1>5</font></font></center> </td> <td VALIGN=TOP WIDTH="5%"> <center><font face="Courier New"><font size=-1>5</font></font></center> </td> <td VALIGN=TOP WIDTH="5%"> <center><font face="Courier New"><font size=-1>5</font></font></center> </td> <td VALIGN=TOP WIDTH="5%"> <center><font face="Courier New"><font size=-1>5</font></font></center> </td> <td VALIGN=TOP WIDTH="5%" BGCOLOR="#FFFF00"> <center><font face="Courier New"><font color="#FF0000"><font size=-1>3</font></font></font></center> </td> </tr> <tr> <td VALIGN=TOP WIDTH="5%" BGCOLOR="#C0C0C0"> <center><b><font face="Courier New"><font size=-1>4</font></font></b></center> </td> <td VALIGN=TOP WIDTH="5%"><font size=-1> </font></td> <td VALIGN=TOP WIDTH="5%"><font size=-1> </font></td> <td VALIGN=TOP WIDTH="5%"><font size=-1> </font></td> <td VALIGN=TOP WIDTH="5%"><font size=-1> </font></td> <td VALIGN=TOP WIDTH="5%"><font size=-1> </font></td> <td VALIGN=TOP WIDTH="5%"><font size=-1> </font></td> <td VALIGN=TOP WIDTH="5%" BGCOLOR="#FFFF00"> <center><font face="Courier New"><font color="#FF0000"><font size=-1>5</font></font></font></center> </td> <td VALIGN=TOP WIDTH="5%"> <center><font face="Courier New"><font size=-1>5</font></font></center> </td> <td VALIGN=TOP WIDTH="5%"> <center><font face="Courier New"><font size=-1>5</font></font></center> </td> <td VALIGN=TOP WIDTH="5%"> <center><font face="Courier New"><font size=-1>5</font></font></center> </td> <td VALIGN=TOP WIDTH="5%"> <center><font face="Courier New"><font size=-1>5</font></font></center> </td> <td VALIGN=TOP WIDTH="5%" BGCOLOR="#FFFF00"> <center><font face="Courier New"><font color="#FF0000"><font size=-1>6</font></font></font></center> </td> <td VALIGN=TOP WIDTH="5%"> <center><font face="Courier New"><font size=-1>6</font></font></center> </td> <td VALIGN=TOP WIDTH="5%" BGCOLOR="#FFFF00"> <center><font face="Courier New"><font size=-1>6</font></font></center> </td> <td VALIGN=TOP WIDTH="5%"> <center><font face="Courier New"><font size=-1>6</font></font></center> </td> <td VALIGN=TOP WIDTH="5%"> <center><font face="Courier New"><font size=-1>6</font></font></center> </td> <td VALIGN=TOP WIDTH="5%"> <center><font face="Courier New"><font size=-1>6</font></font></center> </td> <td VALIGN=TOP WIDTH="5%"> <center><font face="Courier New"><font size=-1>6</font></font></center> </td> <td VALIGN=TOP WIDTH="5%" BGCOLOR="#FFFF00"> <center><font face="Courier New"><font size=-1>6</font></font></center> </td> <td VALIGN=TOP WIDTH="5%"> <center><font face="Courier New"><font size=-1>6</font></font></center> </td> </tr> <tr> <td VALIGN=TOP WIDTH="5%"> </td> <td VALIGN=TOP WIDTH="5%"> <center><font face="Courier New"><font color="#FF0000"><font size=-1>p</font></font></font></center> </td> <td VALIGN=TOP WIDTH="5%"> <center><font face="Courier New"><font color="#FF0000"><font size=-1>p</font></font></font></center> </td> <td VALIGN=TOP WIDTH="5%"> <center><font face="Courier New"><font color="#FF0000"><font size=-1>p</font></font></font></center> </td> <td VALIGN=TOP WIDTH="5%"> <center><font face="Courier New"><font color="#FF0000"><font size=-1>p</font></font></font></center> </td> <td VALIGN=TOP WIDTH="5%"> </td> <td VALIGN=TOP WIDTH="5%"> </td> <td VALIGN=TOP WIDTH="5%"> <center><font face="Courier New"><font color="#FF0000"><font size=-1>p</font></font></font></center> </td> <td VALIGN=TOP WIDTH="5%"> </td> <td VALIGN=TOP WIDTH="5%"> <center><font face="Courier New"><font color="#FF0000"><font size=-1>p</font></font></font></center> </td> <td VALIGN=TOP WIDTH="5%"> </td> <td VALIGN=TOP WIDTH="5%"> </td> <td VALIGN=TOP WIDTH="5%"> <center><font face="Courier New"><font color="#FF0000"><font size=-1>p</font></font></font></center> </td> <td VALIGN=TOP WIDTH="5%"> <center><font face="Courier New"><font color="#FF0000"><font size=-1>p</font></font></font></center> </td> <td VALIGN=TOP WIDTH="5%"> </td> <td VALIGN=TOP WIDTH="5%"> <center><font face="Courier New"><font color="#FF0000"><font size=-1>p</font></font></font></center> </td> <td VALIGN=TOP WIDTH="5%"> </td> <td VALIGN=TOP WIDTH="5%"> <center><font face="Courier New"><font color="#FF0000"><font size=-1>p</font></font></font></center> </td> <td VALIGN=TOP WIDTH="5%"> </td> <td VALIGN=TOP WIDTH="5%"> </td> <td VALIGN=TOP WIDTH="5%"> <center><font face="Courier New"><font color="#FF0000"><font size=-1>p</font></font></font></center> </td> </tr> </table> <p><font face="Courier New"><font size=-1>Numero page fault: <b>4+7</b></font></font> <p> <hr> <p><b><font size=+1>8. </font></b><font face="Times New Roman,Times">Nel problema dei processi lettori e scrittori in un database puo' avvenire il fenomeno di</font> <br><font face="Times New Roman,Times">attesa indefinita:</font> <br><font face="Times New Roman,Times">Se mentre e' presente un processo lettore nella sezione critica, continuano ad arrivare altri lettori, tutti i processi scrittori dovranno aspettare (attesa indefinita) l'uscita dell'ultimo lettore<sup>(*)</sup> dalla sua sezione critica, rilasciando cosi' la mutua esclusione sul semaforo <b>db</b>.</font> <p><b>semaphore </b>mutex=1, db=1; <br><b>int </b>rc=0; <p><b>void </b>Lettore() <br> { <br> <b>P</b>(mutex); <br> rc++; <br> <b>if </b>(rc==1) <b>P</b>(db); <br> <b>V</b>(mutex); <br> <nop>LetturaDB(); <br> <b>P</b>(mutex); <br> rc--; <br> <b>if </b>(rc==0) <b>V</b>(db); (*) <br> <b>V</b>(mutex); <br> } <p><b>void </b>Scrittore() <br> { <br> <b>P</b>(db); <br> <nop>ScritturaDB(); <br> <b>V</b>(db); <br> } <br> <p> <hr> <p><b><font size=+1>9.</font></b> <br><font face="Courier New"><font size=-1>perl -ne 'print unless $seen{$_}++' archivi</font></font> <p> <hr> <center> <p><b><font face="Arial"><font size=+1>12 gennaio 1999 </font>- </font></b><u><font color="#0000FF"></font></u></center> <p><font size=+1>Si ringraziano i volenterosi studenti <u><font color="#0000FF"><a href="mailto:a.cagnetti@usa.net">Alessandro Cagnetti</a></font></u></font><font size=-2> </font><font size=+1>e <u><font color="#0000FF"><a href="mailto:d.giabbai@flashnet.it">Daniele Giabbai</a></font></u></font> </body> </html>
E
dit
|
A
ttach
|
Watch
|
P
rint version
|
H
istory
: r2
<
r1
|
B
acklinks
|
V
iew topic
|
Ra
w
edit
|
M
ore topic actions
Topic revision: r2 - 2002-02-04
-
AntonioValletta
Log In
or
Register
Sistemioperativi1 Web ...
Sistemioperativi1 Web
Sistemioperativi1 Web Home
Users
Groups
Index
Search
Changes
Notifications
Statistics
Preferences
User Reference ...
User Reference
ATasteOfTWiki
TextFormattingRules
TWikiVariables
FormattedSearch
TWikiDocGraphics
TWikiSkinBrowser
InstalledPlugins
ChangeEmailAddress
ChangePassword
ResetPassword
Prenotazioni esami
Laurea Triennale ...
Laurea Triennale
Algebra
Algoritmi
Introduzione agli algoritmi
Algoritmi 1
Algoritmi 2
Algoritmi per la
visualizzazione
Architetture
Prog. sist. digitali
Architetture 2
Basi di Dati
Basi di Dati 1 Inf.
Basi di Dati 1 T.I.
Basi di Dati (I modulo, A-L)
Basi di Dati (I modulo, M-Z)
Basi di Dati 2
Calcolo
Calcolo differenziale
Calcolo integrale
Calcolo delle Probabilitą
Metodi mat. per l'inf. (ex. Logica)
canale AD
canale PZ
Programmazione
Fond. di Programmazione
Metodologie di Programmazione
Prog. di sistemi multicore
Programmazione 2
AD
EO
PZ
Esercitazioni Prog. 2
Lab. Prog. AD
Lab. Prog. EO
Lab. Prog. 2
Prog. a Oggetti
Reti
Arch. di internet
Lab. di prog. di rete
Programmazione Web
Reti di elaboratori
Sistemi operativi
Sistemi Operativi (12 CFU)
Anni precedenti
Sistemi operativi 1
Sistemi operativi 2
Lab. SO 1
Lab. SO 2
Altri corsi
Automi, Calcolabilitą
e Complessitą
Apprendimento Automatico
Economia Aziendale
Elaborazione Immagini
Fisica 2
Grafica 3D
Informatica Giuridica
Laboratorio di Sistemi Interattivi
Linguaggi di Programmazione 3° anno Matematica
Linguaggi e Compilatori
Sistemi Informativi
Tecniche di Sicurezza dei Sistemi
ACSAI ...
ACSAI
Computer Architectures 1
Programming
Laurea Magistrale ...
Laurea Magistrale
Percorsi di studio
Corsi
Algoritmi Avanzati
Algoritmica
Algoritmi e Strutture Dati
Algoritmi per le reti
Architetture degli elaboratori 3
Architetture avanzate e parallele
Autonomous Networking
Big Data Computing
Business Intelligence
Calcolo Intensivo
Complessitą
Computer Systems and Programming
Concurrent Systems
Crittografia
Elaborazione del Linguaggio Naturale
Estrazione inf. dal web
Fisica 3
Gamification Lab
Information Systems
Ingegneria degli Algoritmi
Interazione Multi Modale
Metodi Formali per il Software
Methods in Computer Science Education: Analysis
Methods in Computer Science Education: Design
Prestazioni dei Sistemi di Rete
Prog. avanzata
Internet of Things
Sistemi Centrali
Reti Wireless
Sistemi Biometrici
Sistemi Distribuiti
Sistemi Informativi Geografici
Sistemi operativi 3
Tecniche di Sicurezza basate sui Linguaggi
Teoria della
Dimostrazione
Verifica del software
Visione artificiale
Attivitą complementari
Biologia Computazionale
Design and development of embedded systems for the Internet of Things
Lego Lab
Logic Programming
Pietre miliari della scienza
Prog. di processori multicore
Sistemi per l'interazione locale e remota
Laboratorio di Cyber-Security
Verifica e Validazione di Software Embedded
Altri Webs ...
Altri Webs
Dottorandi
Commissioni
Comm. Didattica
Comm. Didattica_r
Comm. Dottorato
Comm. Erasmus
Comm. Finanziamenti
Comm. Scientifica
Comm Scientifica_r
Corsi esterni
Sistemi Operativi (Matematica)
Perl e Bioperl
ECDL
Fondamenti 1
(NETTUNO)
Tecniche della Programmazione 1° modulo
(NETTUNO)
Seminars in Artificial Intelligence and Robotics: Natural Language Processing
Informatica generale
Primo canale
Secondo canale
II canale A.A. 10-11
Informatica
Informatica per Statistica
Laboratorio di Strumentazione Elettronica e Informatica
Progetti
Nemo
Quis
Remus
TWiki ...
TWiki
Tutto su TWiki
Users
Main
Sandbox
Home
Site map
AA web
AAP web
ACSAI web
AA2021 web
Programming web
AA2021 web
AN web
ASD web
Algebra web
AL web
AA1112 web
AA1213 web
AA1920 web
AA2021 web
MZ web
AA1112 web
AA1213 web
AA1112 web
AA1314 web
AA1415 web
AA1516 web
AA1617 web
AA1819 web
Old web
Algo_par_dis web
Algoreti web
More...
Sistemioperativi1 Web
Create New Topic
Index
Search
Changes
Notifications
RSS Feed
Statistics
Preferences
View
Raw View
Print version
Find backlinks
History
More topic actions
Edit
Raw edit
Attach file or image
Edit topic preference settings
Set new parent
More topic actions
Account
Log In
Register User
Questo sito usa cookies, usandolo ne accettate la presenza. (
CookiePolicy
)
Torna al
Dipartimento di Informatica
E
dit
A
ttach
Copyright © 2008-2025 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki?
Send feedback