Why isn't there a system call to tell the kernel that a certain piece of code is uninterruptible? this would eliminate race conditions once and for all
It doesn't works like that, son
>>107693305No, it wouldn't. Cpus can run multiple operations at the same time. Ever heard of cpu cores?
>>107693305Place a sock upon your cock.
>>107693356why not? I know my idea sounds stupid, and there's probably a reason for it and I would like to know it>>107693389I was thinking that "uninterruptible" would also forbid more than one core from accessing the relevant code covered by that system call
It would freeze the entire system until done. The entire system.
>>107693305https://en.wikipedia.org/wiki/Halting_problem
>>107693305go contribute to locking if you want to eliminate race conditions?
>>107693499sounds like windows 11 on my work laptop
>>107693705Sounds like you laptop is shit, get a better job>>107693305That's why you don't drop from school,.at least should post this on >>>/g/sqt
>>107693305The race condition problem is caused by you forgetting to use semaphores or locks or other similar mechanisms.If you make a system call like this, you will forget to use it as well.
>>107693305>this would eliminate race conditions once and for allIt wouldn't though. You may or may not have noticed, but they aren't called "being interrupted conditions", they're being called "race conditions" instead, and there's a very good reason for that. "Being interrupted" isn't even in the top 10 causes of race conditions.
>>107693720sure, the laptop is the problem, not the pajeetware 11
>>107693764Works on my current and previous machine, new one has Core Ultra 7 H155, 32gb ram, 2tb nve, never had a single issue so far
>>107693305futex
>>107693446You can't lock memory to cores like that. A thread can jump between cores. Thread scheduling isn't just hurr durr use this core.
>>107693932my laptop also has ultra 7 (cant remember exact model), 64gb ram and 2tb nve but pajeetware 11 is slow and buggy
>>107694014Might be a layer 8 problem
>>107693305you should use a real time OS if you absolutely need these safety guaranteesany lesser use case is just a skill issue and you shouldve taken parallel computing in undergrad
>>107693305I think you could fix race conditions by banning niggers.