Posts

Showing posts from February, 2010

Linux questions ....!!!!

1) why Linux scheduler is called O(1) 2) how non contiguous memory is allocated by Linux 3) how to write/add system calls to Linux 4) explain difference b/w fork() and clone() 5) explain DMA

cases of context switch

system calls and library functions differs in terms of invoking. in Unix based operating system, system calls generate the exception(trap), and invoking system calls will lead to context switch, in case the current process running is not most eligible process to run. where as in case of library function no context switch will be made so executing library function is faster than the system calls. what are all the reasons for context switch of the process following are the cases when context switch can occur 1. if process wants go for sleep 2. process do exit 3. while returning from the system call and it is not most eligible process to run 4. when it returns from the interrupt and it is not most eligible process to continue