The solution: the OS is the one who really manages the locks and will let less critical code finish if a more critical process suddenly needs it. If multiple processes want the lock, the one with higher priority will (probably) get it.
Yeah apparently the explaination on how to fix it, didn't inherit the priority ;) (for those who don't get the joke: a way to fix it is priority inehritance)
@@nikhilb1502have you updated your bios to the latest one? In the past there was a ftpm module bug that caused random stutters and got resolved by AGESA update in bios
4:34 Actually, debugging a rover on Mars isn’t the “most remote of remote debugging”-that title belongs to the Voyager spacecraft, which are nearly 20 billion kilometers away! Just recently, engineers had to fix a data issue on Voyager 1 by sending a command that took over 20 hours to travel one way. Imagine troubleshooting a computer by sending commands that take almost a day to arrive, and then waiting another day for feedback. In comparison, debugging on Mars is like fixing something across town, while Voyager is like trying to fix it from another planet entirely!
odd metaphor to use at the end there, since you can literally say debugging on Mars IS trying to fix it from another planet and Voyager IS trying to fix something outside the solar system
4:34 Actually, debugging a rover on Mars isn’t the “most remote of remote debugging”-that title belongs to the Voyager spacecraft, which are nearly 20 billion kilometers away! Just recently, engineers had to fix a data issue on Voyager 1 by sending a command that took over 20 hours to travel one way. Imagine troubleshooting a computer by sending commands that take almost a day to arrive, and then waiting another day for feedback. In comparison, debugging on Mars is like fixing something across town, while Voyager is like trying to fix it from another planet entirely!
One way i use to fix this while gaming: 1. Set all gaming related tasks to a high or very high priority (not realtime) 2. Remove CPU 0 from the CPU Affinity of these above tasks, aka all cores except CPU 0 should be ticked. 3. Disable dynamic tick for the gaming application (google how to) 4. Enable highest performance mode from windows and OEM settings 5. End Process Trees for heavy applications that arent being used. 6. Decrease priority of ur game distribution software (example steam to low) dont end it, u need it for playing the game.
0:38 "If the processor accepts the request." Wait. CPUs can reject interrupts? [Does a bunch of research.] Well, I learned something new today. There are three types of interrupts: Maskable, non-maskable, and spurious. It's not so much as to whether the CPU rejects an interrupt so much as it can just choose to ignore it. Rejection implies a response. Firewalls, for example, can be configured to drop (no response) or reject (NACK response) packets. Spurious interrupts are the oddball. I'm not sure how those happen and couldn't find any examples.
There's always a bit of delay from the point that an interrupt is fired until the CPU acknowledges it and starts handling it. An interrupt is spurious if it got fired but does not need handling by the time the CPU is able to handle it. There's a few reasons that may cause it. One reason could be that the interrupt was disabled after it was fired but before it was handled. Another reason could be that in multiprocessor systems a different processor is handling the interrupt (if it needs handling by one processor), so it is spurious for the rest of the processors.
Normally you cant ignore interrupts, masking an interrupt is effectively disabling the request. Ignoring an interrupt is possible on x86 by signalling End Of Interrupt before handling the interrupt, however this can cause instability because the device may not raise the interrupt again until its properly handled. e.g. APIC (SATA controller) only raises interrupts when an interrupt status flag is set to `1` if the flag was already `1` then the interrupt is not raised, software must set the interrupt status flag to `0`. Spurious interrupts only occur with level-asserted interrupts. There are 2 types on interrupts edge and level asserted, edge is when the signal is raised and dropped again. Level assertion is when the line is held i its asserted state, when the line is no longer asserted the interrupt is not raised. An 8250 compatible serial controller uses level assertions, if it raises an interrupt, while interrupts are masked but software clears the interrupt status, this will cause the controller to de-assert its interrupt. This is a spurious-interrupt, when a level-asserted interrupt is de-asserted without being handled.
Yes, the CPU can mask interrupts. There are various schemes. In ARM-A class architecture, there is no NMI, all interrupts are technically maskable. The thing though is, that the CPU/OS code really doesn't want to mask interrupts. Interrupts are there to tell you something important. It sometimes has to mask interrupts for very short durations to ensure atomic operation (critical section) for small pieces of scheduler or interrupt handler code, where another interrupt interrupting that code would be disastrous.
My brain is like 800Mhz Cpu you'd find on Warcraft III minimum system requirements lol. Single Core , It's the only CPU that actively tries to BSOD ( blue screen of death ) to it's user frequently , KMS system inbuilt.
I feel this really needs a part two. Never really heard of this, was not really explained well for me and steps to try to trouble shoot this issue left out
Interrupt routines shouldn't cause your PC to stutter unless someome has implemented some really poor coding practices in that interrupt routine. Interrupt routines should execute in sub single milliseconds and shouldn't even be perceivable to you the user.
*Should* be sub-microsecond. Then 15 million of them per second is a bit under 15 seconds of service work per second. Hmm, wait a minute... (Where that interrupt rate comes from: 10 Kb packets -- so 1250 B, modeling 83% utilization and that not all are MTU sized -- on a 10 Gb connection is 1 million packet arrival interrupts per second. With 1 us ISR, that's 1s/s, 100% load, an entire core. In a 16, 24, or 48 port switch, we're back to 10s of cores per second -- but switches poll queues rather than be completely DoSed by interrupts.)
"unless someone has implemented some really poor coding practices in that interrupt routine". yup. So that is guaranteed unless you code everything you use yourself.
Switches are generally running ASICS for their routing engines these days. Only some unaccelerated deep packet inspection stuff on routers and gateways is still software that might do polling.
@@ChristopherHailey Bro stop... windows works fine it just needs to be cared for with software updates drivers bios and chipset. Sometimes a clean install and re-install all anew works great. Just remember to save your valuable data on an external drive first so you can access ur saved data.
@@ChristopherHailey windows really does have tons of problems but with the way linux is currently, moving to linux would be even harder for most people
thrashing doesn't have to go with interrupts, it's segmentation faults which occur due to multiple processes running at the same time. the phenomenon you're referring to is "interrupt storm", not to be confused with thrashing.
That's great! I never really understood the whole interruption thing. Has anyone tried cleaning up Windows? They say it helps, but I'm not sure if it's a myth. By the way, does anyone know where I can get a license for Windows 10?
This brings back memories, one of the first thing learnt in my first job where the difference in interrupt timings with systems with and without a GUI.
For fixes: Update hardware drivers. Disable Network adapters. Disable Audio Enhancements. Disable the Windows fast startup. Disable USB root hubs. Check if there is any failing hardware. Update the BIOS version on your PC. Turn off background programs not needed (ESPECIALLY YOU RGB HEADS) If you're savvy, msconfig to base and work up to find the actual problem Also services. There's many factors.
The Mars Pathfinder is an interesting one. Their software was actually capable for priority inheritance (this is when a task using a shared resource gets a priority bump while using that resource), which the solution to the priority inversion problem. The problem is that it was misconfigured to not use priority inheritance for that resource. There's a bit of a terminology mix-up in the video between "criticality" and "priority". For real-time systems like what was running on the Pathfinder, this is an important distinction. Priority is a measure of "urgency" as in "this needs to happen first". Criticality is a measure of importance; this definitely needs to happen; often high criticality things can be of low priority when it comes to the schedule design of this type of system.
Think you forgot the part about how to avoid it. I use LatencyMon to see what might be causing stutter. Often its drivers that needs updating (or downgrading) or some annoying windows process hogging the system.
@@Bassquake76problem is it doesn't offer clear solutions (just because there are none strictly speaking). It just lists the possible suspects, and then you have to sit and ponder what can be done about those. In many cases, attempting to fix it e.g. by trying various versions of drivers will result in lots of wasted time and effort with nothing to show for it...
@@BoraHorzaGobuchul Diagnosing stuff is often time consuming. You have to try and be methodical and remove/update/downgrade and repeat diagnosis steps. Theres no easy solution to stutter removal. I fixed my laptops stutter by removing some bloatware off a laptop that LatencyMon picked up on as an example.
@@BoraHorzaGobuchul diagnosing the cause of an issue isn't wasted time, since let's say it only happens with drivers from one company, you could at least know which caused you headaches and avoid it in the future.
I've been using computers for a long time. My 1st computer was a TI 99/4 I soon added an expansion box with a 32K memory expansion, Floppy disk controller, floppy disk drive and RS232 card (i'm 77). This was in the early 80's. When the system was writing to disk it would issue a system interupt. BTW,my 1st modem was a 300 baud where you would dial a number listen for a tone and then flip a switch.
Windows Defender is the biggest offender *pun intended* of PC interrupts. If you use LatencyMon you can see how many times it interrupts to check any processes or programs running. As soon as I disabled it I had 0 interrupts (instead of 2 interrupts every second and bursts of 300-1k interrupts). Anything else that interrupted like File Explorer or TextInputHost would do 1-2 interrupts then stop.
Our computers are more advanced than even the latest things going into space given they're often older hardware that has proven it's reliability, with added hardening against things like higher radiation levels and temperature fluctuations. They're using what are essentially heavily modified PowerPC G3's which came out in 1997 in things like the Orion space capsules which only had their first flight in 2014.
I'm so old I remember having to configure jumper settings on various cards (e.g. network cards) to assign an IRQ number for that particular piece of hardware. Don't even get me started on printer escape code sequences!
This is why I won't go pre-USB, my oldest current machine being a Gen2 i5. I do not miss trying to get my SB card to play nice with my NIC. IRQ, DMA, NFW! :-) I do love all the retro peeps trying to repair and preserve the history, tho.
Years ago I remember having to convince people not to move their mouse while the computer was loading as even that would slow it down considerably, sometimes making jobs take several minutes longer. Interrupts are also why you can move your mouse and type in most cases when everything else is locked up.
Techquickie video recommendations in the same vein for security are Structured Exception Handler (SEH) Overwrites, Data Execution Prevention (DEP), and Address Space Layout Randomization (ASLR). All three are fascinating!
Another thing to check if you have stutter is where your page file is stored. Windows seems to put it on the largest drive available (which is often your mass storage and slow HDD) and caused, me at least, issues. Shrinking it and putting it on the SSD solved my problem instantly.
Uh, if your system has to use the page file (and causes slow-downs because of that) the "real" fix is a RAM upgrade. The page file only gets used when the system runs out of memory (RAM) and has to move data to the pf.
@@NiyaKouya fair point but at that stage I had 16GB of good ram (10 years ago). It was just one game it did it in really, so it was probably an optimisation issue on their part. But I would still rather have the page file on my SSD.
Love it when program lets you choose it's priority, and then you set it to maximum, and then it has the higher priority than your mouse and keyboard, and then it crashes, and then you can't do anything.
Interrupts still run higher. They typical do the bare minimum, like moving data somewhere non crucial code can then find later. Usb uses polling so non interrupt code needs to check mouse & keyboard state, which is why you might see that issue. Old PS2 mice & keyboards use interrupts so won't have that problem. However that doesn't mean the GUI will have enough priority to show that changes
I recently had huge stuttering issues, while having consistent 200fps DDU'd the Nvidia driver & re-installed and it went away Funny thing is, i didn't update drivers, so that is not what caused it, just randomly my 3090 decided to run like a slideshow
3:28 what? no there's no bug trigger lmao. not sure what you're talking about here. the low priority task isn't "refusing to relinquish its hold", it's executing normally or it hung without releasing the lock. the resource being locked is the issue. this is called deadlock. the medium process calls an interrupt then goes to access the resource and "oops it's locked, well im either going to exit gracefully and try again later or bang my head against the wall until something happens" often it's the latter. nothing can unlock that resource and nothing should because that's the purpose of a lock. you don't lock something unless you need exclusive read/write access in the first place. now if there's no error handling and no watchdog timer on the interrupt the system is potentially in an interrupted state trying to access something nothing can access. you can either forcefully terminate the process with the lock (releasing it) or wait for it to end. the core of the issue is that the medium process is trying to access something it can't have access to at that time and isn't handling that gracefully. 3:48 stall? yes. timeout? no. that's the whole problem. if the system watchdog just times out the interrupt then the lock can be forcefully or normally will be released.
My 8000 Hz mouse was causing serious stuttering in many games. Cyberpunk, Minecraft, and Assassin’s creed were just some of the affected games. Had to make a macro to drop the polling rate to 1000 Hz for better compatibility. I just turn the mouse up to 8k now for competitive shooters
Man, I thought my computer was just channeling its inner sloth, but it turns out it's just busy prioritizing its own existential crisis over actually doing what I tell it to do.
I remember having awful stuttering on my PC and it turned out to be my TV which I disconnected in the Windows display settings causing device disconnection device manager interrupts over and over again. Such a pain to find the source but so satisfying to fix it
For anybody looking for a solution: You need to spread your interrupts onto multiple cores of your system. Windows uses core 0 as the only core that handles ALL interrupts. This causes stutters hitches/pops/cracks and can be infuriating if not done.
As a tech back in the day I ran into this sooo often. It was only ever a Windows-only issue, and is still a problem today. Whenever I could, I'd always grab old parts and build a Linux system for our benches to handle hard drive diagnostics or moving data from failing drives.
I've seen that many times over the years. Booting into an external OS and performing a read test often shows very bad performance on these drives as they struggle to read. Imaging the drive over to a replacement HDD or SSD immediately solves the problem, unless it's progressed far enough to have bad sectors corrupt important files or a directory structure.
The interrupt request for the hard drive gets halted as the read is attempted up to 8 times then reallocates, very little can continue on the host system until that completes. This is the main reason why a failing drive locks-up a computer if you try to access it, the list of high priority interrupts gets too long to complete.
wish you'd release this video earlier, had this exact bug that drowe me nuts. Turhed out that my motherboard didnt like "usb - to - usb type c" connector from aliexpress, two whole days I spent on troubleshooting
I have a good example of this that just recently happened to me, my MSI Motherboard (B650 Tomahawk) has a MysticLight USB Driver built-in for the RGB, which apparently has some sort of compatibility issue with my OS. My 2D and lower-end games were seeing stutter typical of a repeating CPU interrupt. I checked the system journal and it was disconnecting and reconnecting the 'failing device' repeatedly forever, continuously recreating the device in the system under a new ID, meaning I had no native built-in method to solve the issue. Ended up having to use a third-party package that controls what USB devices can access my system in order to disable it permanently whenever I log into my system, if an MSI representative is reading this, please fix your MysticLight Firmware, as I've seen it throw errors in both Windows and Linux systems when it's not even being used at all, something about the way it initializes with the OS is broken.
I get interrupt lag (I think) all the time on my work laptop. I don't what they've installed on it, but docking and undocking the laptop from the external monitor(s) 99% of time causes windows to lag and the system becomes unusable for over 5 minutes unless I kill the Windows Explorer process (and even then, it takes about a minute or so for all the windows to recover). Going into Task Manager shows Interrupts as the thing taking up 100% of CPU time, which is then replaced by Windows Explorer taking 100% of CPU time. It's frustrating, but that's what we have to work with.
My system (windows 11, 13900k, 3080 Ti + good ram etc.) always switched automatically to the balanced power mode in the power/energy settings. I had to set it to best performance to stop my pc from stuttering in overwatch 2. That has been working for me every time when i have problems, absolute 0 stutters after i switch it manually back to best performance (naming maybe not correct, i'm german) Maybe it helps someone, don't really know much about it but I tried infinite things and that did the trick after like 1 year of having problems
I remember working on someone's PC and Device Manager showed it somehow was using the same one IRQ for like 7 different components... I had no idea how it even managed to run. I reset its BIOS and scraped it with a fresh Windows install anyway.
This still doesn't explain why the interrupts are noticeable, given interrupts have been around for a long time. The real reason has more to do with simply bad code, a lot of it in Windows.
Yeah, if an interrupt function causes your pc to freeze up, whoever coded that interrupt put stuff in there that shouldn't be in an interrupt routine. This is absolutely just poor programing practices.
has nothing to do with the OS, it has to do with faulty software or non-rate limited hardware. interrupts are CPU label and every x86-64 CPU system has the same interrupt flags and service routines. these problems CAN and DO occur on Linux, or any other OS. and they DID occur in the older versions of the operating systems.
@@HerbaMachinanah it's never 1 interrupt that locks up a system. or at least very rarely. it's a STREAM of non rate limited, NMI calls which has the CPU constantly servicing them.
Honestly, it probably has to do with an old windows installation that might have some shady software or just any software that slows it down. My computer used to be kinda slower than usual after 6 years of using the same windows install, but when i reinstalled it it felt like i had a brand new computer.
its sometimes the motehr bord is also the bottle neck and also apple trys to keep thise interups at the smalerest by bacly makeing everything bacly sodered so close to eacht other. also the interups get far wrose the more you have to compress and swap your ram and vram with the main stroage drive when your ram and vram is under entoutgh pressure. this is also why apple alows you to reboot critcal tasks when needed if a interupt trys to get in the way. also if you don't heav entogh ram you will get trashing when your reaching the redline of your hardware. it also can ruin your HDD or SDD super duper qickly too if sevare entoguh witch is why if you got a mac device with 8gb of ram try to like run only one ram intsnive program at a time just for saftey.
I want my PC to ask me what tasks to place in which priority hierarchy, and be able to cater those choices depending on fundamental basics of what I'm currently doing, ie. Web browsing, gaming, or working in Office.
You know almost everyone who clicked on this was excited to learn how to reduce the problem that theyre experiencing and was a little let down. Glad to know a little bit more though.
I'm a bit confused. I took an OS class, and we covered interrupts, but it is specific to user and kernel interrupts within the OS. So does the hardware have a separate interrupt process, or am I just interpreting things wrong.
But now we have processors with multiple cores, usually more than enough of them for gaming, and an interrupt occurring doesn't, in itself have to pause some thread in your game while it runs. So surely it should now only be competition for non-shareable resources that causes these problems?
I never had this issue.. I factory reset, let windows update to fullest. Go to hardware websites download their latest chipset bios and drivers. So i guess alot of these issues are ppl not oversee software updates :)
Windows Interrupt Service can make my computer feel like it freezes -_- @2:35 you didn't tell us how to avoid it? Incomplete script, or did I miss something? So I have to send a patch to my Mars Rover to fix my computer? Lol
Video request: Is it possible to do a video on Memory Isolation or Game Mode? For memory isolation, it has become a big deal with the latest AMD performance windows update, so why keep it on at the cost of so much performance? I see a lot of people saying turn it off. If you install Logitech Ghub or ASUS Armory Crate then you can't even use it even if you uninstall them, it becomes incredibly difficult to turn back on. And game mode, some say it works great, others say it is garbage and don't turn it ob, what exactly does it do and why do people have these opinions? Thank you!
I remember owning a pretty old laptop with a single core CPU which had XP installed on it that worked just fine for most things... Until it got access to the internet. Then it was screaming for help. Of course I knew it was because of the internet connection, but now I know the exact reason.
I feel like the explanation on how to avoid it was cut out and replaced by the story of how it happened on a Mars rover in '97.
Didn't you catch it? The solution is to be a NASA engineer and develop your own patch for it.
Looks like there was a priority inversion in the script.
They don't want to dent their relationship with Microsoft!
The solution: the OS is the one who really manages the locks and will let less critical code finish if a more critical process suddenly needs it.
If multiple processes want the lock, the one with higher priority will (probably) get it.
Yeah apparently the explaination on how to fix it, didn't inherit the priority ;)
(for those who don't get the joke: a way to fix it is priority inehritance)
NGL was expecting a solution. Came out feeling like I went on Mars...
fr man having a ryzen 9 and seeing mouse run at 10 frames sometimes is a pain
@@nikhilb1502 Yep, been struggling with my 5800X3D for a year now.
I think I solved this one by removing tv and other unrelated devices from network settings, the tv in my house is samsung with tizen os 🤢
@@nikhilb1502have you updated your bios to the latest one? In the past there was a ftpm module bug that caused random stutters and got resolved by AGESA update in bios
Also chipset drivers being the latest play a role as well
Priority inversion: when the ad prioritizes itself over the entire point of the video
At least that is easily fixable
You see ads? That's crazy!
Didn't see it. I thought most people would use a modded youtube app
@@commieTerminatoron behalf of all ios users what the frick is a modded mobile app
4:34 Actually, debugging a rover on Mars isn’t the “most remote of remote debugging”-that title belongs to the Voyager spacecraft, which are nearly 20 billion kilometers away! Just recently, engineers had to fix a data issue on Voyager 1 by sending a command that took over 20 hours to travel one way. Imagine troubleshooting a computer by sending commands that take almost a day to arrive, and then waiting another day for feedback. In comparison, debugging on Mars is like fixing something across town, while Voyager is like trying to fix it from another planet entirely!
Sounds like using an Atom powered netbook lol.
It's faster than Windows Update 😅
Patching voyager one must of been as bad as a windows 95 update.
odd metaphor to use at the end there, since you can literally say debugging on Mars IS trying to fix it from another planet and Voyager IS trying to fix something outside the solar system
4:34 Actually, debugging a rover on Mars isn’t the “most remote of remote debugging”-that title belongs to the Voyager spacecraft, which are nearly 20 billion kilometers away! Just recently, engineers had to fix a data issue on Voyager 1 by sending a command that took over 20 hours to travel one way. Imagine troubleshooting a computer by sending commands that take almost a day to arrive, and then waiting another day for feedback. In comparison, debugging on Mars is like fixing something across town, while Voyager is like trying to fix it from another planet entirely!
One way i use to fix this while gaming:
1. Set all gaming related tasks to a high or very high priority (not realtime)
2. Remove CPU 0 from the CPU Affinity of these above tasks, aka all cores except CPU 0 should be ticked.
3. Disable dynamic tick for the gaming application (google how to)
4. Enable highest performance mode from windows and OEM settings
5. End Process Trees for heavy applications that arent being used.
6. Decrease priority of ur game distribution software (example steam to low) dont end it, u need it for playing the game.
You can also use latency monitor to check what's causing issues in ur system
@@MayankJairajhey Riley thanks for leaking the script to the 2nd half of the video! 😂
Thx
You don't need Steam open to play a game though...
dont need to do any of these these r not related to interrupt priorty at all .... u need msi utility v3 its on guru3d forum
the ad got into the way of how to avoid this.
Low priority ad interrupted high priority solution.
0:38 "If the processor accepts the request." Wait. CPUs can reject interrupts? [Does a bunch of research.] Well, I learned something new today. There are three types of interrupts: Maskable, non-maskable, and spurious. It's not so much as to whether the CPU rejects an interrupt so much as it can just choose to ignore it. Rejection implies a response. Firewalls, for example, can be configured to drop (no response) or reject (NACK response) packets. Spurious interrupts are the oddball. I'm not sure how those happen and couldn't find any examples.
There's always a bit of delay from the point that an interrupt is fired until the CPU acknowledges it and starts handling it. An interrupt is spurious if it got fired but does not need handling by the time the CPU is able to handle it. There's a few reasons that may cause it. One reason could be that the interrupt was disabled after it was fired but before it was handled. Another reason could be that in multiprocessor systems a different processor is handling the interrupt (if it needs handling by one processor), so it is spurious for the rest of the processors.
Normally you cant ignore interrupts, masking an interrupt is effectively disabling the request. Ignoring an interrupt is possible on x86 by signalling End Of Interrupt before handling the interrupt, however this can cause instability because the device may not raise the interrupt again until its properly handled. e.g. APIC (SATA controller) only raises interrupts when an interrupt status flag is set to `1` if the flag was already `1` then the interrupt is not raised, software must set the interrupt status flag to `0`.
Spurious interrupts only occur with level-asserted interrupts. There are 2 types on interrupts edge and level asserted, edge is when the signal is raised and dropped again. Level assertion is when the line is held i its asserted state, when the line is no longer asserted the interrupt is not raised. An 8250 compatible serial controller uses level assertions, if it raises an interrupt, while interrupts are masked but software clears the interrupt status, this will cause the controller to de-assert its interrupt. This is a spurious-interrupt, when a level-asserted interrupt is de-asserted without being handled.
Of course CPUs can reject or do commands? It's the CPU after all. What else component would do that?
Yes, the CPU can mask interrupts. There are various schemes. In ARM-A class architecture, there is no NMI, all interrupts are technically maskable. The thing though is, that the CPU/OS code really doesn't want to mask interrupts. Interrupts are there to tell you something important. It sometimes has to mask interrupts for very short durations to ensure atomic operation (critical section) for small pieces of scheduler or interrupt handler code, where another interrupt interrupting that code would be disastrous.
remember you can buy the best spec PC with the latest upgrades but you cannot upgrade your brain so it will bottleneck
Username checks out
my brain its like a Commodore 64 CPU
@@sergiokaminotanjomine is a 13900k that is failing from voltage issues
My brain is like 800Mhz Cpu you'd find on Warcraft III minimum system requirements lol.
Single Core ,
It's the only CPU that actively tries to BSOD ( blue screen of death ) to it's user frequently , KMS system inbuilt.
Your pfp is from my favourite False Knees comic strip ♥️
I feel this really needs a part two. Never really heard of this, was not really explained well for me and steps to try to trouble shoot this issue left out
Interrupt routines shouldn't cause your PC to stutter unless someome has implemented some really poor coding practices in that interrupt routine. Interrupt routines should execute in sub single milliseconds and shouldn't even be perceivable to you the user.
*Should* be sub-microsecond. Then 15 million of them per second is a bit under 15 seconds of service work per second. Hmm, wait a minute... (Where that interrupt rate comes from: 10 Kb packets -- so 1250 B, modeling 83% utilization and that not all are MTU sized -- on a 10 Gb connection is 1 million packet arrival interrupts per second. With 1 us ISR, that's 1s/s, 100% load, an entire core. In a 16, 24, or 48 port switch, we're back to 10s of cores per second -- but switches poll queues rather than be completely DoSed by interrupts.)
When I debug these issue I usually find directx runtime on the top. Either directx or gpu vendor do that. Who knows?
I have really bad news about many people's coding practices...
"unless someone has implemented some really poor coding practices in that interrupt routine".
yup. So that is guaranteed unless you code everything you use yourself.
Switches are generally running ASICS for their routing engines these days. Only some unaccelerated deep packet inspection stuff on routers and gateways is still software that might do polling.
That was a great explanation, but where is the solution?!
Don't use Windows is one solution
@@ChristopherHailey Bro stop... windows works fine it just needs to be cared for with software updates drivers bios and chipset.
Sometimes a clean install and re-install all anew works great. Just remember to save your valuable data on an external drive first so you can access ur saved data.
@@ChristopherHailey😂
@@Lightwish4Ksound good 👍
@@ChristopherHailey windows really does have tons of problems but with the way linux is currently, moving to linux would be even harder for most people
thrashing doesn't have to go with interrupts, it's segmentation faults which occur due to multiple processes running at the same time. the phenomenon you're referring to is "interrupt storm", not to be confused with thrashing.
I was thinking that this wasn't what I used to call thrashing, which was when your RAM was full and the swap file was being used a lot.
Perfect pfp
@@BrianG61UKfunny because this your definition I first heard of it on this channel. They definitely missed a lit with this video. Seems rushed
That's great! I never really understood the whole interruption thing. Has anyone tried cleaning up Windows? They say it helps, but I'm not sure if it's a myth. By the way, does anyone know where I can get a license for Windows 10?
I always clean the registry, but I think the real issue is the interruptions
@@FayeM9 I clean it regularly, but it's still the same
I'm thinking about switching to Win 11, but I don't know if it's worth it://
@@markjam55 Idk bro, I would wait a little longer for them to polish it
BNH Software is a good option. I have purchased from them several times and have never had any problems:))
I like your channel! I get educated on important topics related to computers and get a pinch of nostalgia everytime I watch it. All the best!
This brings back memories, one of the first thing learnt in my first job where the difference in interrupt timings with systems with and without a GUI.
For fixes:
Update hardware drivers.
Disable Network adapters.
Disable Audio Enhancements.
Disable the Windows fast startup.
Disable USB root hubs.
Check if there is any failing hardware.
Update the BIOS version on your PC.
Turn off background programs not needed (ESPECIALLY YOU RGB HEADS)
If you're savvy, msconfig to base and work up to find the actual problem
Also services.
There's many factors.
The Mars Pathfinder is an interesting one. Their software was actually capable for priority inheritance (this is when a task using a shared resource gets a priority bump while using that resource), which the solution to the priority inversion problem. The problem is that it was misconfigured to not use priority inheritance for that resource.
There's a bit of a terminology mix-up in the video between "criticality" and "priority". For real-time systems like what was running on the Pathfinder, this is an important distinction. Priority is a measure of "urgency" as in "this needs to happen first". Criticality is a measure of importance; this definitely needs to happen; often high criticality things can be of low priority when it comes to the schedule design of this type of system.
3:04 skip ad
Jokes on you, my computer is so slow I cant tell the difference between an interrupt, hanging, or just regular operation lol
Think you forgot the part about how to avoid it. I use LatencyMon to see what might be causing stutter. Often its drivers that needs updating (or downgrading) or some annoying windows process hogging the system.
Is there a way to bypass with this software?
@@SPECTRA890 Bypass what? The stuttering? If so, no, its just a diagnosis tool.
@@Bassquake76problem is it doesn't offer clear solutions (just because there are none strictly speaking). It just lists the possible suspects, and then you have to sit and ponder what can be done about those. In many cases, attempting to fix it e.g. by trying various versions of drivers will result in lots of wasted time and effort with nothing to show for it...
@@BoraHorzaGobuchul Diagnosing stuff is often time consuming. You have to try and be methodical and remove/update/downgrade and repeat diagnosis steps. Theres no easy solution to stutter removal. I fixed my laptops stutter by removing some bloatware off a laptop that LatencyMon picked up on as an example.
@@BoraHorzaGobuchul diagnosing the cause of an issue isn't wasted time, since let's say it only happens with drivers from one company, you could at least know which caused you headaches and avoid it in the future.
I've been using computers for a long time. My 1st computer was a TI 99/4 I soon added an expansion box with a 32K memory expansion, Floppy disk controller, floppy disk drive and RS232 card (i'm 77). This was in the early 80's. When the system was writing to disk it would issue a system interupt. BTW,my 1st modem was a 300 baud where you would dial a number listen for a tone and then flip a switch.
So how can you fix it?
Buy faster stuff
ALT + F4
don't, Windows is the problem
Have less venues of interruption in the first place. Install less things. Connect less hardware.
Use Linux. Problem (mostly) solved.
Windows Defender is the biggest offender *pun intended* of PC interrupts. If you use LatencyMon you can see how many times it interrupts to check any processes or programs running. As soon as I disabled it I had 0 interrupts (instead of 2 interrupts every second and bursts of 300-1k interrupts). Anything else that interrupted like File Explorer or TextInputHost would do 1-2 interrupts then stop.
Funny, literally went over this in one of my classes yesterday. This made it more understandable
Our computers are more advanced than even the latest things going into space given they're often older hardware that has proven it's reliability, with added hardening against things like higher radiation levels and temperature fluctuations. They're using what are essentially heavily modified PowerPC G3's which came out in 1997 in things like the Orion space capsules which only had their first flight in 2014.
I'm so old I remember having to configure jumper settings on various cards (e.g. network cards) to assign an IRQ number for that particular piece of hardware. Don't even get me started on printer escape code sequences!
Sound blaster audio card sometimes needed this IRQ thing...
This is why I won't go pre-USB, my oldest current machine being a Gen2 i5. I do not miss trying to get my SB card to play nice with my NIC. IRQ, DMA, NFW! :-) I do love all the retro peeps trying to repair and preserve the history, tho.
"Printer escape code" sounds like the button combo you have to mash when your office printer gains self-awareness and transforms into a murderbot.
Back in my day addon cards had jumper switches to set which IRQ (interrupt request line) they would use so not as to overlap with existing hardware.
Years ago I remember having to convince people not to move their mouse while the computer was loading as even that would slow it down considerably, sometimes making jobs take several minutes longer. Interrupts are also why you can move your mouse and type in most cases when everything else is locked up.
Techquickie video recommendations in the same vein for security are Structured Exception Handler (SEH) Overwrites, Data Execution Prevention (DEP), and Address Space Layout Randomization (ASLR). All three are fascinating!
Fast PCs even have their own place to retire : *Stutter Island*
Another thing to check if you have stutter is where your page file is stored.
Windows seems to put it on the largest drive available (which is often your mass storage and slow HDD) and caused, me at least, issues.
Shrinking it and putting it on the SSD solved my problem instantly.
Uh, if your system has to use the page file (and causes slow-downs because of that) the "real" fix is a RAM upgrade. The page file only gets used when the system runs out of memory (RAM) and has to move data to the pf.
@@NiyaKouya fair point but at that stage I had 16GB of good ram (10 years ago).
It was just one game it did it in really, so it was probably an optimisation issue on their part.
But I would still rather have the page file on my SSD.
Or may b buy a new SSD of same capy as your HDD, then "OS clone" your data from HDD to SSD, use the SSD.
Problem solved COMPLETELY
@@newaccount2210 that would definitely work but the HDD is 6TB. An SSD of that size is a bit expensive lol
Love it when program lets you choose it's priority,
and then you set it to maximum,
and then it has the higher priority than your mouse and keyboard,
and then it crashes,
and then you can't do anything.
Interrupts still run higher. They typical do the bare minimum, like moving data somewhere non crucial code can then find later.
Usb uses polling so non interrupt code needs to check mouse & keyboard state, which is why you might see that issue.
Old PS2 mice & keyboards use interrupts so won't have that problem. However that doesn't mean the GUI will have enough priority to show that changes
And what can you do about it?
Great explanation 😊
I recently had huge stuttering issues, while having consistent 200fps
DDU'd the Nvidia driver & re-installed and it went away
Funny thing is, i didn't update drivers, so that is not what caused it, just randomly my 3090 decided to run like a slideshow
5:03 i should try this lol
😂😂
Everytime I watch these videos, I feel like I learn something new
That ADHD comment was too real. I too experience priority inversion daily 💀
4:48 "spending valuable time thinking about what to do rather than doing it" yeah that hits right home lmao
3:28 what? no there's no bug trigger lmao. not sure what you're talking about here. the low priority task isn't "refusing to relinquish its hold", it's executing normally or it hung without releasing the lock. the resource being locked is the issue. this is called deadlock. the medium process calls an interrupt then goes to access the resource and "oops it's locked, well im either going to exit gracefully and try again later or bang my head against the wall until something happens" often it's the latter. nothing can unlock that resource and nothing should because that's the purpose of a lock. you don't lock something unless you need exclusive read/write access in the first place. now if there's no error handling and no watchdog timer on the interrupt the system is potentially in an interrupted state trying to access something nothing can access. you can either forcefully terminate the process with the lock (releasing it) or wait for it to end.
the core of the issue is that the medium process is trying to access something it can't have access to at that time and isn't handling that gracefully.
3:48 stall? yes. timeout? no. that's the whole problem. if the system watchdog just times out the interrupt then the lock can be forcefully or normally will be released.
My 8000 Hz mouse was causing serious stuttering in many games. Cyberpunk, Minecraft, and Assassin’s creed were just some of the affected games. Had to make a macro to drop the polling rate to 1000 Hz for better compatibility. I just turn the mouse up to 8k now for competitive shooters
Tanks Riley, good job
The more I watch these videos, the more I realize how complex and complicated the code for an os and for hardware is
Man, I thought my computer was just channeling its inner sloth, but it turns out it's just busy prioritizing its own existential crisis over actually doing what I tell it to do.
I remember having awful stuttering on my PC and it turned out to be my TV which I disconnected in the Windows display settings causing device disconnection device manager interrupts over and over again. Such a pain to find the source but so satisfying to fix it
The noisy WiFi adapter really needed a few “Hey. Listen!”s thrown in there. Golden opportunity.
For anybody looking for a solution:
You need to spread your interrupts onto multiple cores of your system. Windows uses core 0 as the only core that handles ALL interrupts. This causes stutters hitches/pops/cracks and can be infuriating if not done.
several times a dying or dead hard drive hangs the entire computer until i pull the sata or usb cable
As a tech back in the day I ran into this sooo often. It was only ever a Windows-only issue, and is still a problem today. Whenever I could, I'd always grab old parts and build a Linux system for our benches to handle hard drive diagnostics or moving data from failing drives.
I've seen that many times over the years. Booting into an external OS and performing a read test often shows very bad performance on these drives as they struggle to read. Imaging the drive over to a replacement HDD or SSD immediately solves the problem, unless it's progressed far enough to have bad sectors corrupt important files or a directory structure.
The interrupt request for the hard drive gets halted as the read is attempted up to 8 times then reallocates, very little can continue on the host system until that completes. This is the main reason why a failing drive locks-up a computer if you try to access it, the list of high priority interrupts gets too long to complete.
Great, glad that I now know that there's an issue.
Shame I have no clue or tips on how to help prevent this.
As an ADHD user, the last comment was golden.
Can we get a part two showing more on this issue?
Thanks for the video!
Talking about Mars Rover, "Most remote of remote debugging"
* Voyager 1 has entered the chat
I wish Riley was still in main ltt videos like the ones fro 5-6 yrs ago. ($69 Gaming PC etc.)
wish you'd release this video earlier, had this exact bug that drowe me nuts. Turhed out that my motherboard didnt like "usb - to - usb type c" connector from aliexpress, two whole days I spent on troubleshooting
I have a good example of this that just recently happened to me, my MSI Motherboard (B650 Tomahawk) has a MysticLight USB Driver built-in for the RGB, which apparently has some sort of compatibility issue with my OS. My 2D and lower-end games were seeing stutter typical of a repeating CPU interrupt. I checked the system journal and it was disconnecting and reconnecting the 'failing device' repeatedly forever, continuously recreating the device in the system under a new ID, meaning I had no native built-in method to solve the issue. Ended up having to use a third-party package that controls what USB devices can access my system in order to disable it permanently whenever I log into my system, if an MSI representative is reading this, please fix your MysticLight Firmware, as I've seen it throw errors in both Windows and Linux systems when it's not even being used at all, something about the way it initializes with the OS is broken.
Nice video. Now I know the theory behind it. But I'm missing the part how to diagnose and troubleshoot it?
Explained yes, fixed….
Edit: I patted that duplicate rover when I saw it in person, good job clone. ❤
Because they don't use the Ryzen 4070
of course
Would love me one of them there Ryzen 4070 X3D’s
it's spreading
Microsoft Defender Realtime Protection is the biggest culprit for Stutters on Windows machines...
I get interrupt lag (I think) all the time on my work laptop. I don't what they've installed on it, but docking and undocking the laptop from the external monitor(s) 99% of time causes windows to lag and the system becomes unusable for over 5 minutes unless I kill the Windows Explorer process (and even then, it takes about a minute or so for all the windows to recover). Going into Task Manager shows Interrupts as the thing taking up 100% of CPU time, which is then replaced by Windows Explorer taking 100% of CPU time. It's frustrating, but that's what we have to work with.
Try disabling gpu hardware enabled scheduling
I didn´t expect this to become a good and plausible explaination of whats going on in an ahad mind. xD
My system (windows 11, 13900k, 3080 Ti + good ram etc.) always switched automatically to the balanced power mode in the power/energy settings. I had to set it to best performance to stop my pc from stuttering in overwatch 2. That has been working for me every time when i have problems, absolute 0 stutters after i switch it manually back to best performance (naming maybe not correct, i'm german)
Maybe it helps someone, don't really know much about it but I tried infinite things and that did the trick after like 1 year of having problems
hybrid core technology: ""and i took that personally""
I remember working on someone's PC and Device Manager showed it somehow was using the same one IRQ for like 7 different components... I had no idea how it even managed to run. I reset its BIOS and scraped it with a fresh Windows install anyway.
This still doesn't explain why the interrupts are noticeable, given interrupts have been around for a long time.
The real reason has more to do with simply bad code, a lot of it in Windows.
Yeah, if an interrupt function causes your pc to freeze up, whoever coded that interrupt put stuff in there that shouldn't be in an interrupt routine. This is absolutely just poor programing practices.
has nothing to do with the OS, it has to do with faulty software or non-rate limited hardware. interrupts are CPU label and every x86-64 CPU system has the same interrupt flags and service routines. these problems CAN and DO occur on Linux, or any other OS. and they DID occur in the older versions of the operating systems.
they exist in mac, just the users are too busy waiting for their soy latte that they dont notice.
@@HerbaMachinanah it's never 1 interrupt that locks up a system. or at least very rarely. it's a STREAM of non rate limited, NMI calls which has the CPU constantly servicing them.
Honestly, it probably has to do with an old windows installation that might have some shady software or just any software that slows it down. My computer used to be kinda slower than usual after 6 years of using the same windows install, but when i reinstalled it it felt like i had a brand new computer.
its sometimes the motehr bord is also the bottle neck and also apple trys to keep thise interups at the smalerest by bacly makeing everything bacly sodered so close to eacht other. also the interups get far wrose the more you have to compress and swap your ram and vram with the main stroage drive when your ram and vram is under entoutgh pressure. this is also why apple alows you to reboot critcal tasks when needed if a interupt trys to get in the way. also if you don't heav entogh ram you will get trashing when your reaching the redline of your hardware. it also can ruin your HDD or SDD super duper qickly too if sevare entoguh witch is why if you got a mac device with 8gb of ram try to like run only one ram intsnive program at a time just for saftey.
rover: speaking about local and deployed code lol
why when I turn on my pc and login it doesn't show my desktop unless I move the mouse to kind of update/refresh the display?
Great video, very informative. Now for your next video I need Riley to explain how I can get her back. I’m lonely and I’m sorry
1:30 Is that the reason behind "watchdog timeout" BSoD?
I want my PC to ask me what tasks to place in which priority hierarchy, and be able to cater those choices depending on fundamental basics of what I'm currently doing, ie. Web browsing, gaming, or working in Office.
You know almost everyone who clicked on this was excited to learn how to reduce the problem that theyre experiencing and was a little let down.
Glad to know a little bit more though.
I'm a bit confused. I took an OS class, and we covered interrupts, but it is specific to user and kernel interrupts within the OS. So does the hardware have a separate interrupt process, or am I just interpreting things wrong.
But now we have processors with multiple cores, usually more than enough of them for gaming, and an interrupt occurring doesn't, in itself have to pause some thread in your game while it runs. So surely it should now only be competition for non-shareable resources that causes these problems?
great sense of humor! but also would be nice to provide some real examples (which programs and their behavior) of these stutters
Meanwhile PC:
Did I stutter?
I usually blame software on stuttering on great PCs because windows 10 and 11 are both very buggy compared to vista and 7 today.
As someone with adhd, no that will make you sound insane
I never had this issue.. I factory reset, let windows update to fullest. Go to hardware websites download their latest chipset bios and drivers.
So i guess alot of these issues are ppl not oversee software updates :)
Cool video, thanks
So the solution is, sending my pc to mars in 1997?
I feel like i just read the first half of the article telling me why I've got the problem I've got and then the power went out or smth 🤦🏾♂️
Windows Interrupt Service can make my computer feel like it freezes -_-
@2:35 you didn't tell us how to avoid it? Incomplete script, or did I miss something? So I have to send a patch to my Mars Rover to fix my computer? Lol
And is there a solution to maybe find out the processes that spam interrupts or so? :D
Yep, using the performance profiler in windows allows you to do just that!
@@TheSimRacers "performance profiler" ?? what program are you referring to because I don't see any performance profiler app
@@Noahitis its called, “Windows Performance Monitor” and its been built into windows administration tools since windows XP…
@@Noahitis its called Windows Performance Monitor and has been available in windows since XP.
@@TheSimRacers I know of the performance monitor, this fellow said performance "profiler" which is a completely different function
As somebody who's recently spent a bunch of time debugging a multithreaded application, that stuff's just so, so hard to deal with 😭
My Mac never does that. Everytime I use my Gaming PC it is like going back in time.
Multi core cpu's should use one or two cores to handle these stalls before they effect the user.
I had a laptop once from a customer with stuttery behaviour. The cause? Chicken soup! Moral of the story never drop chicken soup on your computer lol!
Video request: Is it possible to do a video on Memory Isolation or Game Mode? For memory isolation, it has become a big deal with the latest AMD performance windows update, so why keep it on at the cost of so much performance? I see a lot of people saying turn it off. If you install Logitech Ghub or ASUS Armory Crate then you can't even use it even if you uninstall them, it becomes incredibly difficult to turn back on. And game mode, some say it works great, others say it is garbage and don't turn it ob, what exactly does it do and why do people have these opinions? Thank you!
4:44 i thought that what you're describing here sounded a lot like ADHD and then you said it 😂.
I remember owning a pretty old laptop with a single core CPU which had XP installed on it that worked just fine for most things... Until it got access to the internet. Then it was screaming for help. Of course I knew it was because of the internet connection, but now I know the exact reason.
would be more helpful if this went into how to troubleshoot such issues
Maybe I just missed it but it was never explained why this applies to fast PCs (more so than slow PCs)
Where's the video talking about tracking those issues down and resolving them?
There was priority inversion and thrashing on the script of this video.
I want to know why when im waiting for my computer to complete some task and i open the task manager it says almost no system resorces are being used
Does that explain why my file explorer can hang for couple of seconds whenever I access or make changes to a content? Even this happens on 2.5 SSD
Do CPUs with more cores experience this problem any less? Or do more cores not make any difference for this problem?🤔
I learned something today