Skip navigation
Diff b/w Thread and Process. Commonly asked interview question💯
0:00

Diff b/w Thread and Process. Commonly asked interview question💯

#operatingsystem #systemdesign #interview

Diff b/w Thread and Process. Commonly asked interview question💯 A process is an independent program with its own memory space. A thread is a lightweight unit inside a process that shares the process’s memory. 🌐 Why Modern Browsers Use Separate Processes for Each Tab? 1⃣ Crash Isolation (Most Important) If one tab crashes due to Bad JavaScript,Memory leak,Malicious code etc then 👉 Only that tab crashes 👉 Other tabs continue running If they used threads: ●One crash could crash the entire browser process ❌ 🔐 2⃣ Security (Sandboxing) Each tab runs in an isolated process. That means: One website cannot access memory of another website 🔘Prevents data stealing between tabs 🔘Limits damage of malicious site 🔘This is called process isolation + sandboxing 💾 3⃣ Memory Protection In OS: ●Processes have separate memory space 🔘Threads share same memory So using processes: 👉 Strong boundary between tabs 🔄 4️⃣Better Resource Management Browser can: ●Kill heavy tab 🔘Suspend background tab 🔘Set memory limit per tab And it is Much easier with processes. Follow for more such videos🤝 #operatingsystem #systemdesign #interview #tech #career [Operating System, Process, Thread, Security, Google Chrome, System design, Software engineer, interview prep]

Comments

Comments from the original post on Instagram

No comments yet