WHAT: one big privileged executable (plus loadable modules in modern versions).
HOW services talk: direct function call — no boundary crossing.
Examples: Linux, classic UNIX, BSD.
Downside: a single buggy driver runs in kernel mode → it can corrupt anything → whole system crash. Huge trusted code base.
Imagine a school. The principal can do anything — open the safe, sign anything (that's kernel mode). The students must ask permission for special stuff (that's user mode).
Monolithic = the principal personally does everything — teaching, cooking, fixing pipes. Super fast (no asking around), but if the principal slips on a banana peel, the whole school shuts down.
Microkernel = the principal only keeps the keys and the schedule; cooking, teaching, plumbing are done by separate staff who must send notes back and forth. If the cook quits, school continues — but all that note-passing is slow.
Hybrid = mostly separate staff, but the principal personally handles the really urgent jobs to save time.
Dekho, "OS structure" ka matlab sirf ek hi sawaal hai: kaunsa kaam kernel mode mein chalega aur kaunsa user mode mein. Kernel mode matlab full power — hardware ko directly chhoo sakta hai, lekin yahan ek bug poori machine crash kar de. User mode restricted hota hai, kuch bhi special karna ho to system call ke through kernel se permission maangni padti hai (ye boundary cross karna costly hota hai).
Monolithic (jaise Linux) — saara saamaan, scheduler, memory manager, file system, drivers, sab ek hi badi kernel blob mein. Aapas mein simple function call se baat karte hain, isliye bahut fast. Lekin ek driver kharaab hua to pura system gaya — reliability kam.
Microkernel (jaise MINIX 3, QNX) — kernel mein sirf bare minimum: IPC, scheduling, basic memory. File system aur drivers sab user mode mein alag server processes ban jaate hain. Agar file system server crash ho jaaye, kernel zinda rehta hai aur usko restart kar deta hai — bahut reliable. Problem ye ki har request ke liye baar baar boundary cross karke message bhejna padta hai (IPC), isliye slow.
Hybrid (Windows NT, macOS) — bich ka raasta. Design microkernel jaisa modular, lekin jo services speed ke liye critical hain (file system, graphics) unhe wapas kernel mode mein daal diya taaki IPC ka overhead bach jaaye. Yaad rakhne ka formula: cost C≈n⋅s, jahan n = kitni baar boundary cross hui. Monolithic mein n chhota, microkernel mein bada — bas yahi poori speed ki kahani hai. Speed: Mono > Hybrid > Micro; reliability ulta.