@Mikhail HPC tends toward the other direction: single job spread across multiple nodes. Given how little of the OS most use, you could almost get away without an OS at all, and just use the UEFI stack for network and FS access...
@Mikhail They don't mix well at all. When you fork, only the thread that called fork gets duplicated in the child. The other threads just cease to exist in the child. If any of them has (for example) a mutex locked, life can get difficult very quickly. Basically, to make it work at all, you have to fully synchronize all your threads before you call fork, then re-start any you still need afterwards.
Trying to duplicate the threads would probably be even worse though--they did what they could, but it's definitely choosing the least of the available evils, not something that really works well (at all).
Personally, I've found a lot of use in fork() or similar when needing to isolate bullshit code written by other people that happens to do things like divided integers by zero. Or set COM into "single threaded apartment mode "
One of these devices will blue screen if the debugger has paused a user land thread responsible for offloading data from the device, its almost a security feature!
Speaking of which, my desktop is making weird noise when starting occasionally, I turn it off straight away and nothing is wrong when I start the PC on again.
It's an old machine, no medicine can prolong human's life beyond 200, no single hardware upgrade can make a machine to serve beyond 20 years (unless owner too lazy or cheap to upgrade).
The thing is that, I don't play games on this PC and I don't have very big project to compile and build on this machine, so it totally handles all my needs. I don't feel the compulsion to upgrade it.
And I don't run time critical applications on it ...
@Mikhail basically linux doesn't really differentiate between threads and processes. This leads to a lot of strange behaviors that the kernel sort of plasters over badly. But in effect threads on Linux are processes that share the same address space instead of tasks within the same process.
TL;DR; there really isn't a difference between fork and a thread in linux... it's just a major problem all around
@Mikhail you can create multiple apartments, you just create a new thread and reinit COM in free threaded mode. Worse is if they call COM APIs without initializing an apartment at all in which case they get the dreaded 'main' apartment threading.
I think the underlying problem was that I needed to have a multi-threaded apartment for Qt, but a single threaded apartment for some "legacy" sdk. Ideally, these two would shared the same thread. I don't remember if I was allowed to have both the same process.
Oh, fuck now I remember. Basically, the legacy sdk would call CoInitialize when the dll attached, which happened before Qt (actually before main). Qt also calls CoInitialize (for things like drag and drop). So both would end up on the main thread.
With the exception of WoW64 IPC (which is black magic witchcraft), I don't see how its better than conventional IPC. The apartment stuff, certainly makes it more confusing. Fells like IPC +special rules + stuff that chokes IntelliSense.
@Mgetz Back before antibiotics, they used mercury pills to cure STDs. It worked too. I suppose it was a slower way to die, but I hope you'll forgive me if I prefer not to ingest mercury.
@JerryCoffin Actually it didn't work, basically by the time you start getting the kind of lesions it was used to treat, it would have spread internally.
> Me and my friend both chose [the same character] at the exact same time on startup screen. […] All of our actions were shared and events were duplicated
@Mikhail Well, it wasn't very effective, and overdoses that led to dead or insane patients were common--but at least from what I've read, it did almost certainly extend life at least a little bit a fair amount of the time.
@JerryCoffin So, true antibiotics are like little machines that will only cut bacteria cells, in contrast to sulfur which kinda, reacts with everything. From what I recall, the sulfer treatment was a powder that could sterilize wounds. Soap would have also worked, also sulfer was used in soap...
@Mikhail Where did sulfur come into the conversation? We were talking about mercury. I did mention sulfa drugs, but they're also antibiotics (though they fell into near disuse after penicillin became known).
There were also some other treatments that were apparently somewhat effective--some using arsenic compounds, and another that's so insane it can't be made up. There is a reason our body reacts to infections with a fever: it honestly can kill off some diseases. In the case of syphilis, you can reduce its effects with a high enough fever--so you infect the patient with malaria, let them develop a high fever, then treat the malaria with quinine.
Of course, you lost a few to malaria, but on balance it apparently did actually benefit patients (somewhat) more often than not.
Ah, here we go: around 1909 or so, Paul Erlich and his assistant Sahachiro Hata successfully treated Syphilis with dioxy-diamino-arsenobenzol-dihydrochloride (i.e., an arsenic compound).
I'd be curious if you could identify the mechanism of action, its probably not a real antibiotic in the sense it targets some bacteria only mechanism, although for some reason it killed a lot of bacteria...
@Mikhail That one isn't really an antibiotic, but a form of chemotherapy. Erlich had previously invented tissue staining techniques. In the process, he noted that some stains were "attracted" more to some types of cells than others. This was an outgrowth of that: a "stain" that happened to be toxic, that was substantially more "attracted" to the syphilis bacteria (or maybe to cells infected with it) than to normal cells.
I don't know--and I kind of doubt that he really did either.
Given its age, and how long it's been since it was actively used, it's possible that nobody's studied it recently enough to know for sure (though to be honest, I doubt that--I'd guess most successful forms of chemotherapy have been studied pretty closely since).
@Mikhail Which didn't: mercury, sulfa drugs, or what? Sulfa drugs were actual antibiotics (though less effective than penicillin as a rule). Mercury was administered as a pill, and also (truly fearsome) by boiling mercury in a steam room, and having the patient breathe the result. It was also applied as a salve, but most use was apparently internal.
Even when it was a salve, it was apparently (mostly) before going in a steam room (or dry sauna) so you were breathing mercury fumes, not just applying it to the skin.
On that we'll have to disagree, I've seen C-apis that are far worse and far harder to use. Moreover would require custom wrapping to expose to any sort of scripting or .net
here is my code of thread programing. I am initializing the two thread like first thread t1 is initialized using the non member function of class person and 2nd thread t2 is initialized using a member function of person class.
Now my doubt is why output is different at each time.
class person {...
@ratchetfreak yes they did. Even though I violated at least 2 or 3 requirements (among many) for getting the bounty, they still spoke as if it was still on the table.
Specifically, the bounty requires: - The report to be encrypted with PGP. I didn't encrypt shit when I submitted to them. - Step-by-step repro details for the exploit. My attack is theoretical only, I have no PoC.
Where to complain if my question downvoted? I thought I asked decent question, however in my oppinion nobody bother to read it carefully. They start to call my question vague, too broad. They start giving answers, which is not fit to my purpose and it can be seen during thorough (but not difficul...
Current hypothesis: The sweet spot for transactions will be Intel-style TSX with speculative execution of atomic blocks and lone atomic instructions, making them free in the no-contention case. All else will be a software problem. https://twitter.com/timsweeneyepic/status/996269325378973696
"And Native Shall Rise Again!" (in a Southern Accent)
Also how the fuck do I take an integral over a random function. Typical integration involves adapting the integral step size adaptively, but if your function is random the deeper you look you'd get different values. Aka random([-1:0.1:1]) is different then random([-1:0.05:1])