4
Princess Nora Bint Abdulrahman University NET201- Principles of Information & Technology Systems Faculty of Computer and Information Sciences First Semester 1437/1438 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

Web viewSynchronization . Paging . Deadlock . The manager is responsible for archiving and backup. Memory . Process . Device . File . Q. 2

  • Upload
    lydan

  • View
    221

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Web viewSynchronization . Paging . Deadlock . The  manager is responsible for archiving and backup. Memory . Process . Device . File . Q. 2

Princess Nora Bint Abdulrahman University NET201- Principles of Information & Technology Systems Faculty of Computer and Information Sciences First Semester 1437/1438 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 viewSynchronization . Paging . Deadlock . The  manager is responsible for archiving and backup. Memory . Process . Device . File . Q. 2

Princess Nora Bint Abdulrahman University NET201- Principles of Information & Technology Systems Faculty of Computer and Information Sciences First Semester 1437/1438 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. Running b. The process has finished printing and needs the attention of the CPU again. Ready c. The process has been stopped because its time slot is over. Ready d. The process is reading data from the keyboard. Waiting e. The process is printing data. Waiting

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? Total memory = 1000 (Virtual Memory) + 100 (RAM) = 1100 MB. Number of program = 1100 / 10 = 110 programs

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 viewSynchronization . Paging . Deadlock . The  manager is responsible for archiving and backup. Memory . Process . Device . File . Q. 2

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

b. Is this a deadlock situation?

This is a deadlock situation, because all four conditions of deadlock (mutual exclusion, resource holding, no preemption, and circular waiting) are all present.

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.

Page 4: Web viewSynchronization . Paging . Deadlock . The  manager is responsible for archiving and backup. Memory . Process . Device . File . Q. 2

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

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

This is not a deadlock situation, because one of the necessary conditions (circular waiting) is not present.

The processes will finish in the following sequence : A -> B -> C