Ask HN: Why can't basic OS apps stay fast?
When these applications slows down, it really hinders the user experience and forces users to upgrade(maybe this is why). Ever since I was a kid, I was always hopeful that the next release a new OS would solve this problem. This never happened.
When smartphones took off, with Android and IOS, I was again hopeful that, this time the issue would be addressed. In a sense, I was happy with IOS and OSX, the high level OS application layered for the most part, has higher level isolation. It is rare, that third party applications effect and slow them down. However, it still slows down.
Is this a real hard problem to solve? I would sacrafice, dedicated 20% of CPU/Memory, locked into these apps, so I never see slow down, when switching windows. Or is this not even an option to do? If so, why is it that the OS cannot reserve CPU cycles for itself that can never be touched by third party so it is always fast.
14 comments
[ 3.3 ms ] story [ 44.3 ms ] threadThis is a good thing for computing power progress.
Somewhat. On the one hand, you have plain old feature creep – people expect smoother animations, more animations, more features, better fleshed out features, … and it's hard to resist those demands when you want to sell your software.
One the other hand, you have security and reliability. All those error checks, bounds checks, canary checks, validations, secure hand shakes, … take up time, and it accumulates. DOS was fast, but it was also terribly insecure and most programs crashed regularly.
If it is not hard, is a big downside for app developers if they don't get 100% control over the CPU cycles? Why is it necessary these days that apps have the ability to push 100% on multiple cores?
At the least with multiple cores, shouldn't 1 core be dedicated to the OS, so it never hangs due to another app? Something sacred, with a lot of gates so devs cannot mess up the entire OS and user experience due to their app.
Also there is feature creep, the longer the system goes on the more feature, security checks, fixed, etc... your basic system does and that will exponentially increase the weigth of your system, requiring you to serve more and more, and making everything else slower.
I would have these function fast over anything else. I can live with the internet being slow and a page taking minutes to load, or an application running a task on the background while I switch around and doing other things and coming back. But when the OS slows down, you are locked in the App itself being slow and not being able to fluidly switch between other apps.
As the user of the OS, I wish nothing has precedence over what I want to do. The app should not have control or power over my OS.
Yes, it is. That's why when you get a new device, it's important that it appear to be fast. If your old device was slow thanks to all those apps you had that aren't yet on your new device, it makes the new device look even faster. Even if your old device wasn't all that slow, the new device will make it look like it was.
Apple is a great example of a company that uses this to its advantage. When iOS "x" released, it was fast. Then, between iOS "x" and iOS "x+1" is when Apple releases all these new apps and updates that require more horsepower. Oh look, your phone isn't as fast as it used to be, but thanks to the new phone that's coming out next month, you can run all those new apps at top speed until we get closer to iOS "x+2" next year.
An on screen keyboard doesn't have to be complicated, but once you add swype/multilanguage/dictionary/speech input/etc then it starts to require more IO to initialize.
iOS was lag free pre-apps. Then people wanted apps, then legit multi-tasking, and then tons of services from the OS to support multi-tasking apps. Now you'll be running a dozen or more full time processes even excluding the kernel.
> Is this a real hard problem to solve?
It is an easy problem to solve. You'd just have to give up tons of features and functionality.
> I would sacrafice, dedicated 20% of CPU/Memory, locked into these apps, so I never see slow down, when switching windows.
That wouldn't help. Many things are IO bound not CPU/memory bound. Plus on mobile there is still the battery X factor.
> Or is this not even an option to do? If so, why is it that the OS cannot reserve CPU cycles for itself that can never be touched by third party so it is always fast.
Sure it can. Almost all operating systems allow you to set a process as high priority for scheduling. It just doesn't do much, because as I said it is IO bound not CPU bound, and plus sometimes processes are waiting for an atomic lock to come free and by prioritizing the process in the spin, you've actually slowed and delayed the process who needs to finish up and free the lock actually adding lag (this was a BIG problem on Windows in particular, which is why they actually split several kernel level atomic locks).