Enumerate the advantages and disadvantages of supporting multi-threaded applications
with kernel-level threads
Answer:
The advantages of kernel-level threads include: Ability to pre-emptively schedule threads as user level scheduling generally only supports the (potentially buggy) co-operative scheduling – with the added benefit of not requiring yields everywhere; Each thread is guaranteed a fair amount of execution time
Disadvantages of kernel-level threads include: No benefit to applications whose functions stay staunchly in user land; a significantly smaller address space; a significantly smaller and possibly close to full stack; code is less portable as OS support is required; thread management is expensive as it requires syscalls