week 11 - unix Flashcards
(6 cards)
what does fork do
okay so fork just
- duplicates a process ( now 2 processes one parent one child)
- child return value is just 0
- parent return value is the childs process id ( tells us im the parent and my child has id …)
JUST READ VERY IMPORTANT
CRUCIAL FOR UNDERSTANDING
TO POSE QUESTION ASK ABOUT FAULT ISOLATION AND PRIVILLEGE ABOUT MONOLOTHIC KERNEL
so essentially what we are saying know is the kernel is a monolith of os code
this is bad for the following reasons:
Fault isolation if one part of kernel has faults whole os can crash
device drivers are leading cause of bugs in kernel ( as they know the ins and out of hardware)
would be good if we could isolate device drivers
privellege:
the kernel has maximum privillege -> may be parts of kernel that are succeptible to security exploits
if attacker finds bug in kernel component , they could escalate privillege and take over the system
microkernel
🧠 What stays in the microkernel:
Interrupt handling
Scheduling
Basic inter-process communication (IPC)
Everything else — like:
File systems
Device drivers
Network stacks
Other OS services
…is moved out into user-space processes, like:
advantages of microkernel
Fault isolation:
since all uneeded stuff in kernel moved to processes
if theres no a bug in device driver (process) only one process will crash and wont affect other processes AND WONT CRASH THE OS
Least privillage:
only microkernel has full privellege
rest of the components are now given least privillege (alligns with least privillege principle)
harder to escalate privillege and take over entire system now
ie security exploit in driver no longer gives access to whole system
disadvantages of microkernel
since all uneeded stuff in kernel moved to processes
leads to ipc overhead
“IPC overhead” = performance hit due to context switches and message-passing