CS604 Assignment solution
Assignment no 1
Question
1: (5 Marks)
|
Identify and explain which of the
following state is being shared between parent and the child process when a
process creates a new process using the fork() operation
- Heap
- Shared Memory segment
- Stack
Ans:- Only the shared memory segments are shared between the parent process and the newly forked child process. Copies of the stack and the heap are made for the newly created process.
Question
2: (5 Marks)
|
Consider UltraSPARC processor that has multiple register
sets, if a new context is already loaded into one of the register then
describe the action to be needed by context switch. Also describe that what
will happen if new context is loaded into the memory rather than in register
set and all registers are in use?
Ans: -The CPU current-register-set pointer is changed to point to the set containing the new context, which takes very little time. If the context is in memory, one of the contexts in a register set must be chosen and be moved to memory, and the new context must be loaded from memory into the set. This process takes a little more time than on systems with one set of registers, depending on how a replacement victim is selected.
|
0 comments:
Post a Comment