web viewtutorial . 4 – operating systems

4
Princess Nora Bint Abdulrahman University NET201- Principles of Information & Technology Systems Faculty of Computer and Information Sciences First Semester 1438/1439 H Department of Networks and Telecommunications Tutorial 4 – Operating Systems Q1) Choose the correct answer: 1- A process in the …… state can go to either the ready, terminated, or waiting states a- hold b-virtual c-running d-a and c 2- Every process is a …….. a-job b-program c-partition d-a and b 3- To prevent ………, an operating system can put resource restrictions on processes. a-Deadlock b-Paging c-Synchronization d-Starvation 4- ……….. can occur if a process has too many resource restrictions a-Starvation b-Synchronization c-Paging d-Deadlock

Upload: doannga

Post on 03-Feb-2018

224 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Web viewTutorial . 4 – Operating Systems

Princess Nora Bint Abdulrahman University NET201- Principles of Information & Technology Systems Faculty of Computer and Information Sciences First Semester 1438/1439 HDepartment of Networks and Telecommunications Tutorial 4 – Operating Systems

Q1) Choose the correct answer:

1- A process in the …… state can go to either the ready, terminated, or waiting statesa- holdb- virtualc- running d- a and c

2- Every process is a ……..a- jobb- program c- partition d- a and b

3- To prevent ………, an operating system can put resource restrictions on processes.a- Deadlock b- Paging c- Synchronization d- Starvation

4- ……….. can occur if a process has too many resource restrictions a- Starvation b- Synchronization c- Paging d- Deadlock

5- The ……………… manager is responsible for archiving and backup.a- Memory b- Process c- Device d- File

Page 2: Web viewTutorial . 4 – Operating Systems

Princess Nora Bint Abdulrahman University NET201- Principles of Information & Technology Systems Faculty of Computer and Information Sciences First Semester 1438/1439 HDepartment of Networks and Telecommunications Tutorial 4 – Operating Systems

Q2) Solve the followings:

6- What is the status of a process in each of the following situations?a. The process is using the CPU. b. The process has finished printing and needs the attention of the CPU again. c. The process has been stopped because its time slot is over. d. The process is reading data from the keyboard. e. The process is printing data.

7- A multi-programming operating system uses virtual memory that doesn’t requires the whole program to be in physical memory during execution (NOTE: it allows swapping). The size of physical memory is 100 MB. The size of virtual memory is 1GB.

a. How many programs of size 10MB can be run concurrently by this operating system?

8- Three processes (A, B, AND C) are running concurrently. Process A has acquired File1, but needs File2. Process B has acquired File3, but needs File1. Process C has acquired File2, but needs File3.

a. Draw a diagram for these processes.

Page 3: Web viewTutorial . 4 – Operating Systems

Princess Nora Bint Abdulrahman University NET201- Principles of Information & Technology Systems Faculty of Computer and Information Sciences First Semester 1438/1439 HDepartment of Networks and Telecommunications Tutorial 4 – Operating Systems

b. Is this a deadlock situation?

9- Three processes (A, B, and C) are running concurrently. Process A has acquired File1. Process B has

acquired File2, but needs File1. Process C has acquired File3, but needs File2.

a. Draw a diagram for these processes.

b. Is this a deadlock situation? If your answer is “no”, show how the processes can eventually finish their tasks.