Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
The Management
Jan 2, 2010

sup, bitch?
alright let’s do this. without overcommit your app that ran yesterday won’t run today because you have an open browser tab that has too many images that you haven’t looked at in six hours.

Adbot
ADBOT LOVES YOU

The Management
Jan 2, 2010

sup, bitch?
let’s clarify what it means to run without overcommit. it can be one of several things.

1. every process gets a fixed size memory segment. it does not grow or shrink.

2. every process gets a fixed size memory segment, but libraries are loaded in a shared region.

3. processes can grow their memory allocation. if a process tries to grow and there is not enough available memory, its request is denied and it needs to deal with the consequences.

4. processes can grow. if there is not enough memory, the OS asks other processes to release some memory. if processes don’t release memory, too bad.

5. same but if processes don’t release memory, the os kills them.


numbers 1 and 2 require processes to know their maximum memory requirement, and temporally waste a large amount of memory. it is also very restrictive because processes need to avoid temporary ballooning of memory allocations because they will either need to request a larger segment or they will hit the ceiling of their allocation.

number 3 is anarchy. an unfortunate combination of processes that happen to hit a memory peak at the same time can exclude each other and deadlock the system. programmers must be able to handle allocation failures everywhere. most code thinks it’s doing it, but rarely are those paths all tested and correct.

number 4 is the same as 3. many processes cannot reasonably halt what they are doing and release memory at request time. memory becomes a contended resource with processes repeatedly trying to acquire more to get their work done, and ignoring release requests. the system ends in memory deadlock again when memory high tide hits.

number 5 is the out of memory killer. it sucks. and killing processes that have other processes depending on them can be catastrophic and unrecoverable, requiring a userland reboot

The Management
Jan 2, 2010

sup, bitch?

DuckConference posted:

ex-girlfriend wants to get back together

don’t

DuckConference posted:

embedded javascript

don’t

The Management
Jan 2, 2010

sup, bitch?
also, no overcommit in an embedded system where there’s no paging and no user-installed apps is perfectly reasonable.

The Management
Jan 2, 2010

sup, bitch?

looks like we found the true calling of this thread. I don’t know what it’s like dating in the time of the plague, but I do know that getting back with your ex is a desperation move and it will be depressing from the minute the afterglow of the first boning wears off.

DuckConference posted:

sadly I can do nothing to prevent or change the javascript, and the system is already way too short on memory to ever turn off overcommit.

I’ve been there, with a super-slow storage device that made paging painful. the technical solution is none, it’s hosed and it’s going to be bad if it ever ships.

now is the time to cover your rear end. the long term solution is not to work with idiots and to get sign off on the specs of the system before it is made. the short term solution is to blame the people who got you into this. go to your management and tell them that they’ve put you in an impossible situation and they will have to eat this turd that they created. then you can try to put in a heroic effort and rescue it, but you’re setting yourself up for not getting blamed when it’s still terrible.

The Management
Jan 2, 2010

sup, bitch?
don’t overcommit to doomed relationships

Adbot
ADBOT LOVES YOU

The Management
Jan 2, 2010

sup, bitch?

Kazinsal posted:

browsers should be hibernating tabs you haven't used in ages / other tabs by last use time and memory consumption when memory constraints arise

ah, okay, so you should wait until the browser hibernates tabs before launching your app. how long is that? what if you just accidentally clicked on the browser window 2 seconds ago? what if it doesn’t do a very good job of releasing memory because of lazy programming?

your suggestion takes a function (swap) out of the kernel and distributes it to every app, relying on them to implement it cooperatively and correctly. it also requires them to have enough core functionality always in memory to be able to restore the rest of their state. that means not evicting their program text, unless they want to dynamically load and unload major parts of their code. the complexity ramps up very fast here.

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply