Microsoft Interview Question
Software Engineer / DevelopersTeam: Global Foundation Services
Country: United States
Interview Type: Phone Interview
1)thread is part of process, . all the threads in a process contains same address space. As well as data segment,heap and stack segment as well . To processes communicate with each other using IPC such as shared memory, message queue,mail box,pipes,unnamed pipes and sockets,spinlocks,message passing. Where as threads shared same address space for the synchronisation purpose. Mutex and seamphores ,condition variables are used. Conetxt switch for process is little overhead to the operating system for threads it is having less overhead.
2) Deadlocks: consider two exampkes. when process p1 holds resource r1 and wants r2 where as process p2 holds resource r2 and wants r1 so both process are waiting for resouses this situation is called as deadlocks.
3)when when two or multiple processes updating the shared resource and result is dependon who runs presiesly this situation is called as race condition.
1)thread is part of process, . all the threads in a process contains same address space. As well as data segment,heap and stack segment as well . To processes communicate with each other using IPC such as shared memory, message queue,mail box,pipes,unnamed pipes and sockets,spinlocks,message passing. Where as threads shared same address space for the synchronisation purpose. Mutex and seamphores ,condition variables are used. Conetxt switch for process is little overhead to the operating system for threads it is having less overhead.
2) Deadlocks: consider two exampkes. when process p1 holds resource r1 and wants r2 where as process p2 holds resource r2 and wants r1 so both process are waiting for resouses this situation is called as deadlocks.
3)when when two or multiple processes updating the shared resource and result is dependon who runs presiesly this situation is called as race condition.
1)thread is part of process, . all the threads in a process contains same address space. As well as data segment,heap and stack segment as well . To processes communicate with each other using IPC such as shared memory, message queue,mail box,pipes,unnamed pipes and sockets,spinlocks,message passing. Where as threads shared same address space for the synchronisation purpose. Mutex and seamphores ,condition variables are used. Conetxt switch for process is little overhead to the operating system for threads it is having less overhead.
- Nikhil January 31, 20122) Deadlocks: consider two exampkes. when process p1 holds resource r1 and wants r2 where as process p2 holds resource r2 and wants r1 so both process are waiting for resouses this situation is called as deadlocks.
3)when when two or multiple processes updating the shared resource and result is dependon who runs presiesly this situation is called as race condition.