T
T
Tamul2020-10-30 06:32:39
linux
Tamul, 2020-10-30 06:32:39

Is it possible to run Linux ONLY on a graphics card?

Is it theoretically possible to port the kernel in such a way that it works on only one video chip with almost no other PC components?
Video cards have a Turing-complete core, access of any core to any memory cell (albeit with different delays), its own microcode, its own ROM with BIOS. Isn't this enough to run a fairly heavy OS on a video card that is generally taken out of the computer, to which only power is supplied? Communication with the outside world through some kind of I2C, through which the card still communicates with the monitor, or through PCI-E, if you can run it in host mode. It was discussed
on linux.org.ru in 2008, but the answer was not particularly formulated.
Maybe there are some restrictions on running an OS, such as the difficulty of storing executable code in RAM or the lack of processor features that have been in general-purpose CPUs for 30 years, but are simply not needed in video chips?
And if you manage to launch the Linux kernel there with a bunch of dirty hacks, will applications specifically compiled for this architecture be able to work there without significant rewriting of their code?

I do not expect that the answer will have a clear algorithm for how to do this, something like "maybe, but you need 50 programmers and a couple of years to research" is enough.

Answer the question

In order to leave comments, you need to log in

4 answer(s)
R
rPman, 2020-10-30
@rPman

Yes it is possible - for example virtualization! Saw a virtual machine on shader processors, and already on it, placing RAM and registers in gpu ram, run anything.
But this does not make any sense because it will not give high performance in the general case. The shader processor has a low speed (the whole feature in their number) and has a lot of limitations. And also - the size of the code that can be loaded into the video card as a shader code - is limited to a very small size (I could not find data about modern hardware, but the limit is very small, a few tens of thousands of opcodes or megabytes) above which the code is loaded from the system memory - very slowly . In gpgpu, in general, there are many specific restrictions, when exceeded, the speed drops by orders of magnitude, and each gpu manufacturer has its own characteristics.
And ' no ' - the code can't be run on gpu only, it needs control from the cpu to interact and manage.

C
CityCat4, 2020-10-30
@CityCat4

No, the answer will be the question "Who and why might it be necessary - to do such a volume of work?" There is a Turing-complete brainfuck language - do you know a lot of programs written in it?

A
acwartz, 2020-10-30
@acwartz

It is important to understand why it is not. Trite matter in the division of labor and cooperation.
The CPU takes care of all the work of executing the program code and does not fit into the graphics, it has its own cooling, power bus and RAM.
The GPU takes care of all the work of graphics processing and image output, has its own cooling and power bus, and even RAM.
In sum, everyone is busy with their own business and does not wait for another.
Software can transfer calculations from the GPU to the CPU, for example, nVidea can poison Phys-X physics calculations when it is not doing anything.
Therefore, the answer is: it is possible, but no one will support this. The CPU is always there and it is busy with its own business.

A
algiraid, 2020-10-30
@algiraid

Let's assume it's possible.
You started OS. What's next? There is no keyboard to connect to the video card. That is, you need to collect additional iron. Completely by hand, there is no such thing on the market. For this iron, you need to write firewood. Firewood must be included in the kernel. Etc.
Is it worth such an effort, given that you can take a ready-made normal solution?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question