1/11
Looks like no tags are added yet.
Name | Mastery | Learn | Test | Matching | Spaced | Call with Kai |
|---|
No analytics yet
Send a link to your students to track their progress
What are the 4 necessary conditions for Deadlock?
Mutual Exclusion (one user at a time).
Hold and Wait (holding one, waiting for another).
No Preemption (cannot forcibly take resources).
Circular Wait (a loop of processes waiting for each other).
What is a Race Condition?
A situation where multiple threads/processes access shared data concurrently, and the final result depends on the timing/order of execution.
How do Semaphores work (wait and signal)?
wait() (P): Decrements the semaphore; if value < 0, the process blocks.
signal() (V): Increments the semaphore; if others are waiting, one is woken up.
What is the difference between a Hard Link and a Soft (Symbolic) Link?
Hard Link: A direct pointer to the file's inode. If the original filename is deleted, the data remains accessible via the hard link.
Soft Link: A pointer to the path of the file. If the original file is deleted, the soft link becomes "dangling" or broken.
If you run ln file1 file2 and then rm file1, can you still read the data from file2?
Yes. ln creates a hard link; the data is only deleted when the last link to the inode is removed.
State Amdahl’s Law.

What does test_and_set do?
Atomically sets a lock and returns its old value.
What problem does compare_and_swap solve?
Prevents race conditions when updating shared variables.
What is SRTF scheduling?
Preemptive version of Shortest Job First.
Can race conditions occur on a single-core CPU?
Yes — due to context switching.
What is the purpose of semaphores in producer–consumer?
Ensure mutual exclusion and track buffer availability.
What does chmod 655 mean?
Owner: rw-, Group: r-x, Others: r-x.