Professional Documents
Culture Documents
Tutorial (Chapter 4)
Tutorial (Chapter 4)
Question: List out the difference between Message passing and Shared memory
2. Draw the process state diagram depicting the FIVE states that a process can be in
- New: The process is being created
- Running: Instruction are being executed
- Waiting: The process is waiting for some event to occur
- Ready: The process is waiting to be assigned to a CPU
- Terminated: The process has finished its execution
8. Specify the events for which the new processes are created in a computer
a. System Initialization
i. When an operating system is booted, typically several processes are created
1. Foreground process that interact with users and perform work for them
2. Background processes, which are not associated with particular users,
but instead have some specific function
a. Processes that stay in the background to handle some activity
such as email, Web pages, security (antivirus), printing and so
on are called daemons. Large systems commonly have dozens
of them.
b. Execution of a process creation system call by a running process
i. Often a running process will issue system calls to create one or more new
processes to help it do its job
ii. For example, if a large amount of data is being fetched over a network for
subsequent processing, it may be convenient to create
1. One process to fetch the data and put them in a shared buffer while
2. A second process removes the data items and processes them
c. A user request to create a new process
i. In interactive systems, users can start a program by typing a command or
(double) clicking an icon. Taking either of these actions starts a new process and
runs the selected program in it
d. Initiation of a batch job
i. Processes are created in the batch systems found on large mainframes
ii. Here users can submit batch jobs to the system (possibly remotely)
iii. When the operating system decides that it has the resources to run another job,
it creates a new process and runs the newx job from the input queue in it