Question 4
Which of the following correctly describes the sequence of steps when a new process is forked in xv6?
(i) Allocate a new proc structure. (ii) Copy the parent’s memory space to the child. (iii) Set up the trapframe for the child process. (iv) Add the child to the ready queue.
(i) → (iii) → (ii) → (iv)
(ii) → (i) → (iii) → (iv)
(i) → (ii) → (iii) → (iv)
(iii) → (i) → (ii) → (iv)