1

ffmpeg and chromium-browser both support hardware accelerated graphics using the GPU.

Say for example I have a machine that has one NVIDIA GPU in it; which app uses the GPU? Does the first application to be run get it and somehow lock it, or is something else going on?

I presume that in an ordinary configuration the GPU can only be used by one application at a time.

  • 1
    see “I have two process that use the CPU, which one gets it?”. If you can answer that question, then you will understand this one. – ctrl-alt-delor May 22 at 5:16
  • I do understand how CPUs and operating systems work but I know little about GPUs and assumed that they operated in a different manner, needing to dedicate all their resource in the completion of one major task due to the amount of memory and processing required. You're saying GPU's are able to context switch like a CPU? – Duke Dougal May 22 at 5:33
  • yes because there is nothing special in a CPU to do the switch (except sometime there is hyper-threading, but this is not needed). Also some desktops use the GPU (plasma, some gnome, compiz), and the rest use 2d acceleration. Therefore it just becomes another process writing to the display. – ctrl-alt-delor May 22 at 19:39
2

Graphic applications like ffmpeg, gstreamer, chromium, etc... gain hardware acceleration relying on the GPU through a library. Like for other hardwares, these library do not restrict their usage to only one process at a time. It's just like for the cpu (even though the libraries are very different, the principle remains the same): the resources are shared accross several applications.

What can be tricky for GPU applications is that they demand a LOT of computing power, and can give the impression that one of the processes 'locks' the access.

  • Not through the library, but via a protocol (probably X11). – ctrl-alt-delor May 22 at 19:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.