Introduzione ad architettura

1.1 Il principio di astrazione/implementazione Astrazione per macchine livello n con linguaggi n. 1.2 I livelli principali di astrazione Livelli in breve 1.2.1 Livello 0 Qua è utile indagare la Porte Logiche in cui si indagano in un modo molto alto il funzionamento di porte È il livello fisico delle porte logiche e dell’ingegneria elettrica. 1.2.2 Livello 1 Link utili potrebbero essere la Central Processing Unit ...

2 min · Xuanqiang 'Angelo' Huang

Note sull’architettura

Interrupt Descrizione iniziale 🟩 Di interrupt e trap se n’è parlato un pò in Livello ISA di architettura, ora andiamo ad approfondire come viene gestito a livello SO. Un interrupt è un segnale che viene mandato o da un dispositivo hardware (di solito dopo la fine di un processo input output) oppure da software, in questo caso viene chiamato trap che è un interrupt software sincrono.. Slide Interrupt Hardware e software ...

8 min · Xuanqiang 'Angelo' Huang

Virtual Machines

The fundamental idea behind a virtual machine is to abstract the hardware of a single computer (the CPU, memory, disk drives, network interface cards, and so forth) into several different execution environments, thereby creating the illusion that each separate environment is running on its own private computer. (Silberschatz et al. 2018). Virtualization allows a single computer to host multiple virtual machines, each potentially running a completely different operating system. È virtuale nel senso che la macchina virtuale ha la stessa percezione della realtà di una macchina reale. Qualcosa che non è la realtà ma appare molto simile ad essa. ...

10 min · Xuanqiang 'Angelo' Huang

Human Vision

Vision is THE most important sense for humans. Most of the information we get is through vision 90% vision 8% tactile, touch 3% hearing I have no idea how did they measure this aspect. This is true for humans, but for mice for example it is different, they have probably a 64x64 pixel resolution equivalent. For humans, visual data is more important, it is faster compared to speech and other senses. Human vision is estimated to be about 576 Megapixels of data (3M snapshots patched together with saccades, that has that pixel image value), since it can distinguish 0.6arc-minutes (0.01 degrees). There is an estimate of about 60kk rods and 3kk cones. ...

5 min · Xuanqiang 'Angelo' Huang

Neural Imaging

The basic idea is to have one first lens that makes an object bigger but inverted, and another lens, called the eyepiece that sees the original part bigger, and in correct shape. With some high school physics is possible to compute how much is the enlargement due to the lens. Lens Physics $$ \frac{1}{f} = \frac{1}{d_o} + \frac{1}{d_i} $$$$ M = \frac{d_i}{d_o} $$ The two magnifications compound with each other, giving a final value of $M = m_{1} + m_{2}$. ...

4 min · Xuanqiang 'Angelo' Huang

Performance at Large Scales

Some specific phenomenons in modern systems happen only when we scale into large systems. This note will gather some observations about the most important phenomena we observe at these scales. Tail Latency Phenomenon Tail latency refers to the high-end response time experienced by When scaling our services, using Massive Parallel Processing, and similar technology, it is not rare that a small percentage of requests in a system experience a high-end response time, typically measured at the 95th or 99th percentile. This significant delays that can degrade user experience or system reliability. ...

3 min · Xuanqiang 'Angelo' Huang

Cache Optimization

Locality principles Remember the two locality principles in Memoria. Temporal locality and spatial locality. Temporal Locality Some elements just are accessed many times in time. This is an example of a temporal locality. Spatial locality Some elements are accessed close to each other, this is an idea of spatial locality. In modern architectures, the a line of cache is usually 64 bytes. For example consider this snippet: sum = 0; for (i = 0; i < n; i++) sum += a[i]; return sum; Sum is an example of temporal locality as the same memory location (or register) is accessed many times, and the access of the array a is an example of spatial locality. loops cycle through the same instructions, this is an example of temporal locality. ...

2 min · Xuanqiang 'Angelo' Huang

Central Processing Unit

La struttura moderna degli elaboratori sono basati principalmente sull’architettura di Von Neuman, l’unica differenza è che gli elementi di questa architettura. Struttura e funzione della CPU La CPU si può dividere in tre parti principali: Una unità di controllo che coordina i processi Registri che immagazzinano temporaneamente piccole quantità di informazioni ALU che fa i calcoli ordinategli dalla CPU Registri Principali Program Counter o Instruction Pointer Contiene un pointer all’istruzione da eseguire così lo prende dalla memoria Instruction Register Contiene l’istruzione da eseguire Memory Address Register Prende l’indirizzo del contenuto interessante dalla memoria Memory Data Register Prende il contenuto dalla memoria Program Status Word Raccoglie lo stato di esecuzione del programma, se fallisce se tutto ok oppure se ci sono errori ALU Aritmetic Logic Unit, è la componente che fa i calcoli. Per sapere cosa deve fare, è la Control Unit che collega certe vie dai registri all’ALU. A seconda del genere di architettura può collegarsi direttamente in memoria (CISC) oppure sempre passando per i registri (solitamente RISC) ...

7 min · Xuanqiang 'Angelo' Huang

Fast Fourier Transforms

The algorithm has been the same, some ideas are in Fourier Series, but architectures change, which means there are new ways to make this algorithm even faster. Example of transforms We have learned in Algebra lineare numerica, Cambio di Base that linear transforms are usually a change of basis. They are matrix vector multiplications (additions and multiplications by constants). The optimizations are based on what sorts of transforms we have (e.g. Sparse Matrix Vector Multiplication, or dense versions). The same idea applies also for Fourier transforms. ...

5 min · Xuanqiang 'Angelo' Huang

Skylake Microprocessor

The Skylake processor is a 2015 Intel processor. The Intel Processor In 1978 Intel made the choice to have retrocompatibility for every processor. At that time they had the 8086 processor, with some number of memory bits. For backwards compatibility intructions have usually just grown. They used geographic locations because these are not suable. If we want new code to run for old processors, we should need to put specific flags. ...

4 min · Xuanqiang 'Angelo' Huang