Como um computador informa a uma placa de vídeo o que exibir?

3

Como um computador comunica valores de pixel à tela?

Existe algum comando na arquitetura do conjunto de instruções do processador, que fará com que o processador se comunique diretamente com o monitor, ou o software armazena as informações gráficas em um determinado local na memória, onde é automaticamente detectado pelo processador? ser enviado para o monitor? Como isso funciona e onde uma placa gráfica entra em ação nesse processo?

    
por bigblind 20.05.2012 / 22:37

2 respostas

3

Let's take DVI. According to the article, red, green, and blue are each transmitted on their own pair of wires, 8 bits per color per pixel, in an uncompressed rasterized fashion. That is, the top line gets sent, left to right, pixel by pixel, then the next line, and so on, with the RGB values lining up because there is no compression. Each channel of data is encoded according to TMDS, which is designed to take into account various physical realities of high-frequency electrical signals. You could also look up VGA and HDMI for similar information.

However, the OS is far removed from sending the data to the monitor. That is handled by dedicated hardware in the video card. Roughly speaking, the video card driver gives the video card commands to draw the image. (In many 2D cases it will just be giving the video card the complete pixel by pixel image, while in 3D cases the video card will be doing a lot of the work itself.) In any event, I am reasonably confident that the video card ultimately places the pixel data for each frame in a buffer, from which a tiny piece of dedicated circuitry sends the signal to the monitor.

In general, it is considered good for dedicated hardware to handle I/O work under the control of the OS. Most of the OS's I/O work is just telling dedicated hardware what to do, and that hardware then knows the low-level protocol for external communication. As well as offloading work from the CPU, dedicated hardware means that a delay on the OS's part won't necessarily disrupt communication with the peripheral. For another example of this, take Ethernet. The OS tells the NIC where to put incoming packets, and the NIC signals the OS when it's placed a packet there, but if the OS doesn't do anything with the first packet right away, the NIC can still receive more packets until it runs out of space allocated to it for incoming packets.

De Como funciona um monitor de computador, do lado do SO? no XKCD fóruns.

    
por 20.05.2012 / 22:44
0

Depende do hardware, mas uma maneira comum é usar E / S mapeada na memória, ou seja, determinados endereços de memória são mapeados para o dispositivo (por exemplo, a placa de vídeo).

Veja E / S de memória mapeada na wikipedia , por exemplo.

    
por 20.05.2012 / 22:42