TEST2 March 2021 until August 2021 Questions PDF

Title TEST2 March 2021 until August 2021 Questions
Author Yuuki asuna
Course Computer Science
Institution Universiti Teknologi MARA
Pages 8
File Size 368.8 KB
File Type PDF
Total Downloads 193
Total Views 562

Summary

CONFIDENTIAL 1 TEST 2/ /CSCUNIVERSITI TEKNOLOGI MARATEST 2COURSE : PRINCIPLES OF OPERATING SYSTEMSCOURSE CODE : CSCSEMESTER : MARCH 2021 – AUGUST 2021INSTRUCTIONS TO CANDIDATES This question paper consists of Part A and Part B. Part A have 10 questions and part B have 4 questions. Answer ALL questio...


Description

CO

L

1

TEST 2/ /CSC520

UNIVERSITI TEKNOLOGI MARA TEST 2

COURSE

:

PRINCIPLES OF OPERATING SYSTEMS

COURSE CODE

:

CSC520

SEMESTER

:

MARCH 2021 – AUGUST 2021

INSTRUCTIONS TO CANDIDATES 1.

This question paper consists of Part A and Part B. Part A have 10 questions and part B have 4 questions.

2.

Answer ALL questions in the space provided.

50

STUDENT NAME

:

___________________________________________

MATRIX NO.

:

___________________________________________

GROUP

:

___________________________________________

LECTURER’S NAME

:

___________________________________________

DO NOT TURN THIS PAGE UNTIL YOU ARE TOLD TO DO SO This examination paper consists of 6 printed pages

© Hak Cipta Universiti Teknologi MARA

CONFIDENTIAL

CONFIDENTIAL

2

TEST2/CSC520

Part A (10 Marks)

Determine whether the following statements are TRUE or FALSE. 1.

In the Round Robin (RR) scheduling, if the time quantum (q) is too large then scheduling is same as First Come First Serve (FCFS).

2.

First Come First Serve (FCFS) is a preemptive CPU scheduling.

3.

In FCFS CPU scheduling algorithm, when the short processes wait for long process to finish its execution is called page fault.

4.

CPU scheduling is the basis of multiprogramming operating systems. .

5.

SJF (Shortest Job First) algorithms tends to minimize the process flow time.

6.

A problem encountered in multitasking when a process is perpetually denied necessary resources is called starvation.

7.

The request and release of resources are interrupts.

8.

A system is in a safe state only if there exists a safe allocation.

9.

In the bounded buffer problem, there are the empty and full semaphores that count the number of empty and full buffers.

10.

The wait operation of the semaphore basically works on the basic block() system call.

© Hakcipta Universiti Teknologi MARA

CONFIDENTIAL

CONFIDENTIAL

3

TEST2/CSC520

Part B (40 Marks) QUESTION 1 (10 Marks)

1. Consider the following set of processes to solve the questions 1, 2 and 3. Table 1 Process A101 B111 C101 D111

Arrival Time 0 0 0 0

Burst Time 6 3 2 5

Waiting Time

i.

Draw the Gantt chart for Shortest-Job-First (SJF) [3m]

ii.

Draw the Gantt Chart for Shortest-Remaining-Time-First (SRTF) [3m]

iii.

Fill in the Waiting Time in the Table 1 for question i. Calculate the average waiting time for question i and question ii. Find the difference of average waiting time. [4m]

© Hakcipta Universiti Teknologi MARA

CONFIDENTIAL

CONFIDENTIAL

4

TEST2/CSC520

QUESTION 2 (10 Marks) List FOUR (4) conditions for deadlock to exist. [4m]

a)

   

Mutual exclusion Hold and wait No preemption Circular wait

b) There are THREE (3) strategies of handling deadlock. One of the strategies is deadlock prevention, Give another 2 strategies. Give ONE (1) advantage using these strategies. Name the algorithm used for strategies mentioned above. [6m]

No

Strategy

Advantage

Algorithm

1

Deadlock Avoidance

No prevention necessary

Bankers algorithm

2

Deadlock Detection

Never delay process initiation

Deadlock Detection algorithm

© Hakcipta Universiti Teknologi MARA

CONFIDENTIAL

CONFIDENTIAL

5

TEST2/CSC520

QUESTION 3 (10 Marks) List down below is all the set of processes and resources in the graph

A is holding one instance of T and request S B is holding one instance of S C is holding one instance of S and request T D is holding one instance of T

a)

Draw the resource allocationn graph.[7m]

© Hakcipta Universiti Teknologi MARA

CONFIDENTIAL

CONFIDENTIAL

6

TEST2/CSC520

b) Determine whether the graph demonstrate a deadlock or not. State your reason. [3m] 

If a resource-allocation graph contains no cycles, then the system is not deadlocked

QUESTION 4 (10 Marks) Assume there are five processes and the following resources: A (7 instances), B (5 instances) and C (6 instances)

P0

A 7

Max B 5

© Hakcipta Universiti Teknologi MARA

C 3

A 0

Allocation B 1

C 0

CONFIDENTIAL

CONFIDENTIAL

P1 P2 P3 P4

7

3 7 2 4

2 0 2 3

2 2 2 3

TEST2/CSC520

2 3 2 0

0 0 1 0

0 2 1 2

Determine whether the system is in safe state or not. If yes, give the safe sequence. Show your work.

REMAINING NEED CURRENT AVAILABLE + ALLOCATION

P0 P1 P2 P3 P4

743 122 400 011 431...


Similar Free PDFs