Programming for Critical Applications

Before I was a junior in college I spoke with another programmer about race conditions. Generally the code written to handle it is like one (and only one) of these:

- You are using correct functions to delay your program

- You wrote in sleep(1000) somewhere and expect it to always wait long enough to eliminate the race condition by moving the execution times of each critical section further apart. Nevermind how inconvenient it might be to delay a program by 1000 ms, sometimes it takes longer and sometimes it takes shorter to complete.


Well, obviously the second one doesn't, and shouldn't, always work but doing testing won't reveal that. If you did your research and are relying on what documentation (and the books) say about scheduling mechanisms you are much closer to being at the first one. If so, I don't think you should be afraid.


UPDATE 11/28/2020

hey look at this funny picture i found

its a complete and utter piece of shit for a person



Comments

Popular Posts