Esame Architetture degli Elaboratori, 8 Giugno 1999



NOME E COGNOME:

MATRICOLA:
ANNO DI CORSO:

Non e' ammesso l'uso di alcun testo, appunti o calcolatrici. Le risposte ai quesiti vanno scritte esclusivamente sugli spazi appositamente riservati su questo testo. Eventuali fogli aggiuntivi non verranno presi in considerazione.



Dare la definizione di Macchina Astratta.
________________________________________________________________________________________________
________________________________________________________________________________________________
________________________________________________________________________________________________

In un sistema di calcolo, qual'e' il massimo numero di livelli di macchine astratte ammissibile? ________________________________________________________________________________________________
________________________________________________________________________________________________
________________________________________________________________________________________________

Si condideri la seguente stringa di 8 bit:
                             10101010
ottenuta applicando una funzione di codifica ad un numero n.
Dire qual'e' il valore di n (e come si e' ottenuto) quando la codifica e':
________________________________________________________________________________________________
________________________________________________________________________________________________
________________________________________________________________________________________________
________________________________________________________________________________________________
________________________________________________________________________________________________
________________________________________________________________________________________________
________________________________________________________________________________________________
________________________________________________________________________________________________
________________________________________________________________________________________________

Dimostrare che per ogni espressione algebrica booleana ne esiste una equivalente (che rappresenta la stessa funzione) e che utilizza solo gli operatori NOR o NAN D.
________________________________________________________________________________________________
________________________________________________________________________________________________
________________________________________________________________________________________________
________________________________________________________________________________________________
________________________________________________________________________________________________
________________________________________________________________________________________________
________________________________________________________________________________________________

Dato il circuito


Descrivere un circuito equivalente, minimale a due livelli (SP), mostrando il procedimento con cui si e' ottenuto.





































Scrivere una procedura Mic1 che interpreti un'istruzione contenuta in tre parole consecutive.
Nella prima c'e' l'opcode dell'operazione, nella seconda un indirizzo x e nella terza un valore V.
Il risultato dell'operazione e'

 ac:= m[x]+V.
Il pc viene ovviamente incrementato non di 1, ma di 3.

________________________________________________________________________________________________
________________________________________________________________________________________________
________________________________________________________________________________________________
________________________________________________________________________________________________
________________________________________________________________________________________________
________________________________________________________________________________________________
________________________________________________________________________________________________
________________________________________________________________________________________________
________________________________________________________________________________________________
________________________________________________________________________________________________

Si scriva una funzione in assembler Mac-1 che riceva sullo stack in input un numero naturale k e restituisca sull'accumulatore il suo fattoriale. (si supponga di avere a disposizione una procedure PMUL che esegue il prodotto di due numeri).
Il codice scritto va commentato per facilitarne la comprensione. ________________________________________________________________________________________________
________________________________________________________________________________________________
________________________________________________________________________________________________
________________________________________________________________________________________________
________________________________________________________________________________________________
________________________________________________________________________________________________
________________________________________________________________________________________________
________________________________________________________________________________________________
________________________________________________________________________________________________
________________________________________________________________________________________________
________________________________________________________________________________________________
________________________________________________________________________________________________
________________________________________________________________________________________________
________________________________________________________________________________________________
________________________________________________________________________________________________
________________________________________________________________________________________________
________________________________________________________________________________________________
________________________________________________________________________________________________
________________________________________________________________________________________________
________________________________________________________________________________________________
________________________________________________________________________________________________
________________________________________________________________________________________________
________________________________________________________________________________________________
________________________________________________________________________________________________
________________________________________________________________________________________________

Data una macchina ad un indirizzo con accumulatore, quali valori verranno caricati dalle seguenti istruzioni nell'accumulatore, supponendo che la memoria contenga i valori 40, 50, 60, 70 nelle locazioni di indirizzo, rispettivamente, 20, 30, 40, 50 ?
 
             LOAD IMMEDIATE 20
 
             LOAD DIRECT    20
 
             LOAD INDIRECT  20
 
             LOAD IMMEDIATE 30
 
             LOAD DIRECT    30
 
             LOAD INDIRECT  30
 
________________________________________________________________________________________________
________________________________________________________________________________________________
________________________________________________________________________________________________
________________________________________________________________________________________________
________________________________________________________________________________________________
________________________________________________________________________________________________
________________________________________________________________________________________________

Dire cosa deve fare un assemblatore a due passi quando durante il primo passo:

________________________________________________________________________________________________
________________________________________________________________________________________________
________________________________________________________________________________________________
________________________________________________________________________________________________
________________________________________________________________________________________________
________________________________________________________________________________________________
________________________________________________________________________________________________
________________________________________________________________________________________________

Considerando un'architettura che utilizza il pipeline, si dica se ciascuna delle seguenti affermazioni e' vera o falsa, o si discuta in quali contesti potrebbe essere vera o falsa.
________________________________________________________________________________________________
________________________________________________________________________________________________
________________________________________________________________________________________________
________________________________________________________________________________________________
________________________________________________________________________________________________
________________________________________________________________________________________________
________________________________________________________________________________________________
________________________________________________________________________________________________
________________________________________________________________________________________________
________________________________________________________________________________________________

Per ciascuna delle seguenti affermazione relarive alle architetture RISC, si dica se e' vera, falsa oppure si discuta brevemente in quale contesto o da quale punto di vista puo' essere vera o falsa. ________________________________________________________________________________________________
________________________________________________________________________________________________
________________________________________________________________________________________________
________________________________________________________________________________________________
________________________________________________________________________________________________
________________________________________________________________________________________________
________________________________________________________________________________________________
________________________________________________________________________________________________
________________________________________________________________________________________________
________________________________________________________________________________________________
________________________________________________________________________________________________

Che cosa e' il cache coherence problem nel contesto dei multiprocessori a memoria condivisa? ________________________________________________________________________________________________
________________________________________________________________________________________________
________________________________________________________________________________________________
________________________________________________________________________________________________
________________________________________________________________________________________________

Cos'e' la legge di Amdahl? ________________________________________________________________________________________________
________________________________________________________________________________________________
________________________________________________________________________________________________
________________________________________________________________________________________________
________________________________________________________________________________________________