comp229-exercises-solution-6 - System software Review...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
System software Lesson 6 – Process management comp229 Department of computer science Page 1 of 4 Fall 2003 Review exercises 6.1 Is it possible for a single process to execute more than one executable program (i) at the same time or (ii) at different times in Unix. Analyze the fork(…) and execve(…) system calls. (i) A Unix process can’t execute more than one executable program at a time. The problem is that the process maintains state information and is allocated resources only for one program. Therefore by allowing a process to execute more than one executable program at a time would contradict the rationale of a process, which is to protect the environment of an executing program. (ii) An executable program is loaded in the address space of a process by calling the execve(…) system call, after creating a new process with the fork(…) system call. However, the execve(…) system call never returns and therefore it is not possible to make subsequent calls to load another executable program. 6.2 Consider the following Unix process state diagram. (i) Explain when a process is exerted control to be suspended, activated, or resumed. (ii) Can any process exert a control on another process? Explain. (i) A process is controlled when it is in the “Ready to Run, swapped” and “Sleep, Swapped” states. In these states the process is suspended and not in memory, and therefore it must be activated again by the controlling process in order to be inserted in memory again. (ii) The swapper system process is the only one in Unix that can suspend and resume the
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 4

comp229-exercises-solution-6 - System software Review...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online