week 11 - unix Flashcards

(6 cards)

1
Q

what does fork do

A

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 …)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

JUST READ VERY IMPORTANT
CRUCIAL FOR UNDERSTANDING

TO POSE QUESTION ASK ABOUT FAULT ISOLATION AND PRIVILLEGE ABOUT MONOLOTHIC KERNEL

A

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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

microkernel

A

🧠 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:

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

advantages of microkernel

A

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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

disadvantages of microkernel

A

since all uneeded stuff in kernel moved to processes

leads to ipc overhead

“IPC overhead” = performance hit due to context switches and message-passing

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q
A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly