how many stacks does the kernel maintain/keep track of...say if there are 12 kernel threads and around 50 user processes??

Each process, user thread, and kernel thread should have its own stack. The kernel will switch between them as necessary and context changes require.

Each process, user thread, and kernel thread should have its own stack. The kernel will switch between them as necessary and context changes require.

yup i knew bout this...but i had my doubts bout the processes... whether the kernel maintains...individual stacks from the kernel's perspective...

yup i knew bout this...but i had my doubts bout the processes... whether the kernel maintains...individual stacks from the kernel's perspective...

From what I read, this is the case, that the kernel maintains these structures.