4 ms·
You are right, but the result of all apps (plus adverts) taken together is a very sluggish system. I think what operating systems should do is to allow users s
by fauigerzigerk 9y ago
You are right, but the result of all apps (plus adverts) taken together is a very sluggish system.
I think what operating systems should do is to allow users set per app/website quotas and use sensible defaults.
Developers should get the message that no we can't use all the resources available on a given system just for our particular app.
- fredsir 9y agoThat would be a glorious feature. I wonder if QubesOS can do that. In any ways, macOS that I am running as my personal system probably ain't gonna get that feature anytime soon.
- seanwilson 9y ago> I think what operating systems should do is to allow users set per app/website quotas and use sensible defaults. I can't see how this would work. What would the sensible default be for a computer game? A text editor? An IDE? A video editor? This kind of thing is way over common users heads to set their own quotas as well. How would you avoid "This app wants to use more resources than the default. Allow?" popups with low defaults?
- fauigerzigerk 9y agoThe defaults would be set according to some simple statistics. If an app or website wants to use more it must ask for permission, but it can only ask a limited number of times within a given period. Of course it's easy to imagine an implementation of this idea that is annoying and confusing. But I can imagine this working very well and provide an incentive for developers to not waste resources.
- seanwilson 9y agoWhat statistics would you use though? My point was a high-end game is going to use close to 100% CPU all the time and lots of memory, a video editor is going to be idle sometimes and then try to use 100% CPU to make edits fast, text editors will be more modest etc. All apps have different resource usage profiles. I can't see how you could make this work without user interaction or a review process for apps.
- sacado2 9y ago"app XYZ seems to be using a lot of resources. Do you want to stop it ? Yes/No", with a "don't ask me again" checkbox.
- fauigerzigerk 9y agoOn second thought, I wouldn't actually use statistics at all. I would simply set all defaults to a low value in the single digits percentage range on average over a period of one minute or so. The overwhelming number of apps need next to no CPU (on average that is. Spikes are OK) during normal operation, and that includes text editors. Other applications, such as games, need all the juice they can possibly get. Users usually know why that is the case and will be happy to grant them that permission. There needs to be a way for an app to request a temporary suspension of resource limits, e.g. for running batch job that should finish as quickly as possible. Each website should be treated as a separate application and needs to compete for resources with the ads it runs. So there would be an incentive for website owners to keep the resource usage of ads in check.
- chriswarbo 9y agoWhilst this would be nice for power users (I've certainly hit out-of-memory on Linux and had random processed killed), it wouldn't have much effect in the grand scheme of things. Commercial developers will use as much memory as they can get away with; OS vendors would disable the quota system (or set the quota to 100% of whatever RAM the device has) since they don't want apps to "break" on their laptop/tablet/phone and work on their competitors'.
- jackmott 9y agoThere is some very basic education and industry choices we could make to get a ~4x or so efficiency gain without any substantive increase in development time/effort/maintance cost etc. If people graduated from college with just a little bit of understanding of how slow ram is, how CPU caches work, how expensive allocating memory on the heap is (either, initially with something like malloc, or amortized with garbage collection) and if we stopped using languages that haven't at least built a good JIT yet, and use AOT native compilation more often, we would all be in a much happier place. Systems would be much more snappy, or we could add more features, users can run more things at once before it goes to hell, batteries would last longer. None of this requires even changing what language you use, or massive changes in coding style. Just knowing some basic facts about how the computer works can let you choose the more efficient option among equivalently complex options -> "don't need a linked list here, let's use an array backed list instead" -> let's not use LINQ here because that allocates and this is a tight loop that runs on every request -> lets not use electron, let's build something with a similar external API that is more efficient
- seanwilson 9y agoWhy do you just assume apps using more resources now is because of coders with bad optimisation knowledge? > lets not use electron, let's build something with a similar external API that is more efficient People also choose Electron because it's an efficient in terms of development time to release apps on multiple platforms, not because they don't know how to optimise.
- 9y ago
- wolfgang42 9y ago> allow users set per app quotas This sounds sort of like what classic Macs did: there were some settings in the application's "Get Info" dialog to adjust the "current size" of the application (along with a note as to what the "preferred size" was); if there wasn't enough free memory the program would refuse to start. In practice, this is a terrible idea: it generally turned into "well, this program isn't working right, what if I fiddle with it's memory allocation?" and did nothing to actually help the user. (To be fair, the setting was necessary as a result of technical limitations, but I don't see it working out any better if it was implemented intentionally.)
- fauigerzigerk 9y ago>In practice, this is a terrible idea Perhaps it was in the 1980s, but back then applications didn't get funded by downloading adds from third parties using 100% of our CPU. We didn't use many applications at the same time either. So the problem we have right now simply didn't exist back then. And where it did exist, like on mainframes, they did actually use quota systems rather successfully I believe (just as we are right now with virtual machines).