How do I do that? >I don't care about security I can just airgap the machine
privileges don't give you any performance advantage, they just let you execute some special x86 instructions. and games don't use those instructions so it wouldn't matter
(wrong see video)
Play pre-7th gen console games exclusively
I would recommend watching this first to get some insight into the idiocracy of modern oses
>virtual memory does not belong in a modern computer
holy based.
really though, PCs grew vmem for the same reason as the UNIX machines he hated, shitty software ended up shitting everything up anyhow: read guru meditations in Amiga.
privileges don't give you any performance advantage, they just let you execute some special x86 instructions. and games don't use those instructions so it wouldn't matter
>privileges don't give you any performance advantage
is OP mental moronation or bait?
nooo, there is no perf advantage in ring 0, the processor definitely doesn't have more performant microcode when cpl register set to 0. DO NOT attempt running user applications in ring 0 THERE IS NO BENEFIT
now go back to your little cringy 14 yo haxor group where you say unrelated shit like "do you even know what frame ptr is bro???" and call each other skids etc and things too moronic for anyone to care about
privileges don't give you any performance advantage, they just let you execute some special x86 instructions. and games don't use those instructions so it wouldn't matter
I'd say running on the same context as the kernel should allow a program to avoid context switches when doing syscalls and stuff, hence enjoying more performance.
What percentage of context switches do you think are caused by syscalls?
and for a normal game, what percentage of context switches do these types of switches account for?
see
[...]
[...] (wrong see video)
[...]
I would recommend watching this first to get some insight into the idiocracy of modern oses
1 month ago
Anonymous
im trying to point out how all of your kernel development knowledge comes from shitty youtube edits
I doubt you even know what a context switch is
btw what game are you trying to play
1 month ago
Anonymous
Since most kernels are preemptive multitasking, a context switch will change rings causing some negligible performance loss.
As for OP, you can try modifying Linux to run everything in kernel mode though you can't entirely remove context switches (unless you pin kernel/other processes to a single core and use rest of the cores for game, like consoles do).
I meant the switch from user mode to kernel mode and back.
1 month ago
Anonymous
and for a normal game, what percentage of context switches do these types of switches account for?
1 month ago
Anonymous
I personally don't have the means to get empirical measurements.
My bet would be, on Windows, on whatever DXGI/Direct3D does to talk with the GPU driver, and user input (on whatever mean of polling a gamepad and also on each WM_* that comes in, latency is introduced somewhere).
You want a game that runs in real mode, which most-all DOS games do. You still kind of have this model even then, but you own most-all of the rings there.
Xbox is still 6th gen, and uses a modified Win2k kernel with directx drivers and everything. PS2 and Gamecube still have a minimal stripped down OS that's realistically closer to firmware than anything else.
awful fricking taste
kys
games are not done for people like you anymore (and also by people like you) and this is why gaming is healing, literally at its all time best
an early 2000s zoomer would have given everything to experience modern gaming as a kid, they way you imagined video games to look like is now reality
For a video game to have any advantage from running in kernel mode, the video game itself would have to be a kernel. As in, you aren't interfacing with Windows or Linux or whatnot, you *are* the Windows or Linux. If you took an ordinary video game and ran it in kernel mode, you'd probably end up crashing or corrupting some other program's memory, or doing some weird behavior because the game is compiled from the assumption that it has memory protection as a user program running on Windows.
Assuming you managed to make a video game that boots up, sets up its own drivers and whatnot and just runs as the sole process on a machine without any timer interrupts... you'd probably get some negligible performance improvements. Your CPU is chugging along billions of cycles per second, and not all of that is even spent executing instructions. The time you spend on context switches during I/O is pretty small relative to the amount of cycles you have. Hell, sometimes your kernel will tell the CPU to halt just so you can save electricity instead of being at 100% CPU at all times. So CPU utilization is probably not your problem if you're having performance issues.
>Assuming you managed to make a video game that boots up, sets up its own drivers and whatnot and just runs as the sole process on a machine without any timer interrupts... you'd probably get some negligible performance improvements.
This is exactly how dos doom worked back in the day and it was purely for memory reasons.
If op had mentioned bypassing the modern desktop/window compositor he may have had something.
Since it comes up in the thread: "context switching" normally refers to multiprocessing/multithreading, i.e. what happens when there's a process or thread switch on a single CPU core. Or when there is an interrupt, though interrupts can be less expensive than a full thread switch. User/kernel mode switching is not necessarily a context switch, though depending on the OS function being called it can require a full context switch. Mode switching does, however, take time. Microkernel OSes failed precisely because they drive mode switching through the roof and it kills performance.
The problem is that if you got rid of the features that require context and mode switching, you couldn't develop a modern game. You couldn't get rid of interrupts or your controller wouldn't work. And any performance gained by eliminating context switching, i.e. OS threading, would be tiny in comparison to the loss of performance from being locked to one core. And the complete loss of responsiveness because the game would have to roll its own cooperative/fake multithreading. We're not talking about Space Invaders or Pac Man. You're not going to be able to organize/manage/schedule all the code that needs to execute in a modern game without OS threads.
In theory you could run everything at ring 0 and eliminate mode switching, but the entire stack would be delicate as frick and likely crash every game.
tl;dr - you can't do it, and while you would gain performance at one level, you would destroy it overall.
what do you expect to accomplish? reduce syscall time or something? avoid TLB flushes or context switching or what?
NT kernel is also quite strange, so are you really griping about its shit design? try GNU + Linux.
reminder every post above mine is a subhuman npc who doesnt know about TLB flush on context swap, kys trannies unironically and in real life, i hope this message is logged by authorities too just so that i get put in jail away from morons like people ITT
Seriously though, given a user-mode game that runs entirely on basic system API's, how do you hypothetically achieve as close to ring 0-like operation as possible? I.e. a Linux distro with the sole purpose of booting an OpenGL game on a specific piece of hardware.
you could make it just about the only thing running and set it to real time cpu and i/o nice values to give as much resources as possible
basically, you can reduce how much other stuff can slow it down, but it won't actually ever be on another ring, just because it wasn't programmed that way
You're moronic.
(wrong see video)
I would recommend watching this first to get some insight into the idiocracy of modern oses
>virtual memory does not belong in a modern computer
holy based.
really though, PCs grew vmem for the same reason as the UNIX machines he hated, shitty software ended up shitting everything up anyhow: read guru meditations in Amiga.
>privileges don't give you any performance advantage
nooo, there is no perf advantage in ring 0, the processor definitely doesn't have more performant microcode when cpl register set to 0. DO NOT attempt running user applications in ring 0 THERE IS NO BENEFIT
No one cares about your moronic sourceless FUD.
Schizophrenics are always so fun to read
Just fork the linux kernel and create a module that does some benchmarks and then run it both in kernel mode and userland mode
Of course you won't because you don't even know what a frame pointer is
sorry sirs, I only omit frame pointers.
>benchmarks
already have
now go back to your little cringy 14 yo haxor group where you say unrelated shit like "do you even know what frame ptr is bro???" and call each other skids etc and things too moronic for anyone to care about
>already have
sure thing
privileges don't give you any performance advantage, they just let you execute some special x86 instructions. and games don't use those instructions so it wouldn't matter
I'd say running on the same context as the kernel should allow a program to avoid context switches when doing syscalls and stuff, hence enjoying more performance.
not really, you still have to switch contexts because that's how the kernel works
Your kernel sounds like shit.
see
im trying to point out how all of your kernel development knowledge comes from shitty youtube edits
I doubt you even know what a context switch is
btw what game are you trying to play
Since most kernels are preemptive multitasking, a context switch will change rings causing some negligible performance loss.
As for OP, you can try modifying Linux to run everything in kernel mode though you can't entirely remove context switches (unless you pin kernel/other processes to a single core and use rest of the cores for game, like consoles do).
What percentage of context switches do you think are caused by syscalls?
I meant the switch from user mode to kernel mode and back.
and for a normal game, what percentage of context switches do these types of switches account for?
I personally don't have the means to get empirical measurements.
My bet would be, on Windows, on whatever DXGI/Direct3D does to talk with the GPU driver, and user input (on whatever mean of polling a gamepad and also on each WM_* that comes in, latency is introduced somewhere).
Play pre-7th gen console games exclusively
You want a game that runs in real mode, which most-all DOS games do. You still kind of have this model even then, but you own most-all of the rings there.
Xbox is still 6th gen, and uses a modified Win2k kernel with directx drivers and everything. PS2 and Gamecube still have a minimal stripped down OS that's realistically closer to firmware than anything else.
awful fricking taste
kys
games are not done for people like you anymore (and also by people like you) and this is why gaming is healing, literally at its all time best
an early 2000s zoomer would have given everything to experience modern gaming as a kid, they way you imagined video games to look like is now reality
>they way you imagined video games to look like is now reality
>Gta6_beach_scene_8K_raytrace_buttcheeks.webp
You cant because your games are designed to run in user mode moron
>he doesn't have a copy of DOS version C&C
ngmi
You still could if write the stdlib so that syscalls are just functions.
>run games on Ring 0
>not ring -3
ngmi
Who are you quoting?
download game from rutracker
Port gcc, binutils and libc to templeos, you also need a gpu driver
For a video game to have any advantage from running in kernel mode, the video game itself would have to be a kernel. As in, you aren't interfacing with Windows or Linux or whatnot, you *are* the Windows or Linux. If you took an ordinary video game and ran it in kernel mode, you'd probably end up crashing or corrupting some other program's memory, or doing some weird behavior because the game is compiled from the assumption that it has memory protection as a user program running on Windows.
Assuming you managed to make a video game that boots up, sets up its own drivers and whatnot and just runs as the sole process on a machine without any timer interrupts... you'd probably get some negligible performance improvements. Your CPU is chugging along billions of cycles per second, and not all of that is even spent executing instructions. The time you spend on context switches during I/O is pretty small relative to the amount of cycles you have. Hell, sometimes your kernel will tell the CPU to halt just so you can save electricity instead of being at 100% CPU at all times. So CPU utilization is probably not your problem if you're having performance issues.
>Assuming you managed to make a video game that boots up, sets up its own drivers and whatnot and just runs as the sole process on a machine without any timer interrupts... you'd probably get some negligible performance improvements.
This is exactly how dos doom worked back in the day and it was purely for memory reasons.
If op had mentioned bypassing the modern desktop/window compositor he may have had something.
is OP mental moronation or bait?
its bait because they want to hack shit
Since it comes up in the thread: "context switching" normally refers to multiprocessing/multithreading, i.e. what happens when there's a process or thread switch on a single CPU core. Or when there is an interrupt, though interrupts can be less expensive than a full thread switch. User/kernel mode switching is not necessarily a context switch, though depending on the OS function being called it can require a full context switch. Mode switching does, however, take time. Microkernel OSes failed precisely because they drive mode switching through the roof and it kills performance.
The problem is that if you got rid of the features that require context and mode switching, you couldn't develop a modern game. You couldn't get rid of interrupts or your controller wouldn't work. And any performance gained by eliminating context switching, i.e. OS threading, would be tiny in comparison to the loss of performance from being locked to one core. And the complete loss of responsiveness because the game would have to roll its own cooperative/fake multithreading. We're not talking about Space Invaders or Pac Man. You're not going to be able to organize/manage/schedule all the code that needs to execute in a modern game without OS threads.
In theory you could run everything at ring 0 and eliminate mode switching, but the entire stack would be delicate as frick and likely crash every game.
tl;dr - you can't do it, and while you would gain performance at one level, you would destroy it overall.
Well written, factual and informed posts are not allowed on IQfy, sir. Kindly refrain from posting ever again.
what if u run in ring -4 XD
>ring -4
>quantum channel to a black hole computer
What's this, running games on the Management Engine?
Good, but painful, post
ME is ring -3
ring -4 would be a ring under the simulation
ring -4 runs in NSA servers and it's the thing that actually controls your computer
What you really should be asking is why device drivers needs two whole ass rings.
Play DOS games.
Oh yeah I want to crash my entire system when my game crashes for zero performance advantage.
I love morons for some reason
what do you expect to accomplish? reduce syscall time or something? avoid TLB flushes or context switching or what?
NT kernel is also quite strange, so are you really griping about its shit design? try GNU + Linux.
man the content lately here has been on an upswing
so many laughs
>game crashes
>BSOD
>running a modern game engine at kernel level
they already run in ring0 moron it's called GPU drivers and they are a kernel module
reminder every post above mine is a subhuman npc who doesnt know about TLB flush on context swap, kys trannies unironically and in real life, i hope this message is logged by authorities too just so that i get put in jail away from morons like people ITT
Torturing you sounds fun.
have you tried not being poor and just updooting your hardware?
You fricking moron...
port it to templeos or play on c64
Just run a game with a modern anti-cheat service
Seriously though, given a user-mode game that runs entirely on basic system API's, how do you hypothetically achieve as close to ring 0-like operation as possible? I.e. a Linux distro with the sole purpose of booting an OpenGL game on a specific piece of hardware.
you could make it just about the only thing running and set it to real time cpu and i/o nice values to give as much resources as possible
basically, you can reduce how much other stuff can slow it down, but it won't actually ever be on another ring, just because it wasn't programmed that way
probably fork LUnix
https://lng.sourceforge.net
Ring 0 is not for maximum performance. printf of libc is faster than printk of the kernel.
It really is tragic how far off computers are.
General purpose computing has done unspeakable damage.
We need to return to domain-specific.
I like how troonix enthusiasts can not comprehend and airgapped machine, it's outside their realm of reality