Overcommit is desirable because of the fork/exec model of creating processes; if a big one wants to spawn children, without overcommit you need to be able to recommit its VM size, regardless of how lightweight the desired child is.
Sadly there is no good (& simple) solution under most Unixes (that's a problem that only affects long running and big processes, but those are often the main applications of some embedded systems). I'm not really found of vfork now that we use threads more often (well, at least on Linux it seems other threads are not suspended, but it seems that this is not a Posix guarantee)... posix_spawn could be a solution if implemented with some dedicated kernel support (or always implemented through well-behaved existing ones).
Should this be considered poor behavior or design?
It's been quite a while since I wrote explicit fork/ exec code, but wouldn't a better approach be to have a small master process that spawns off the necessary children and then either links them up or mediates communication?
I mean, on a unix-like system, init is ultimately the spawner of everything else and it's not a particularly large process.
Yes on Unix it can be interesting, if needing fork/exec to spawn children, to pre spawn an helper child process that will do just that. But that would just be because the fork/exec model is insane: with a posix_spawn (or CreateProcess) centric approach, you don't have to add that extra layer, and you have very few drawbacks. Also, that will not help you when trying to use libraries that attempt to spawn on their own.
As for init being small, I leave you the responsibility of your words, now that we live in a systemd world :p
The reason it is there is that the C memory allocation model tends to ask for rather more memory than the program actually needs. This leads to inefficiency if all that unused memory is backed by physical memory. So this overcommit trick was created to allow other processes to 'steal pages' from processes that have allocated memory but have decided not to use them for now. In practice this works reasonably well, but there are some nasty edge cases when one or more of those programs wake up and then decide to actually use the memory they think they already have.
For systems where deterministic behavior is more important than flexibility (for me: all of them, for others: their choice) you're better off disabling overcommit.
I don't think there is no such thing as a "C memory allocation model". There are various ways of requesting memory from the OS. But not requesting anything in advance is going to be very slow in any setting that requires a context switch or virtual memory.
I just read http://unix.derkeiler.com/Newsgroups/comp.unix.solaris/2008-... and it seems that they did not solve any problem at all; they don't allow overcommit, that's all. But they do not do anything else to compensate for the disadvantages this implies (this also have advantages, but not only)
You can do that by tuning Linux to have this behavior if you like it. In a Unix system, I don't thing this is the most desirable behavior in the general case...
I can't remember but I did sit in on a presentation about 15 years ago where they explained it. I lent the notes to a senior developer and never got them back.
It doesn't have an OOM killer. Even more remarkably a call to allocate memory can't fail, but it may not return either. When Solaris (well, SmartOS in my case) runs completely out of memory, all hell breaks loose.
DTR operations were terminated on Voyager 2 in 2007, and Voyager 1 in 2015, but I don't know if this was related to mechanical problems with the tape recorders or just due to the lack of need given the data collected by the remaining instruments.
I've never been on the offshore survival course where they teach you how to jump off an oil platform into the sea and survive, but allegedly they tell you to cover your mouth firmly with the palm of your hand and pinch your nostrils closed tight between your thumb and fingers. Apparently when you hit the cold water your natural reaction is to breath in. Also, you must prevent water being forced up your nostrils and damaging your brain etc.
I have been. You do get to practice that jump off of a moderately high diving board, I forget exactly how high it is. But it's legs together, feet pointed down, one arm with the hand over your face pinching your nose and the other held tight to your stomach. Nobody mentioned doing anything special on entering the water, besides the obvious of swimming to the surface after you stop.
The thing that kills most people who are "simply" buried in an avalanche (and not pulped as they're carried through the tries or into a rock) is actually the CO₂ concentration in the snow around their nose and mouth building up over time.
I have a piece of avalanche survival kit made for skiers/snowboarders called the "AvaLung" in my off-piste bag. It draws air in from around the face, and vents your exhalations out behind you. People have survived being buried an hour or more wearing one of those.
"In the example of home rental, making homes available for rent enables families to live in accommodations that they would not be able to purchase. These accommodations are not without cost to the owner: Taxes, utilities, maintenance, security and administration are all associated costs that rent payments offset. What the rentier provides in most cases, is a better quality of life than the family could have if they were forced to own the property they lived in."
In many parts of the UK this just isn't the case any more. There is a serious lack of housing due to many factors (the bigots will tell you it's all the fault of immigration) but the short story is that the competition for rental property is so fierce now that in many places, monthly rent to the private landlord is higher than a monthly mortgage payment would be to buy a similar property.
So why don't people just buy? Well, there is a shortage of houses to buy, and you can't usually get a 100% mortgage. You need to put down a substantial cash deposit towards the purchase price of the house, for example 15, 20 and even 25% in some cases.
So why don't people just save up for a deposit? Well, if you need to spend £250k on a very modest 3-bedroom house, you are looking at anything from £37.5k plus fees.
Housing is so expensive now in relation to average income, that people are effectively priced out of the market forever, unless they win or inherit a lot of money. It is not possible to save that amount in any reasonable time scale.
So why not get a second or third job? Maybe they'll work themselves to death before they need that house? Only joking, people have to work long hours at their main jobs nowadays. The contract may say 37.5 hours per week, and that's what you get paid for, but "You're all professionals..."
> the competition for rental property is so fierce now that in many places, monthly rent to the private landlord is higher than a monthly mortgage payment would be to buy a similar property.
This is not a malfunction of the market. Economically renting is always expected to cost more than buying. Renting has advantages over buying:
* No need to have a significant amount of cash to deposit
* Flexibility to move out into a larger or smaller house that better fits your needs
* No exposure to the risk of changing housing prices (which don't always go up, and can be hugely impacted by policy)
* Less headaches over maintenance, etc. This is (typically) your landlords responsibility.
So, just like a flexible airfare is more expensive than a 'no changes allowed' fare, it makes perfect sense that a rental house on average is more expensive than owning a house. Also, if rental prices are lower than the mortgage cost, the owner should probably do something different with that house.
TL;DR: rental prices are expected to be higher than owning, because renters are willing to pay a premium, and because landlords otherwise have no incentive to let out a property in the first place.
Parent's comment still stands, but you have to take the regulation into account:
* people can live in a bigger house than they could otherwise afford, e.g. if they can't make the deposit
* people can live in a bigger house than they could have the mortgage for. (e.g. Dutch regulation you can mortgage 4.5x your yearly salary. If you make 40.000 Eur that is 180k, which perhaps buys you a small studio in Amsterdam). Renting you could probably live in a 250k valued house, because those restrictions don't apply.
Two of these aren't true in the U.S. as I was reminded during a recent eviction where we had to find a new place in 30 days. Let's address them.
"No exposure to the risk of changing housing prices (which don't always go up, and can be hugely impacted by policy)"
In our case, the homeowner thought the home was undervalued or marketable rent wasn't good enough. Just wasn't enough ROI. So, he sold the house out from under us to put the money in a better investment. Many years of on-time rent payments meant nothing. So, yes, renters have to worry about that stuff with quick, dire results when a problem happens.
" Flexibility to move out into a larger or smaller house that better fits your needs"
Most renting these days is done by agencies with formal procedures and tactics to maximize value for them. So, we had to fill out lots of paperwork, get credit checks, and otherwise go through the ringer. They were also all pushing us to accept a higher rate or trying to include stuff in the contract where we fix any problems in $80-200 range. All sorts of stuff. Fortunately, a friend at an agency that knew we were good tenants luckily pulled strings and got us a place just in time.
I imagine that if we were homeowners we'd have had that flexibility of moving into houses that fit our needs. We could shop around, identify the best deal, and move in at our own pace. Unfortunately, we were renters. That meant we had to act on homeowner's short timetable plus fit within the needs of renting agencies who were so picky we wouldn't have had a place.
>No exposure to the risk of changing housing prices
Except when your 12 month lease expires and they jack up your rate 20%. If anything renters are at greater exposure to changing housing prices. Renters don't benefit from drops in pricing, and they only have detriment from increases. At least home owners benefit from one side.
Rents must be tied to drops in pricing in the long run. If rents don't drop with the price of houses, investors would swoop in to buy the high ROI housing, and existing renters would make home purchasing a higher priority as opposed to buying stocks, paying off other debt, or spending their disposable income.
Also, having a uncertain monthly expense is not nearly as much of a risk as having 100% or 200% of your networth tied to a volitile and usually zero-sum housing market. The counterfactual of owning a diversified portfolio of stocks and bonds is much better from an investment perspective.
> investors would swoop in to buy the high ROI housing
They do, all the time.
> existing renters would make home purchasing a higher priority
They can't, there's such a low supply of housing in the entry-level price points
> uncertain monthly expense is not nearly as much of a risk as having 100% or 200% of your networth tied to a volitile
Most people do not own the vast majority of their home. Worst case scenario, they buy a house, it goes down a lot in value, and they do a strategic foreclosure and declare bankruptcy. Considering the average American has little to no savings and therefore nothing to lose in bankruptcy, there's really not much a downside. In fact they may even profit from it tremendously in other ways, such as wiping out their credit card debt at the same time.
The ones that do have any sizeable amount of savings are 40+ years old today and have benefited in insane amount in housing prices over the past two decades. Their home values will never go down anywhere near the amount they have gone up.
Compare this to a guaranteed, unavoidable loss with ever increasing rent prices. If rents actually do drop with housing prices over the long run, it certainly hasn't mattered at all for decades given the long term trend of the American housing market.
Renting also has the nice added benefit to landlords and capital owners that it can take tremendous portions of the working classes income while exclusively transferring wealth from them every month so they can never get ahead.
One of the greatest necessary advents in the near-term for prosperity of all is the correction of housing towards smaller, more affordable dwellings out of control of the rentiers racket that has now infected property ownership at a near global scale.
> landlords otherwise have no incentive to let out a property in the first place.
Come on. I buy a house for 100k, and rent it out for a bit less than the mortgage repayments. In 10 years, I sell it for 200k. How is there no incentive to rent in that period?
Many very desirable localities are experiencing this in US, though people generally still can find lower costs with exceptionally longer commutes.
In Southern California the shortage in these desirable are is mostly driving by locals. In Santa Monica, I have observed a lot of development get killed by local activist groups who are mostly made up of not wealthy people on rent control. They have no upside that I can think of in the skyrocketing prices or rents. Though they are protected from the consequences by rent control. Yet they still very consistently vote against more housing, even if it's 20% mandatory affordable below market units...
The reasoning seems to be "if only all these gentrifiers stopped moving here and those who are here moved out!", but that's not gonna happen so long as jobs are blocked by impassible traffic.
So in Santa Monica, it's not the rich that are creating the problem. They are simply optimizing their lifestyle to have more free time by using resources at their disposal. If slightly more dense housing was built (Santa Monica averages about 1.5 floors from my observation), it could easily double the supply with only a modest gain in height. Utilities would have to be expanded, but that can be funded with the developments.
All true, and the problem exists in many geographies. However, I don't think a shortage of housing is caused by rentiers or super-rich, which is the topic of the article. More to do with government policies in most cases.
The rich will capitalize on that and will create endless waves of constructing and reconstructing 'social housing'. They will become super rich and will form a layer with vested interest in maintaining hundreds of thousands being poor. This is France.
All kinds of things. Large organisations (supermarket chains like Tesco) holding onto vast "land banks," new property being bought up and left vacant by foreign investors as fast as it can been build (a big problem in London and Cambridge), construction companies and their investors who want to restrict the supply to keep prices high, a lack of suitable places to build new housing (lack of infrastructure, protected countryside...). Everywhere I look I keep seeing new flats (apartments) being built where offices used to be but they are empty, so it's a bit of a mystery. Maybe these are of the wrong type or these are examples of the ones the foreign investors are buying?
Foreign "investments" in property are almost universally bad. I give you Vancouver, London, SF, and NYC as just a few examples. The very rich in other economies buy large amounts of "investment" property and do nothing other than drive up prices against - and out of step with - the local economy. This drives out the locals, and causes many actual residents to wonder how someone, even on a good salary, could afford a local property.
A lot of these foreign investments come from China. I don't know a solution - if I had buckets of money I'd love to have property abroad (although more for living, less as investment). I don't know what restricting local investments in property would do economically, but I know the current lack of restrictions cause terrible hurt to locals.
I always wonder at lack of reciprocal thinking in these kinds of views. People don't mind buying cheap stuff from foreign countries but think there's something wrong or bad when the people that received their money use that money to buy something in their country.
This is exactly part of the whole deal. It's inseparable. Why would they sell you something in the first place if they couldn't buy anything back?
The buying up and hoarding of land and property is just one symptom of broader wealth concentration into the hands of global elite. Like you said, its universally bad, but when you have so much wealth (on a macroeconomic scale) and nowhere to in the immediate term invest it to produce reliable returns, you instead towards hoarding scarce resources as a store of value - gold, land, and essential crops and anywhere else you can trade fiat / volatile stock into less risky properties.
China has gotten very rich in the last twenty years, but it has been nothing close to an equal rising tide of prosperity. There are now uber-rich competitive with the greatest dynasties of Euro-American enterprise that want to do something with all that wealth, and particular relative to the West they have a problem with their stock market being heavily state controlled and thus an undesirable place to safety hoard capital.
A containment vessel at Chernobyl would have been useless. The Chernobyl disaster was a combination of poor reactor design leading to dangerous reactor physics, poor safety systems, poorly-trained staff, and an dangerous and unnecessary "experiment" being performed on the reactor (i.e. operating it in a dangerous regime). No containment building could have been strong enough to contain the explosion. The RBMK is a particularly bad design of reactor.
We always hear about how they were running the reactor in a dangerous mode to run the experiment, but the nature of that experiment is rarely mentioned. The experiment itself is the craziest part!
The experiment was a test of a new cooling system feature. The RBMK's suicidally stupid design had a positive void coefficient of reactivity[1]. Coolant voids increased reactor activity. The operators new this; they had backup diesel pumps that would take over from the electric pumps if power wasn't available. They also knew that it would take some time[2] for the backup pumps to reach full speed, which was not fast enough.
So someone had the "clever" idea to modify the electric pumps so they would continue to spin freely when they lost power, so their remaining kinetic energy could continue pumping coolant at a rapidly falling rate. The hope was that there would be sufficient kinetic energy to keep the reactors from voiding. The experiment was basically a bad hack to work around several serious design problems.
The experiment shouldn't have existed. Everything about the coolant situation should have been a reason to decommission the reactor. The experiment itself is evidence that someone knew about the positive void coefficient problem, or they wouldn't have tried such a crazy workaround. Yes, a lot of the staff was poorly trained, but someone knowledgeable about reactors decided they couldn't afford even a few seconds[2] without coolant.
"I like work; it fascinates me. I can sit and look at it for hours." -- Jerome K. Jerome. Especially when it's the high priests of the C++ orthodoxy reinventing the wheel 30 years late.
Back in the 90s (IIRC) someone wrote a kernel module for linux that provided the equivalent of a GUI "trash can/recycling bin" but at the filesystem level, where a specific directory (folder for you young 'uns) was set aside for the deleted files. Because it was a kernel module (filesystem driver) it was transparent to applications, including the shell.
I believe that's less an everyday-use "trashcan" and more of an ext* feature for recovering from filesystem corruption; "Something broke and I think I've recovered all the files, but I've forgotten where some of them were supposed to go".
I don't mind the visual style, but the author seems to have forgotten that some people use actual mice instead of inertial-scrolling trackpads.... using a scroll wheel goes nowhere fast on this kind of page.