35 Advanced Operating Systems Kernels and kernel services
36 Role of the Kernel Provides all the major OS services –Can be micro-kernel –Deals with message passing Linux is a monolithic kernel –However it allows loadable modules
37 Process and Kernel views
38 Processes and Threads Linux supports threads within the 2.0 kernel 2 levels – user and kernel threads –User threads can’t be recognised by kernel –Can end up blocking on one thread Kernel threads –Uses clone system call
39 Process & Threads Process –Has own environment –Has own resources –Heavy cost in scheduling –Semaphore dealt with by kernel –Linux use vfork copy- on-write Thread –Shares environment –Shares resources –Has own PC –Quick context changes –Requires semaphores top protect critical regions