3,517 karma · joined Jul 23, 2021 (5y ago) · 2,823 submissions
comment 3y ago · link · parent
In the kernel of course you could just reuse your wait queue structure for that, which is exactly what bit mutexes do in Linux, but that's an implementation detail to my point.
comment 3y ago · link · parent
Knowing full well the scale of China's pollution (not just carbon), emvironmental destruction, human rights abuses, labor exploitation, militarization and annexation of regions like Tibet and Inner Mongolia, further expansionist aims in the South China Sea and Taiwan, intellectual property theft and currency manipulation, attacks on activists in western countries, and general brutal totalitarian government.
And it's the same story in the Middle East, Africa, Latin America, etc. Worse in many cases because of the wars and interventions from western countries.
This is why people are sick of globalism and sick of hypocritical corrupt western governments and their preaching and lies.
Globalism has just become synonymous with the ruling class shirking responsibility and making themselves unanswerable to the people. High time for a change I think.
comment 3y ago · link · parent
But even byte/word spin locks that could avoid the atomic unlock, and even in modern systems where atomic operations are quite cheap relative to cache miss, still have two major problems, the "thundering herd" effect, and unfairness/starvation.
The basic spin lock is just a bit or byte or word in memory where waiters just keep reading the lock value until it becomes unlocked, and then they attempt to lock it. If that fails, continue waiting.
The thundering herd problem is at the cache coherency level. If you have a bunch of CPUs waiting on the lock then when the lock is released at the cache coherency level they all have that line invalidated, and then they will each request the line again, see the new (unlocked) value, and they will all try to take the lock, and each of those lock operations is an exclusive access to the line which also invalidates all others, and in the end only one succeeds, so all the others were wasted and go back to waiting, pulling the line back into shared state. So N CPUs taking a contended spin lock can become an O(N^2) operation all up. Coherency protocols might be smart enough to mitigate this somewhat so it may not be not quite so bad, but it's always going to be costly and those hardware heuristics could break down in extreme cases. So the effective critical section including the lock overhead can grow quickly as you increase CPU count, which can cause scalability to not just hit a wall but go off a cliff and get worse as you get more CPUs contending for the lock. Which is obviously bad, but the negative feedback spiral is particularly bad (workload slows down -> more CPUs recruited to handle workload -> workload gets slower) and means you can get stuck in a degraded state beyond the overload condition.
The fairness problem is difficult as well. A cache coherency protocol itself can be fair and anti-starvation, in that a CPU will get access to a line in a relatively equal and timely manner, and that could be mathematically proven and verified in the hardware. But when you start building on top of that, those properties don't automatically translate to the higher level primitive. In the above situation where it's a free-for-all on the lock word, any one waiter may get access to the line fairly and never be starved at the hardware level, but each time it performs the atomic operation to acquire the lock it might find that it has been taken by another CPU -- the hardware doesn't know what the lock is or that the value 0x1234 means it's free. So to truly have fair and non-starving locks, you need to build them with those guarantees in software, and only rely on the hardware for atomic operations.
The ticket locks that parent poster refers to are one such solution for fairness as they're FIFO. They were brought in to Linux due to unfairness/starvation problems. They are since superseded by "queued" spinlocks which are also FIFO but instead of spinning on the lock word each CPU spins on its own area, so unlock becomes closer to a 1:1 operation at the coherency level rather than 1:N (using the "MCS" algorithm) which tackles the former thundering herd problem.
comment 3y ago · link · parent
comment 3y ago · link · parent
comment 3y ago · link · parent
comment 3y ago · link · parent
Sure, some shadowy entity (probably connected to Putin and also secret Nazis) are waging hybrid warfare on New Zealand because Jacinta is so progressive and young and a woman, and that's why she needs the ability to take down any facebook content (critical of her authoritarianism?), also something something covid and mass shootings. Just screams hysterical ultra left wing fear mongering conspiracy theory.
comment 3y ago · link · parent
> Maybe twitter's policies were bad, and applied inconsistently. But there is no clear evidence that they explicitly favored one party, and to be honest- I don't really care if they do. If Elon thinks this is some sort of big shock that will cause people to get excited.... I can't really see why.
Authoritarians love the idea of corporations subservient to government being used as a tool of the state to crack down on human rights. Lots of people don't see a problem with it.
comment 4y ago · link · parent
comment 4y ago · link · parent
If you want to assign blame sure an American might be 10 time more responsible than a Pakistani, a Chinese may be twice as culpable is a French. That doesn't really solve anything though. The problem isn't the amount of CO2 in the air divided by the number of living humans.
Emissions intensity of production IMO is a better one because it promotes efficient industry without exerting the wrong incentives on population or quality of life.
comment 4y ago · link · parent
Whenever anybody says "<something you want to hear>, I can't show you but trust me," the reaction shouldn't be to marvel at their honesty, it should be to smell bullshit and ask yourself what their angle is. I mean even when they're not a known conman and liar who just fleeced people out of billions of dollars. I feel this should go without saying but there are an incredible amount of people still lining up to believe this clown for some reason.
comment 4y ago · link · parent
Obviously you're not going to come out and say you're doing this as a PR strategy developed with your legal team, you're going to act like it's a personal risk to yourself to tell your story, which I suppose lends it some credibility in the eyes of some people. Like some of the people in this thread.
The man's a con artist. I'm astounded that people still believe anything he says. I suppose I shouldn't be, he must be a very good con man because he managed to steal billions of dollars.
comment 4y ago · link · parent
One of the ones where I don't have to pry into peoples' personal life because I have no legal requirement or desire to discriminate against "undesirables". Which is just about all of them. Now you still haven't told me about about you.
> You can’t reduce your liability simply because a dollar exchanges hands.
I assure you that people can buy and sell things, including goods, including waste, including liabilities for all sorts of things all the time.
> Those other disposal sites you speak of are authorized and regulated.
Is your allegation that this Chilean company that was paid to take care of this waste not "authorized or regulated"?
comment 4y ago · link · parent
Unless there are specific laws about it, then not particularly more or less than any other transaction with anybody else. That is to say, probable some diligence, but at some point you can certainly pay others to take your waste. This isn't even remotely unusual. I've paid battery places to dispose of old lead acid batteries, tire shops to dispose of my old tires, a landfill to dispose of lots of stuff from motor oil to broken appliances.
> Can I just pay the homeless guy on the street $1MM to my waste? What if he sets up an LLC?
Why would being homeless bar him from conducting private business like anybody else? What sort of authoritarian communist hellhole do you live in?
Where I live, sure you could do that. And if he didn't dispose of it properly, government regulators would come after him and get that money back. That's how these things work. If they didn't do that, then unscrupulous corporations sure aren't going to pay a middle-man money to not do something that they can not do for free.
How much are you on the hook for slavery, corruption, environmental destruction, and war crimes when you purchased your iPhone, filled your gas tank, bought a pair of sneakers, or ate something containing palm oil? How many years in the slammer and how large a fine can I put you down for?
comment 4y ago · link · parent
comment 4y ago · link · parent
Turns out there are a small number of actual anti-authoritarians who have always been consistent. And then there are countless hangers-on who proclaim to be an anti-authoritarian resistance when it suits them. It's funny, the fact people co-opt it shows that they see it as a noble and worthy ideology, yet it's still one they're happy to discard the minute some talking head put on TV by a corporation tells them to be outraged.