You are on page 1of 3

CSC520

PRINCIPLES OF OPERATING SYSTEMS

TUTORIAL #3

1. Define the term ‘process’ in the Operating Systems (OS) context.

A sequential program in execution

2. Program is a(n) passive entity (stored on a disk), whereas

process is a(n) running entity (running).

3. Program becomes process when executable file loaded into memory.

4. List the five (5) states of a process.

I. New : the process is being created


II. Running : instructions are being executed
III. Waiting : the process is waiting for some event to occur
IV. Ready : the process is waiting to be assigned to a processor
V. Terminated : the process has finish execution

5. Draw the process state diagram.

new terminated
admitted exit

interrupt

ready running

I/O or event Scheduler dispatch


completion I/O or event wait
waiting
6. Task control block consists all information associated with each process.

7. The term used when referring to the CPU changing its execution from one process to
another is context switching.

8. When there are several processes running together concurrently, it can be considered
as multitasking or multiprogramming.

9. Process is identified and managed via a process identifier(pid).

10. Process is also known as task or job.

11. Describe the differences between short-term and long-term scheduling.

Short term scheduling is invoked frequently in milliseconds so it must be fast while long
term scheduling in invoked infrequently in seconds and minutes so it must be slow

12. Describe the differences between I/O-bound process and CPU-bound process.

I/O bound process spend time more doing I/O than computations while CPU-bound
process spends more time doing computations.

13. Why does context-switching cause a lot of overhead?

The system does no useful work while switching

14. Processes within a system may be independent or cooperating

15. Cooperating processes need interprocess communication(IPC)


16. Parents process create children processes, which, in turn create other

processes, forming a tree of processes.

17. The function to create a child process is fork() system call creates new process.

18. List the resource sharing options between parent and child process.

I. Parent and children share all resources


II. Children share subset of parent’s resources
III. Parent and child share no resources

19. List the execution options between parent and child process.

I. Parent and children execute concurrently


II. Parent wait until children terminate

20. List and describe briefly the two communications models.

I. Message passing – Process of communication by sending and receiving


messages through a communication channel provided by the operating system.
II. Shared memory – The processes share the same memory to access the same
data and file.

You might also like