ch
Feedback
JusticeTech System

JusticeTech System

前往频道在 Telegram

Learn to learn before you teach

显示更多
未指定国家未指定类别
227
订阅者
无数据24 小时
-17 天
+230 天
帖子存档
🍄 If you are a Telegram Premium subscriber, boost our channel. 🚨 Tap here: https://t.me/boost/justicetechsystem 🏡 It's free to tap.

You think you are good How do you build an Ai detector project using Ai?

Feel like building something What should i build?

Who can state the difference between Polling, Web Socket and SSE?

There's also a way to get rid of the invisible claude watermark

I heard Claude now leave watermark on generate codes

Also state out any topic you'd want me to teach, if it falls within my ability I'd teach it to the best of my knowledge

I will peg it here..... If you have any question then drop it

Here's the mental model I want you to keep: A race condition is basically a fight over information. The computer doesn't necessarily care about your intention. It executes instructions according to timing and scheduling.

Lastly.....

If someone asks you henceforth "What is a race condition?" A strong beginner answer is: A race condition is a programming problem that occurs when multiple processes, threads, or requests access a shared resource at the same time, and the final result depends on the order or timing of those operations. And always remember the formula: Multiple actors + Shared resource + Simultaneous access + Poor synchronization = Race condition

Where Do Race Conditions Happen? They're especially common when dealing with: Threads: Multiple threads can execute at overlapping times. Processes: Multiple processes can access shared resources. Databases: Multiple users can modify the same records. Servers: Thousands of users can send requests simultaneously. Distributed systems: Different computers can perform operations at the same time. Files: Two programs may attempt to modify the same file. Shared memory: Multiple workers can read/write the same memory.

That was what I was explaining herehttps://t.me/justicetechsystem/2163 Go through all the mechanisms and you'd understand better

Programmatically can do something like this below For example, conceptually: lock.acquire() balance = balance - 7000 lock.release() The lock basically says "I'm using this shared resource. Everyone else, wait."

The basic idea is: Don't allow two operations to modify the shared resource at the dangerous moment. But how?

Now How Do Programmers Prevent This?

This can actually happen in different places like online stores, ticket booking etc So it is never something you can just ignore

This of this way Ahmed and Daniel are editing the same notebook. The notebook says: Score = 10 but Ahamed changes it to "Score = 20" Meanwhile Daniel had already copied the old value which is "Score = 10" Then Daniel writes: Score = 15 Which now made Ahmed update effectively disappeared.

Lost Update is a common form of race condition where a program A changes the value but Program B later writes its own version of the value, effectively overwriting A's change.

Last point Lost Update in race condition