Suggestion: A "Bidding System" for allocating memory resources on a Sim.
When a script attempts to load and needs to allocate a chunk of memory, it places a "bid" for that amount of memory. If the amount it needs is freely available, the bid is filled and the script runs as expected. However, if the amount of memory is not freely available (meaning the Sim is currently at max for script memory), this forces an "Auction". All scripts currently on the Sim must place a bid for the amount of memory requested. The "price" of their bid is calculated based on their current parcel's memory usage relative to its maximum usage (expressed as a percentage such that a maxxed out parcel would return 0%, a totally unused parcel would return 100%, and an overlimit parcel would return a negative percentage) and the size of their parcel in sqm. I'm sure there's some multiplier there that would assure even small parcels that have used virtually none of their resources always bid a higher price than other parcels that are near their limit. In this system, even Avatar attachment scripts would "bid" accordingly. There could be an additional multiplier applied to the Avatar's bid price to assure they get slightly higher advantage in the auction though. After all, Sims tend to be pretty static with respect to how many scripts are running .. when you count only the scripts in objects on the Sim. When you toss in the variable of Avatars and their attachments, that's when things start varying wildly. The last issue is .. what happens to the "losers" in the auction? My best suggestion is they get "checkpointed" .. swapped out and put in stasis until such time as they can win another auction. As memory is released (like when an Avatar leaves a Sim) the memory freed up could be placed at auction, and only checkpointed scripts allowed to bid. _______________________________________________ Policies and (un)subscribe information available here: http://wiki.secondlife.com/wiki/SLDev Please read the policies before posting to keep unmoderated posting privileges