0% found this document useful (0 votes)
11 views317 pages

Kiểm tra Chương 3 và 4 - Hệ Điều Hành

The document details a quiz on chapters 3 and 4 of an Operating Systems course, completed by a student named Lưu Lê Tuấn Đạt on April 26, 2020. The quiz consisted of multiple questions related to deadlock detection, resource allocation, and process synchronization, with the student achieving a score of 17 out of 20. The document includes specific questions and answers from the quiz, showcasing the student's understanding of key concepts in operating systems.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
11 views317 pages

Kiểm tra Chương 3 và 4 - Hệ Điều Hành

The document details a quiz on chapters 3 and 4 of an Operating Systems course, completed by a student named Lưu Lê Tuấn Đạt on April 26, 2020. The quiz consisted of multiple questions related to deadlock detection, resource allocation, and process synchronization, with the student achieving a score of 17 out of 20. The document includes specific questions and answers from the quiz, showcasing the student's understanding of key concepts in operating systems.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Kiểm tra chương 3+4 4/26/20, 16:29

UETOTS Lưu Lê Tuấn Đạt

Operating systems INT2206 9 (2019-2020)


Home ▶ My courses ▶ Operating Systems ▶ S2INT2206_9_1920 ▶ 26 April - 2 May ▶
Kiểm tra chương 3+4

Started on Sunday, 26 April 2020, 3:00 PM


QUIZ
NAVIGATION State Finished
Completed on Sunday, 26 April 2020, 3:35 PM
1 2 3 4
Time taken 35 mins
5 6 7 8 Marks 17.00/20.00
Grade 8.50 out of 10.00 (85%)
9 10 11 12

13 14 15 16
Question 1 Given the following system information:
17 18 19 20 Correct
ALLOCATION
Show one page at Mark 1.00 out of
REQUEST AVBALABLE
a time 1.00

Finish review Remove flag

PROCESS A B C
A B C A B
C

P0 0 1
0 0 0 0
0 0 0

P1 2 0
0 2 0 2

P2 3 0
3 0 0 1

[Link] Page 1 of 20
Kiểm tra chương 3+4 4/26/20, 16:29

P3 2 1
1 1 0 0

P4 0 0
2 0 0 2

Which is correct about the deadlock detection


algorithm?

Select one:
There algorithm results in FINISH=(T, F, T, F, F),
thus P1, P3 and P4 are in a deadlock.

There algorithm results in FINISH=(T, F, F, F, F),


thus P1, P2, P3 and P4 are in a deadlock.

There algorithm results in FINISH=(F, T, F, F, F),


thus P0, P2, P3 and P4 are in a deadlock.

There algorithm results in FINISH=(F, F, F, F, T),


thus P1, P2, P3 and P4 are in a deadlock.

Question 2 Which is incorrect with the mouse of a computer?


Correct
Select one:
Mark 1.00 out of
1.00 There is a critical section with the mouse

Remove flag There is a race condition with the mouse

Multiple processes can use the mouse


concurrently

This is a shared resource of the system

Question 3 Given the following resource allocation graph.


Correct What is the correct name of the edge from P1 to
R1?
Mark 1.00 out of
1.00

Flag question

[Link] Page 2 of 20
Kiểm tra chương 3+4 4/26/20, 16:29

Select one:
Claim edge.

Request edge.

Assignment edge.

Question 4 Which is INCORRECT about Resource Allocation


Correct Graph (RAG)?

Mark 1.00 out of


Select one:
1.00
A circle represents a process
Flag question
A rectangle represents a process

A request edge is from a process vertex to a


resource vertex

An edge from a resource vertex to a process


vertex represents an instance of the resources
is allocated to the process

[Link] Page 3 of 20
Kiểm tra chương 3+4 4/26/20, 16:29

Question 5 Given the following system information, and


Correct process P1 requests 1 more tape:

Mark 1.00 out of


ALLOCATION
1.00
MAX AVAILABLE
Remove flag

PROCESS TAPES TAPES


TAPES

P0 5
10 3

P1 2
4

P2 2
9

Which is the correct value of FINISH and WORK


vectors during the running of Banker's algorithm
which is called in the Resource-Request algorithm
(to avoid deadlock)?

Select one:
FINISH=(T, T, F), WORK=(10)

FINISH=(F, T, F), WORK=(10)

FINISH=(F, F, F), WORK=(10)

FINISH=(F, T, T), WORK=(10)

Question 6 Which is CORRECT about the goal of the progress


Correct condition of critical section?

Mark 1.00 out of


Select one:
1.00
It utilizes the shared resource effectively
Flag question

[Link] Page 4 of 20
Kiểm tra chương 3+4 4/26/20, 16:29

It makes the algorithm complicated to


implement

It ensures the correct use of the shared


resource

It supports the priority of processes

Question 7 Given the code of Readers-Writers problem:


Correct Process writer P:

Mark 1.00 out of


do {
1.00

Flag question

wait(wrt);

write(data_set);

signal(wrt);

}while (TRUE);

Process reader Q:

do {

wait(mutex);

readcount++;

if (readcount ==1) wai


t(wrt);

[Link] Page 5 of 20
Kiểm tra chương 3+4 4/26/20, 16:29

signal(mutex);

read(data_set);

wait(mutex);

readcount--;

if (readcount ==0) sig


nal(wrt);

signal(mutex);

} while (TRUE);

Which is the initialized value of the wrt variable in


the above algorithm?

Select one:
1

-1

NULL

Question 8 Given a global variable hit. Which statement has a


Correct race condition in the following code (when it is run
concurrently several instances):
Mark 1.00 out of
1.00
while (true) {
Flag question

[Link] Page 6 of 20
Kiểm tra chương 3+4 4/26/20, 16:29

var val=0;

waitForNewRequest();

if(found){

hit+=1;

val=hit;

Respond();

Select one:
Respond();

if(found){ ...}

waitForNewRequest();

No race condition at all

Question 9 Which is incorrect about process synchronization?


Correct
Select one:
Mark 1.00 out of
1.00
Process synchronization is needed when the
involving processes have a certain constraint
Remove flag
on execution.

[Link] Page 7 of 20
Kiểm tra chương 3+4 4/26/20, 16:29

Handshaking is one of the condition for the


need of process synchronization

Process synchronization uses IPC

Process synchronization is only in need when


the involving processes use a shared resource

Question 10 Given the code of crossroad problem, where


Incorrect semaphores conner[i] are implemented using
queue instead of while loop. Which of the following
Mark 0.00 out of
is incorrect?
1.00

Remove flag //CODE Car[i]

do {

wait(conner[i]);

wait(conner[(i+1)%4]);

Get_Over_The_Crossroad
(i);

signal(conner[i]);

signal(conner[(i+1)%4]
;

Continue_Going(i);

[Link] Page 8 of 20
Kiểm tra chương 3+4 4/26/20, 16:29

} while (TRUE);

Select one:
At a time, only a car can go through the
crossroad

wait(conner[i]) request to use a street corner[i]

When a car[i] got two corners, the cars in the


crossing road will have to wait

wait(conner[(i+1)%4]) request to use the street


corner ahead corner[i]

Question 11 Given the following system information, and


Incorrect process P4 requests (1, 0, 0) more resources:

Mark 0.00 out of


ALLOCATION
1.00
MAX AVBALABLE
Flag question

PROCESS A B C
A B C A B
C

[Link] Page 9 of 20
Kiểm tra chương 3+4 4/26/20, 16:29

P0 0
1 0 7 5
3 2 3 0

P1 3
0 2 3 2
2

P2 3
0 2 9 0
2

P3 2
1 1 2 2
2

P4 0
0 2 4 3
3

Which is the correct value of FINISH and WORK


vectors during the running of Banker's algorithm
which is called in the Resource-Request algorithm
(to avoid deadlock)?

Select one:
FINISH=(T, T, T, T, F), WORK=(9, 5, 5)

FINISH=(F, T, T, T, F), WORK=(9, 4, 5)

FINISH=(T, F, T, T, F), WORK=(9, 5, 5)

FINISH=(T, F, T, T, F), WORK=(6, 4, 5)

Question 12 Given the code of two semaphore atomic


Correct operation, where S is initialized by 1. Suppose
process P1 calls wait(S), and P2 calls wait(S)
Mark 1.00 out of

[Link] Page 10 of 20
Kiểm tra chương 3+4 4/26/20, 16:29

1.00 before P1 calling signal(S). Which of the following


is incorrect?
Remove flag

void wait(semaphore *S)

S->value--;

if (S->value<0) {

Add the reques


ted process P into S->L;

block(P);

void signal(semaphore *S)

S->value++;

if (S->value<=0) {

[Link] Page 11 of 20
Kiểm tra chương 3+4 4/26/20, 16:29

remove a proce
ss P from S->L;

wakeup(P);

Select one:
Since we have the waiting queue, there no
need to have the variable S->value in the
semaphore S

P1 can continue with its next instructions

The value of S->value is -1

P2 is put into the waiting queue L of S

Question 13 Given the following system information, and


Correct process P4 requests (1, 0, 0) more resources:

Mark 1.00 out of


ALLOCATION
1.00
MAX AVBALABLE
Remove flag

PROCESS A B C
A B C A B
C

P0 0
1 0 7 5
3 2 3 0

[Link] Page 12 of 20
Kiểm tra chương 3+4 4/26/20, 16:29

P1 3
0 2 3 2
2

P2 3
0 2 9 0
2

P3 2
1 1 2 2
2

P4 0
0 2 4 3
3

Which is the correct value of FINISH and WORK


vectors during the running of Banker's algorithm
which is called in the Resource-Request algorithm
(to avoid deadlock)?

Select one:
FINISH=(T, F, T, T, F), WORK=(9, 5, 6)

FINISH=(T, T, T, T, T), WORK=(10, 5, 7)

FINISH=(F, T, T, T, T), WORK=(9, 4, 6)

FINISH=(T, F, T, T, T), WORK=(10, 5, 7)

Question 14 Given the following resource allocation graph.


Correct What is the correct name of the edge from R3 to
P3?
Mark 1.00 out of
1.00

Flag question

[Link] Page 13 of 20
Kiểm tra chương 3+4 4/26/20, 16:29

Select one:
Assignment edge.

Claim edge.

Request edge.

Question 15 Given the following code, with the globally shared


Correct variable int buf, and count() is a function. Which is
correct when multiple instances of the code are
Mark 1.00 out of
running in the system?
1.00

Flag question while (true) {

//Some code

int val=buf;

[Link] Page 14 of 20
Kiểm tra chương 3+4 4/26/20, 16:29

val += count();//A tim


e consuming function

buf=val

//Some other code

Select one:
The globally shared variable buf will always
get an incorrect value when there are more
than 2 instances of the code running.

The globally shared variable buf will always


get an incorrect value when only 2 instances of
the code running.

The globally shared variable buf can get an


incorrect value when there are more than 1
instance of the code running.

The globally shared variable buf will always


get the correct value.

Question 16 Given the following code, with the globally shared


Incorrect variable int buf, and count() is a function. Which is
incorrect when multiple instances of the code are
Mark 0.00 out of
running in the system?
1.00

Flag question while (true) {

//Some code

[Link] Page 15 of 20
Kiểm tra chương 3+4 4/26/20, 16:29

int val=buf; //1.

val += count();//2. A
time consuming function

buf=val; //3.

val=val*4; //4.

//Some other code

Select one:
There is a race condition in the code.

The critical section should be the lines


marked: 1, 2, 3, 4

The critical section should be the lines


marked: 1, 2, 3

There is a critical section in the code.

Question 17 Which is not Interprocess Communication?


Correct
Select one:
Mark 1.00 out of
1.00
A process connects to a Database
Management System (such as Microsoft SQL
Flag question
Server)

A web browser views a webpage from a web


server.

A process writes data to a file.

[Link] Page 16 of 20
Kiểm tra chương 3+4 4/26/20, 16:29

A process sends signal to another process

Question 18 Given the following resource allocation graph,


Correct provide the name of the edge from P1 to R2
(Assignment, Claim,or Request)?
Mark 1.00 out of
1.00

Flag question

Answer:
Claim

Question 19 Given the following system information, and


Correct process P0 requests (0, 2, 0) more resources:

Mark 1.00 out of


ALLOCATION
1.00
MAX AVBALABLE
Remove flag

PROCESS A B
C A B C
A B C

[Link] Page 17 of 20
Kiểm tra chương 3+4 4/26/20, 16:29

P0 0
3 0 7 5
3 2 1 0

P1 3
0 2 3 2
2

P2 3
0 2 9 0
2

P3 2
1 1 2 2
2

P4 0
0 2 4 3
3

Which is the final value of FINISH and WORK


vectors of Banker's algorithm which is called in the
Resource-Request algorithm (to avoid deadlock)?

Select one:
FINISH=(F, T, F, F, F), WORK=(2, 1, 0)

FINISH=(F, F, F, F, F), WORK=(2, 3, 0)

FINISH=(F, F, F, T, F), WORK=(2, 1, 0)

FINISH=(F, F, F, F, F), WORK=(2, 1, 0)

Question 20 Given the following information of the system.


Correct

Mark 1.00 out of


1.00

[Link] Page 18 of 20
Kiểm tra chương 3+4 4/26/20, 16:29

Flag question
Pro Allocation
Max
Available

A B
C A B
C A B
C

P0 0 0
1 0 0
1 1 5
2

P1 1 0
0 1 7
5

P2 1 3
5 2 3
5

P3 0 6
3 0 6
5

P4 0 0
1 0 6
5

If P4 requests resource A B C (0 5 2), the resource


request algorithm will produce:

Select one:

[Link] Page 19 of 20
Câu Hỏi 48 Hoàn thành

Cho một ổ đĩa cứng gồm 16 đĩa (surfaces), mỗi đĩa có 128 tracks, mỗi track có 256 sectors, mỗi sector
có thể lưu trữ dữ liệu kích thước 512 bytes. Cần bao nhiêu bit để có thể biểu diễn địa chỉ của một
sector trên đĩa?

Answer: 28

Câu Hỏi 49 Hoàn thành

Để vừa đảm bảo hiệu năng và tính an toàn cho hệ thống, loại RAID nào được sử dụng?

Chọn câu:

a. RAID 3

b. RAID 2

c. RAID 1

d. RAID 0+1

Câu Hỏi 50 Hoàn thành

Thành phần nào sau giữ thông tin trạng thái về việc sử dụng các thiết bị vào/ra

Chọn câu:

a. Các thanh ghi cơ sở

b. Bộ xử lý CPU

c. Nhân hệ điều hành

d. Bộ nhớ trong

◄ Bảo vệ và An ninh Chuyển tới...

/
UETOTS Phan Công Hậu

Operating systems INT2206 9 (2019-2020)


Home ► My courses ► Operating Systems ► S2INT2206_9_1920 ► 5 April - 11 April ► Bài kiểm tra chương 1 + 2

Started on Sunday, 5 April 2020, 8:32 PM


QUIZ NAVIGATION
State Finished
1 2 3 4 5 6 7 Completed on Sunday, 5 April 2020, 8:57 PM
8 9 10 11 12 13 14 Time taken 25 mins 42 secs
Marks 20.00/20.00
15 16 17 18 19 20
Grade 10.00 out of 10.00 (100%)
Show one page at a time
Finish review Question 1 Which is INCORRECT about First Comes First Served (FCFS) CPU scheduling algorithm?
Correct
Select one:
Mark 1.00 out of
1.00 A process can be switched from running into waiting state

Flag question Once a process is executed, it can only be switched into terminated state

A process cannot be switched into ready state


It is a non-preemptive algorithm

Question 2 Suppose a system uses RR scheduling algorithm. The processes information (arrival time,
Correct duration) is P1(0, 25), P3(20, 40), P2(30, 10), P4(35, 25), and the time quantum is 15. Which is
the response time of P2?
Mark 1.00 out of
1.00
Select one:
Flag question
10
20

15

Question 3 Which is the CORRECT relationship among process, program and application concepts?
Correct
Select one:
Mark 1.00 out of
1.00 An application may have several processes, a process may have several programs

Flag question An application may have several programs, a program may have several processes

An application may have several programs, a program has only one process
An application has only one program, a program has only one process

Question 4 Which is INCORRECT about the states of a process?


Correct
Select one:
Mark 1.00 out of
1.00 A process can be switched from running into ready state

Flag question Valid states are new, ready, running, waiting and terminated

The number of states of a process is the same in all operating systems

A process can be switched from running into waiting state

Question 5 Suppose a system uses FCFS CPU scheduling algorithm. The duration and order of the process
Correct are P1(20), P2(11), P3(6). Which is the average waiting time of the processes?

Mark 1.00 out of


Select one:
1.00
27
Flag question
17
47

37

Question 6 Which is NOT a criterion to evaluate a CPU scheduling algorithm?


/
Correct Select one:
Mark 1.00 out of Waiting time
1.00
RAM utilization
Flag question
CPU utilization

Response time

Question 7 Which is NOT the purpose of virtual machine?


Correct
Select one:
Mark 1.00 out of
1.00 Allow operating systems on the same hardware to use some resources (such as IP, port,
domain name,...) independently
Flag question
Allow multiple operating system to run on the same hardware

Utilize RAM and CPU more effectively


Increase the number of processes in memory

Question 8 Suppose a system uses SJF scheduling algorithm, the processes information (arrival time,
Correct duration) is P1(0,21), P2(30,20),P3(20,40), P4(35,15). Show the order (e.g. P2 P1 P3 P4) in
which the processes are run?
Mark 1.00 out of
1.00
Answer: P1 P3 P4 P2
Flag question

Question 9 Suppose a system uses Round Robin (RR) CPU scheduling algorithm, the processes information
Correct (arrival time, duration) is P1(0,21), P2(30,10), P3(20,40), P4(40,25), and the time quantum is 15.
Calculate the total waiting time of the processes?
Mark 1.00 out of
1.00
Answer: 63
Flag question

Question 10 Suppose a system uses SJN (or SJF) scheduling algorithm. The processes information (arrival
Correct time, duration) is P1(0,7), P2(2,4), P3(4,1), P4(5,5). Calculate the response time of P1 ?

Mark 1.00 out of


1.00 Answer: 0

Flag question

Question 11 Which is CORRECT about a process?


Correct
Select one:
Mark 1.00 out of
1.00 Is a library

Flag question Is a file on hard disk


Is an application

Is an instance of a program

Question 12 Suppose a system uses SJN (or SJF) CPU scheduling algorithm. The processes information
Correct (arrival time, duration) is P1(0,7), P2(2,4), P3(4,1), P4(5,5). Which is the total waiting time of the
processes?
Mark 1.00 out of
1.00
Select one:
Flag question
18

15

16
17

Question 13 Suppose a system uses SJN (or SJF) scheduling algorithm. The processes information (arrival
Correct time, duration) is P1(0,7), P2(2,4), P3(4,1), P4(5,5). Calculate the response time of process P3 ?

Mark 1.00 out of


1.00 Answer: 3
Flag question

/
Question 14 Which module should NOT be implemented in the kernel of operating systems?
Correct
Select one:
Mark 1.00 out of
1.00 Process management module

Flag question Device drivers (such as network card device drivers)

Networking module

Memory management module

Question 15 Which is INCORRECT about time-sharing system?


Correct
Select one:
Mark 1.00 out of
1.00 Allow several processes to run on a single CPU hardware

Flag question It is also applicable for multiple CPU hardware


Only utilize CPU effectively

Utilize resources more effectively

Question 16 Which is INCORRECT about Shortest Remaining Time First (SRTF) scheduling algorithm?
Correct
Select one:
Mark 1.00 out of
1.00 The shortest process will be run first

Flag question It is also a priority scheduling algorithm

The shortest remaining time process will be selected to run

It is the preemptive Shortest Job First (SJF) algorithm

Question 17 Suppose a system uses FCFS scheduling algorithm, the processes information (arrival time,
Correct duration) is P1(0,21), P2(30,10),P3(20,40), P4(50,15). Show the order in which the processes are
run (e.g. P2 P1 P3 P4)?
Mark 1.00 out of
1.00
Answer: P1 P3 P2 P4
Flag question

Question 18 Which is NOT one of the main tasks of operating systems?


Correct
Select one:
Mark 1.00 out of
1.00 Play audio files

Flag question Memory management

Storage management (such as CD, DVD, disks, ...)


Protection and security

Question 19 Suppose a system uses SJN (or SJF) scheduling algorithm. The processes information (arrival
Correct time, duration) is P1(0,7), P2(2,4), P3(4,1), P4(5,5). Which is the turnaround time of process P2 ?

Mark 1.00 out of


Select one:
1.00
6
Flag question
12

10

Question 20 Select INCORRECT description about the main tasks of operating systems
Correct
Select one:
Mark 1.00 out of
1.00 Provide database management systems (e.g. MS SQL Server)

Flag question Process management

Provide Application Programming Interface (API) for application developers

Resource allocation (for processes)

/
Finish review

You are logged in as Phan Công Hậu (Log out)


S2INT2206_9_1920

/
UETOTS Phan Anh

Operating systems INT2206 9 (2019-2020)


Home ► My courses ► Operating Systems ► S2INT2206_9_1920 ► 5 April - 11 April ►
Bài kiểm tra chương 1 + 2

Started on Sunday, 5 April 2020, 8:30 PM


State Finished
Completed on Sunday, 5 April 2020, 9:00 PM
Time taken 30 mins
Marks 20.00/20.00
Grade 10.00 out of 10.00 (100%)

Question 1 Which is NOT a criterion to evaluate a CPU scheduling algorithm?


Correct
Select one:
Mark 1.00 out of
1.00 Response time

Flag question CPU utilization


RAM utilization
Waiting time

Question 2 Which is the BEST reason why we need process scheduling?


Correct
Select one:
Mark 1.00 out of
1.00 Because the system has many processes to run

Flag question Many reasons: Many processes; Utilize system resources more effectively; Don’t let
users wait; ...

Because the system has many processes to run and they need to be treated equally
Because we need to utilize the memory more effectively

Question 3 Which code a CPU can understand and execute?


Correct
Select one:
Mark 1.00 out of
1.00 a=a+b

Remove flag 0110010110

[Link]();
add AX, BX
/
Question 4 Suppose a system uses RR scheduling algorithm. The processes information (arrival time,
Correct duration) is P1(0, 25), P3(20, 40), P2(30, 10), P4(35, 25), and the time quantum is 15.
Which is the waiting time of P1?
Mark 1.00 out of
1.00
Select one:
Flag question
15

20
10
0

Question 5 Which is the INCORRECT process scheduling type?


Correct
Select one:
Mark 1.00 out of
1.00 Short-term scheduler

Flag question Medium-term scheduler

Quick-term scheduler
Long-term scheduler

Question 6 Which is the correct type of Windows XP?


Correct
Select one:
Mark 1.00 out of
1.00 Embedded

Flag question Special purpose

Uni-programming
Multi-programming

Question 7 Which is INCORRECT about multi-user operating systems?


Correct
Select one:
Mark 1.00 out of
1.00 Allow each user to run several processes at the same time

Flag question It is the same as a multi-programming operating system

Allow several processes to run on a single CPU hardware


Allow several people to use the computer at the same time

Question 8 Select the best description about operating systems for computers
Correct
Select one:
/
Mark 1.00 out of They are applications
1.00
They are libraries
Flag question
They are software that are between users and computer hardware
They are firmware

Question 9 Which is INCORRECT about an application?


Correct
Select one:
Mark 1.00 out of
1.00 A database management system is an example of an application

Flag question It can be organized into multiple files on disks.

It serves a certain task for users or programmers


It controls I/O (such as read/write operations on disks)

Question 10 Suppose a system uses FCFS CPU scheduling algorithm. The duration and order of the
Correct process are P1(20), P2(11), P3(6). Which is the average waiting time of the processes?

Mark 1.00 out of


Select one:
1.00
47
Flag question
17

27
37

Question 11 Suppose a system uses SJN (or SJF) scheduling algorithm. The processes information
Correct (arrival time, duration) is P1(0,7), P2(2,4), P3(4,1), P4(5,5). Calculate the turnaround time of
P1 ?
Mark 1.00 out of
1.00
Answer: 7
Flag question

Question 12 Which is NOT the purpose of virtual machine?


Correct
Select one:
Mark 1.00 out of
1.00 Increase the number of processes in memory

Remove flag Allow operating systems on the same hardware to use some resources (such as IP,
port, domain name,...) independently
Utilize RAM and CPU more effectively
Allow multiple operating system to run on the same hardware

/
Question 13 Which is INCORRECT about Shortest Remaining Time First (SRTF) scheduling algorithm?
Correct
Select one:
Mark 1.00 out of
1.00 It is also a priority scheduling algorithm

Flag question The shortest remaining time process will be selected to run
The shortest process will be run first
It is the preemptive Shortest Job First (SJF) algorithm

Question 14 What language a CPU can understand?


Correct
Select one:
Mark 1.00 out of
1.00 Assembly

Remove flag Binary code (0110010110)

C++
C

Question 15 Suppose a system uses RR scheduling algorithm. The processes information (arrival time,
Correct duration) is P1(0, 25), P3(20, 40), P2(30, 10), P4(35, 25), and the time quantum is 15.
Which is the response time of P1?
Mark 1.00 out of
1.00
Select one:
Flag question
10
0

20
15

Question 16 Which is NOT an operating system type?


Correct
Select one:
Mark 1.00 out of
1.00 Batch system

Flag question Uni-programming operating system

Embedded system
Sequential system,

Question 17 Which is INCORRECT about context switch?


Correct
Select one:
/
Mark 1.00 out of It is the steps of switching to run another process
1.00
The current process will be put into waiting queue
Flag question
The target process will be run
The context of the current process will be saved

Question 18 Which is non-preemptive CPU scheduling algorithm?


Correct
Select one:
Mark 1.00 out of
1.00 SRTF

Flag question FIFO

Round robin
None of the above

Question 19 Which is NOT an operating system structure?


Correct
Select one:
Mark 1.00 out of
1.00 Modularity

Flag question Object-oriented

Layered
Micro-kernel

Question 20 Suppose a system uses FCFS CPU scheduling algorithm, the processes information (arrival
Correct time, duration) is P1(0,21), P2(30,10),P3(20,40), P4(40,25). Calculate the average waiting
time of the processes?
Mark 1.00 out of
1.00
Answer: 15.75
Flag question

Finish review

QUIZ NAVIGATION

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
Show one page at a time
Finish review

/
You are logged in as Phan Anh (Log out)
S2INT2206_9_1920

/
UETOTS Nguyễn Thị Huệ

Operating systems INT2206 9 (2019-2020)


Home ► My courses ► Operating Systems ► S2INT2206_9_1920 ► 5 April - 11 April ►
Bài kiểm tra chương 1 + 2

Started on Sunday, 5 April 2020, 8:34 PM


State Finished
Completed on Sunday, 5 April 2020, 9:03 PM
Time taken 29 mins 52 secs
Marks 20.00/20.00
Grade 10.00 out of 10.00 (100%)

Question 1 Suppose a system uses Round Robin (RR) CPU scheduling algorithm, the processes
Correct information (arrival time, duration) is P1(0,21), P2(30,10), P3(20,40), P4(40,25), and the
time quantum is 15. Calculate the total waiting time of the processes?
Mark 1.00 out of
1.00

Remove flag
Answer: 63

Question 2 Which is INCORRECT about time-sharing system?


Correct
Select one:
Mark 1.00 out of
1.00 Only utilize CPU effectively

Flag question It is also applicable for multiple CPU hardware

Utilize resources more effectively

Allow several processes to run on a single CPU hardware

Question 3 Which is the correct type of Windows XP?


Correct
Select one:
Mark 1.00 out of
1.00 Uni-programming

Flag question Multi-programming


Special purpose

Embedded

/
Question 4 Suppose a system uses SJN (or SJF) scheduling algorithm. The processes information
Correct (arrival time, duration) is P1(0,7), P2(2,4), P3(4,1), P4(5,5). Calculate the response time of
P4 ?
Mark 1.00 out of
1.00

Remove flag
Answer: 7

Question 5 Suppose a system uses FCFS CPU scheduling algorithm. The duration and order of
Correct processes are P1(21), P2(10), P3(6). Which is the throughput of the system?

Mark 1.00 out of


Select one:
1.00
0.3
Remove flag
0.4
0.2

0.1

Question 6 Suppose a system uses SRTF scheduling algorithm. The processes information (arrival
Correct time, duration) is P1(0,21), P2(30,10),P3(20,40), P4(40,15). Show the order (e.g. P2, P1,
P3, P4) in which the processes are run?
Mark 1.00 out of
1.00
Answer: P1, P3, P2, P4, P3
Remove flag

Question 7 Which is INCORRECT about batch system?


Correct
Select one:
Mark 1.00 out of
1.00 Is not like time-sharing system

Flag question May use FIFO mechanism

Is a simple operating system


Allow many people to use a computer concurrently

Question 8 Suppose a system uses RR scheduling algorithm. The processes information (arrival time,
Correct duration) is P1(0, 25), P3(20, 40), P2(30, 10), P4(35, 25), and the time quantum is 15.
Which is the response time of P1?
Mark 1.00 out of
1.00
Select one:
Remove flag
0
10
15

20 /
Question 9 Suppose a system uses SJN (or SJF) CPU scheduling algorithm. The processes
Correct information (arrival time, duration) is P1(0,7), P2(2,4), P3(4,1), P4(5,5). Which is the total
waiting time of the processes?
Mark 1.00 out of
1.00
Select one:
Remove flag
17
16
18

15

Question 10 Suppose a system uses SJF scheduling algorithm, the processes information (arrival time,
Correct duration) is P1(0,21), P2(30,20),P3(20,40), P4(35,15). Show the order (e.g. P2 P1 P3 P4) in
which the processes are run?
Mark 1.00 out of
1.00
Answer: P1 P3 P4 P2
Remove flag

Question 11 Which is NOT one of the main tasks of operating systems?


Correct
Select one:
Mark 1.00 out of
1.00 Memory management

Flag question Storage management (such as CD, DVD, disks, ...)

Protection and security


Play audio files

Question 12 Suppose a system uses SJN (or SJF) scheduling algorithm. The processes information
Correct (arrival time, duration) is P1(0,7), P2(2,4), P3(4,1), P4(5,5). Calculate the response time of
process P3 ?
Mark 1.00 out of
1.00
Answer: 3
Remove flag

Question 13 Which is the BEST reason why we need process scheduling?


Correct
Select one:
Mark 1.00 out of
1.00 Because the system has many processes to run and they need to be treated equally

Flag question Many reasons: Many processes; Utilize system resources more effectively; Don’t let
users wait; ...
/
Because we need to utilize the memory more effectively

Because the system has many processes to run

Question 14 Suppose a system uses RR scheduling algorithm. The processes information (arrival time,
Correct duration) is P1(0, 25), P3(20, 40), P2(30, 10), P4(35, 25), and the time quantum is 15.
Which is the waiting time of P2?
Mark 1.00 out of
1.00
Select one:
Remove flag
5

20
0
10

Question 15 Suppose a system uses SJN (or SJF) scheduling algorithm. The processes information
Correct (arrival time, duration) is P1(0,7), P2(2,4), P3(4,1), P4(5,5). Calculate the turnaround time of
P1 ?
Mark 1.00 out of
1.00

Remove flag
Answer: 7

Question 16 Which is the CORRECT statement about a program?


Correct
Select one:
Mark 1.00 out of
1.00 Is a compiled (e.g binary code) application

Flag question Is a library


Is a process

Is a part of the operating system

Question 17 Suppose a system uses RR scheduling algorithm. The processes information (arrival time,
Correct duration) is P1(0, 25), P3(20, 40), P2(30, 10), P4(35, 25), and the time quantum is 15.
Which is the throughput of P1?
Mark 1.00 out of
1.00
Select one:
Remove flag
0.04

0.02
0.01

0.03

/
Question 18 Which is the CORRECT relationship among process, program and application concepts?
Correct
Select one:
Mark 1.00 out of
1.00 An application may have several programs, a program may have several processes

Flag question An application may have several processes, a process may have several programs
An application has only one program, a program has only one process
An application may have several programs, a program has only one process

Question 19 Which is CORRECT about the structure of a process?


Correct
Select one:
Mark 1.00 out of
1.00 Stack, heap, code (text)

Flag question Data, code (text)

Heap, data, code (text)


Stack, heap, data, code (text), program counter, and addtional information

Question 20 Which is NOT an operating system type?


Correct
Select one:
Mark 1.00 out of
1.00 Embedded system

Flag question Batch system

Sequential system,
Uni-programming operating system

Finish review

QUIZ NAVIGATION

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
Show one page at a time
Finish review

You are logged in as Nguyễn Thị Huệ (Log out)


S2INT2206_9_1920

/
UETOTS Phan Anh

Operating systems INT2206 9 (2019-2020)


Home ► My courses ► Operating Systems ► S2INT2206_9_1920 ► 14 June - 20 June ►
Bài kiểm tra chương 7 +8

Started on Sunday, 14 June 2020, 3:30 PM


State Finished
Completed on Sunday, 14 June 2020, 4:01 PM
Time taken 31 mins
Marks 19.00/20.00
Grade 9.50 out of 10.00 (95%)

Question 1 A UNIX file system has 12 direct pointers (named from 1 to 12), 1 single indirect pointer, 1
Correct double indirect pointer, 1 triple indirect pointer; the block size is 1KB, and the pointer is 4
byte. Given the logical address x=98364. Which is the correct information about the location
Mark 1.00 out of
of the above address?
1.00

Flag question Select one:


SINGLE INDIRECT POINTER (block,offset)=(82, 60)

SINGLE INDIRECT POINTER (block,offset)=(81, 60)


SINGLE INDIRECT POINTER (block,offset)=(80, 60)
SINGLE INDIRECT POINTER (block,offset)=(84, 60)

Question 2 Given the following RAID system in the following figure. Suppose each disk is 500GB,
Correct which is the maximum size of data can be stored on the system?

Mark 1.00 out of


1.00

Flag question

Select one:
approximate 1 TB

approximate 3 TB /
approximate 1.5 TB
approximate 2 TB

Question 3 Suppose a level-6 RAID system has 12 hard-disks of size 500 GB. How much is the
Correct performance of the system improved?

Mark 1.00 out of


Select one:
1.00
10 times
Flag question
12 times
9 times
11 times

Question 4 Suppose a disk has 200 cylinders (marked from 0 to 199); the head is currently at the
Correct cylinder 53; Disk request string is 98, 183, 37, 122, 14, 124, 65, 67. Suppose SSTF disk
scheduling algorithm is used, calculate the total cylinders the head has to move to serve the
Mark 1.00 out of
above requests (e.g. 432)?
1.00

Flag question
Answer: 236

Question 5 Suppose a disk has 200 cylinders (marked from 0 to 199); the head is currently at the
Correct cylinder 75 with the direction toward the cylinder 199; The disk request string is 98, 183, 37,
122, 14. Suppose LOOK disk scheduling algorithm is used, calculate the total number of
Mark 1.00 out of
cylinders the head has to move (e.g. 432)?
1.00

Flag question
Answer: 277

Question 6 A system uses linked list disk allocation with the block size of 2KB; the pointer size of 4
Correct bytes. Suppose a file has the size of 15.5MB. Calculate the offset in the block containing
data at file offset (from 0) 68 KB?
Mark 1.00 out of
1.00
Answer: 140
Remove flag

Question 7 Suppose a system uses (1-level) indexed allocation with the block size of 4KB; the pointer
Correct size of 4 bytes. A file has the size of 3MB. Which is the correct location at the file offset
(from 0) 27 KB?
Mark 1.00 out of
1.00
Select one:
Remove flag
(block index, offset)=(7, 3071) /
(block index, offset)=(8, 3071)
(block index, offset)=(7, 3072)
(block index, offset)=(8, 3072)

Question 8 Suppose a system uses contiguous disk allocation with the block size of 2KB. A file has the
Correct size of 12.3MB. Which is the correct location of the file offset (from 0) 415 KB?

Mark 1.00 out of


Select one:
1.00
(block index, offset)=(208, 1024)
Flag question
(block index, offset)=(208, 0)

(block index, offset)=(207, 0)


(block index, offset)=(207, 1024)

Question 9 Suppose a disk has 200 cylinders (marked from 0 to 199); the head is currently at the
Correct cylinder 161; the disk request string is 28, 83, 137, 12, 141. Suppose FCFS disk scheduling
algorithm is used, calculate the total cylinders the head has to move to serve the above
Mark 1.00 out of
requests (e.g. 432)?
1.00

Flag question
Answer: 496

Question 10 Given the following RAID system in the following figure. How much is the performance of
Correct the system improved?

Mark 1.00 out of


1.00

Flag question

Select one:
2 times

4 times
5 times
3 times
/
Question 11 A UNIX file system has 12 direct pointers (named from 1 to 12), 1 single indirect pointer, 1
Correct double indirect pointer, 1 triple indirect pointer; the block size is 2KB, and the pointer is 4
bytes. Given a valid logical address x=2493668. Which is the correct information about the
Mark 1.00 out of
location of the above address?
1.00

Remove flag Select one:


DOUPLE INDIRECT POINTER (index_block,block,offset)=(1, 180, 1252)

DOUPLE INDIRECT POINTER (index_block,block,offset)=(1, 178, 1252)


DOUPLE INDIRECT POINTER (index_block,block,offset)=(1, 179, 1252)
DOUPLE INDIRECT POINTER (index_block,block,offset)=(1, 181, 1252)

Question 12 Suppose a disk has 200 cylinders (marked from 0 to 199); the head is currently at the
Correct cylinder 53 with the direction toward the cylinder 199; The disk request string is 98, 183, 37,
122, 14, 124, 65, 67. Suppose C-LOOK disk scheduling algorithm is used (serving direction
Mark 1.00 out of
is from 0 to 199), calculate the total number of cylinders the head has to move (e.g. 432)?
1.00

Flag question
Answer: 322

Question 13 A system uses extent-based disk allocation with the block size of 2KB. An extent consists of
Correct 100 blocks; a file has the size of 25.3MB. Calculate the extent number (starting from 0) at
file offset (from 0) 14MB?
Mark 1.00 out of
1.00
Answer: 71
Flag question

Question 14 A system uses linked list disk allocation with the block size of 2KB; the pointer size of 4
Correct bytes. Suppose a file has the size of 15.5MB. Calculate the block number (starting from 0)
of the location at file offset (from 0) 68 KB?
Mark 1.00 out of
1.00
Answer: 34
Flag question

Question 15 Suppose a system uses (1-level) indexed allocation with the block size of 4KB; the pointer
Correct size of 4 bytes. A file has the size of 3MB. Which is the correct location at the file offset
(from 0) 35KB?
Mark 1.00 out of
1.00
Select one:
Flag question
(block index, offset)=(8, 3072)

(block index, offset)=(9, 3072)


(block index, offset)=(8, 3071)
/
(block index, offset)=(9, 3071)

Question 16 Suppose a disk has 200 cylinders (marked from 0 to 199); the head is currently at the
Correct cylinder 56 with the direction toward the cylinder 199; The disk request string is 98, 183, 37,
122, 14. Suppose LOOK disk scheduling algorithm is used, calculate the total number of
Mark 1.00 out of
cylinders the head has to move (e.g. 432)?
1.00

Flag question
Answer: 296

Question 17 A UNIX file system has 12 direct pointers (named from 1 to 12), 1 single indirect pointer, 1
Incorrect double indirect pointer, 1 triple indirect pointer; the block size is 2KB, and the pointer is 4
bytes. Given a valid logical address x=2493668. Which is the correct information about the
Mark 0.00 out of
location of the above address?
1.00

Remove flag Select one:


DOUPLE INDIRECT POINTER (index_block,block,offset)=(2, 181, 1252)

DOUPLE INDIRECT POINTER (index_block,block,offset)=(1, 181, 1252)


DOUPLE INDIRECT POINTER (index_block,block,offset)=(2, 180, 1252)
DOUPLE INDIRECT POINTER (index_block,block,offset)=(1, 180, 1252)

Question 18 Suppose a disk has 200 cylinders (marked from 0 to 199); the head is currently at the
Correct cylinder 17; the disk request string is 28, 83, 137, 12, 141. Suppose FCFS disk scheduling
algorithm is used, calculate the total cylinders the head has to move to serve the above
Mark 1.00 out of
requests (e.g. 432)?
1.00

Flag question
Answer: 374

Question 19 A UNIX file system has 12 direct pointers (named from 1 to 12), 1 single indirect pointer, 1
Correct double indirect pointer, 1 triple indirect pointer; the block size is 1KB, and the pointer is 4
byte. Given the logical address x=54984. Which is the correct information about the location
Mark 1.00 out of
of the above address?
1.00

Flag question Select one:


SINGLE INDIRECT POINTER (block,offset)=(39, 712)
SINGLE INDIRECT POINTER (block,offset)=(40, 712)
SINGLE INDIRECT POINTER (block,offset)=(42, 712)

SINGLE INDIRECT POINTER (block,offset)=(41, 712)

/
Question 20 Given the following RAID-2 system in the following figure. Suppose each disk is 120 GB,
Correct which is the maximum size of data can be stored on the system?

Mark 1.00 out of


1.00

Flag question

Select one:
approximate 720 GB
approximate 480 GB
approximate 240 GB

approximate 360 GB

Finish review

QUIZ NAVIGATION

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
Show one page at a time
Finish review

You are logged in as Phan Anh (Log out)


S2INT2206_9_1920

/
/
/
/
/
/
Bài kiểm tra chương 1 + 2 4/5/20, 21:01

UETOTS Lưu Lê Tuấn Đạt

Operating systems INT2206 9 (2019-2020)


Home ▶ My courses ▶ Operating Systems ▶ S2INT2206_9_1920 ▶ 5 April - 11 April ▶
Bài kiểm tra chương 1 + 2

Started on Sunday, 5 April 2020, 8:30 PM


QUIZ
NAVIGATION State Finished
Completed on Sunday, 5 April 2020, 9:00 PM
1 2 3 4
Time taken 30 mins 1 sec
5 6 7 8 Marks 20.00/20.00
Grade 10.00 out of 10.00 (100%)
9 10 11 12

13 14 15 16
Question 1 Suppose a system uses SJN (or SJF) scheduling
17 18 19 20 Correct algorithm. The processes information (arrival time,
Show one page at duration) is P1(0,7), P2(2,4), P3(4,1), P4(5,5).
Mark 1.00 out of
a time Calculate the response time of P4 ?
1.00

Finish review Flag question


Answer: 7

Question 2 Which is INCORRECT about an application?


Correct
Select one:
Mark 1.00 out of
1.00
It serves a certain task for users or
programmers
Flag question
It can be organized into multiple files on disks.

A database management system is an


example of an application

It controls I/O (such as read/write operations


on disks)

Question 3 Suppose a system uses RR scheduling algorithm.


Correct The processes information (arrival time, duration) is
P1(0, 25), P3(20, 40), P2(30, 10), P4(35, 25), and
Mark 1.00 out of
1.00

[Link] Page 1 of 7
Bài kiểm tra chương 1 + 2 4/5/20, 21:01

Flag question the time quantum is 15. Which is the running order
of the processes?

Select one:
P1, P3, P2, P4, P3, P4, P3

P1, P1, P2, P3, P4, P3, P4, P3

P1, P1, P3, P2, P3, P4, P3, P4

P1, P1, P3, P2, P4, P3, P4, P3

Question 4 Suppose a system uses RR scheduling algorithm.


Correct The processes information (arrival time, duration) is
P1(0, 25), P3(20, 40), P2(30, 10), P4(35, 25), and
Mark 1.00 out of
the time quantum is 15. Which is the response
1.00
time of P4?
Flag question

Select one:
10

20

15

Question 5 Which is INCORRECT about preemptive in CPU


Correct scheduling algorithms?

Mark 1.00 out of


Select one:
1.00
The current process will always be run until
Flag question
terminated

The current process can be switched into


ready state

The current process can be switched into


waiting state

The current process can be switched into


waiting terminated state

Question 6 Which is NOT one of the main tasks of operating


Correct systems?

[Link] Page 2 of 7
Bài kiểm tra chương 1 + 2 4/5/20, 21:01

Mark 1.00 out of Select one:


1.00 Memory management
Flag question Protection and security

Storage management (such as CD, DVD,


disks, ...)

Play audio files

Question 7 Suppose a system uses SRTF scheduling


Correct algorithm. The processes information (arrival time,
duration) is P1(0,21), P2(30,10),P3(20,40),
Mark 1.00 out of
P4(40,15). Show the order (e.g. P2, P1, P3, P4) in
1.00
which the processes are run?
Remove flag

Answer:
P1, P3, P2, P4, P3

Question 8 Select the best description about what a pure


Correct computer (a computer without an operating
system) can do
Mark 1.00 out of
1.00
Select one:
Flag question
Provide applications and network connection
for users

Provide applications for users

Provide graphical user interface

CPU can do arithmetic calculation, detect


available devices such as RAM, disks, ...

Question 9 Suppose a system uses RR scheduling algorithm.


Correct The processes information (arrival time, duration) is
P1(0, 25), P3(20, 40), P2(30, 10), P4(35, 25), and
Mark 1.00 out of
the time quantum is 15. Which is the waiting time
1.00
of P2?
Flag question

Select one:
20

[Link] Page 3 of 7
Bài kiểm tra chương 1 + 2 4/5/20, 21:01

10

Question 10 Suppose a system uses SJN (or SJF) scheduling


Correct algorithm. The processes information (arrival time,
duration) is P1(0,7), P2(2,4), P3(4,1), P4(5,5). Which
Mark 1.00 out of
is the turnaround time of process P2 ?
1.00

Flag question Select one:


10

12

Question 11 Which code a CPU can understand and execute?


Correct
Select one:
Mark 1.00 out of
1.00 0110010110

Flag question [Link]();

add AX, BX

a=a+b

Question 12 Suppose a system uses SJN (or SJF) scheduling


Correct algorithm. The processes information (arrival time,
duration) is P1(0,7), P2(2,4), P3(4,1), P4(5,5).
Mark 1.00 out of
Calculate the turnaround time of P1 ?
1.00

Flag question
Answer: 7

Question 13 Suppose a system uses SJN (or SJF) CPU


Correct scheduling algorithm. The processes information
(arrival time, duration) is P1(0,7), P2(2,4), P3(4,1),
Mark 1.00 out of
1.00

[Link] Page 4 of 7
Bài kiểm tra chương 1 + 2 4/5/20, 21:01

Flag question P4(5,5). Which is the total waiting time of the


processes?

Select one:
17

16

15

18

Question 14 Which is NOT a criterion to evaluate a CPU


Correct scheduling algorithm?

Mark 1.00 out of


Select one:
1.00
Response time
Flag question
Waiting time

CPU utilization

RAM utilization

Question 15 Suppose a system uses FCFS CPU scheduling


Correct algorithm. The duration and order of processes are
P1(21), P2(10), P3(6). Which is the throughput of
Mark 1.00 out of
the system?
1.00

Flag question Select one:


0.1

0.2
0.3

0.4

Question 16 Which is INCORRECT about Shortest Remaining


Correct Time First (SRTF) scheduling algorithm?

Mark 1.00 out of


Select one:
1.00
It is also a priority scheduling algorithm
Flag question
It is the preemptive Shortest Job First (SJF)

[Link] Page 5 of 7
Bài kiểm tra chương 1 + 2 4/5/20, 21:01

algorithm

The shortest remaining time process will be


selected to run

The shortest process will be run first

Question 17 Suppose a system uses SRTF (or preemtive SJF)


Correct scheduling algorithm. The processes information
(arrival time, duration) is P1(0,24), P2(20,40),
Mark 1.00 out of
P3(30,10), P4(50,15). Show the order (e.g. P1 P3
1.00
P1 P4 ...) in which the processes are run?
Flag question

Answer:
P1 P2 P3 P2 P4 P2

Question 18 Which is INCORRECT about context switch?


Correct
Select one:
Mark 1.00 out of
1.00 The current process will be put into waiting
queue
Flag question
It is the steps of switching to run another
process
The context of the current process will be
saved

The target process will be run

Question 19 Which is NOT the purpose of virtual machine?


Correct
Select one:
Mark 1.00 out of
1.00 Allow multiple operating system to run on the
same hardware
Remove flag
Allow operating systems on the same
hardware to use some resources (such as IP,
port, domain name,...) independently

Utilize RAM and CPU more effectively

Increase the number of processes in memory

[Link] Page 6 of 7
Bài kiểm tra chương 1 + 2 4/5/20, 21:01

Question 20 Suppose a system uses RR scheduling algorithm.


Correct The processes information (arrival time, duration) is
P1(0, 25), P3(20, 40), P2(30, 10), P4(35, 25), and
Mark 1.00 out of
the time quantum is 15. Which is the response
1.00
time of P3?
Flag question

Select one:
0

10

15

Finish review

You are logged in as Lưu Lê Tuấn Đạt (Log out)


S2INT2206_9_1920

[Link] Page 7 of 7
Bài kiểm tra chương 7 + 8 6/14/20, 15:36

UETOTS Đỗ Văn Bằng

Operating systems INT2206 20 (2019-2020)


Home ▶ My courses ▶ Operating Systems ▶ S2_NT220620_20_1920 ▶ 14 June - 20 June ▶
Bài kiểm tra chương 7 + 8

Started on Sunday, 14 June 2020, 3:04 PM


QUIZ
State Finished
NAVIGATION
Completed on Sunday, 14 June 2020, 3:35 PM
1 2 3 4 Time taken 30 mins 44 secs
5 6 7 8 Marks 17.00/20.00
Grade 8.50 out of 10.00 (85%)
9 10 11 12

13 14 15 16
Question 1 A UNIX file system with the block size of 4KB;
17 18 19 20 Correct pointer size of 4 bytes; 12 direct pointers; 1
Show one page at indirect pointer; 1 double indirect pointer; and 1
Mark 1.00 out of
a time triple indirect pointer. Which is the maximum
1.00
number of index blocks the system can use to
Finish review Flag question create a file?

Select one:
3+1024+1024*1024

1024*1024

3+1024*2+1024*1024

1024*2+1024*1024

Question 2 A system uses linked index block allocation with


Incorrect the block size of 2KB; pointer size of 4 bytes.
Suppose a file has the size of 70MB. Calculate the
Mark 0.00 out of
index block number (starting from 0) of the file
1.00
offset (from 0) 8 MB.
Flag question

Answer: 35840

[Link] Page 1 of 9
Bài kiểm tra chương 7 + 8 6/14/20, 15:36

Question 3 A UNIX file system has 12 direct pointers (named


Correct from 1 to 12), 1 single indirect pointer, 1 double
indirect pointer, 1 triple indirect pointer; the block
Mark 1.00 out of
size is 1KB, and the pointer is 4 byte. Given the
1.00
logical address x=49283072. Which is the correct
Flag question information about the location of the above
address?

Select one:
DOUPLE INDIRECT POINTER
(index_block,block,offset)=(186, 245,0)

DOUPLE INDIRECT POINTER


(index_block,block,offset)=(186, 244,1023)

DOUPLE INDIRECT POINTER


(index_block,block,offset)=(187, 244,0)

DOUPLE INDIRECT POINTER


(index_block,block,offset)=(186, 244,0)

Question 4 Suppose a disk has 200 cylinders (marked from 0


Incorrect to 199); the head is currently at the cylinder 172
with the direction toward the cylinder 199; The disk
Mark 0.00 out of
request string is 98, 183, 37, 122, 14. Suppose C-
1.00
SCAN disk scheduling algorithm is used (serving
Flag question direction is from 199-0), calculate the total
numbers of cylinders the head has to move (e.g.
432)?

Answer: 387

Question 5 The disk partition is 500GB (1GB=1024MB,


Correct 1MB=1024KB, ...); the block size is 1KB. Suppose
a system uses linked list disk allocation. Which is
Mark 1.00 out of
the suitable data type of the pointer (e.g. long)?
1.00

Flag question Answer:


int

[Link] Page 2 of 9
Bài kiểm tra chương 7 + 8 6/14/20, 15:36

Question 6 A system uses extent-based disk allocation with


Correct the block size of 2KB. An extent consists of 100
blocks; a file has the size of 25.3MB. Which is the
Mark 1.00 out of
position in the form of (extent number, block
1.00
number, offset) at file offset (from 0) 12MB?
Flag question

Select one:
(extent number, block number, offset)=(61, 43,
0)

(extent number, block number, offset)=(62, 44,


0)

(extent number, block number, offset)=(62, 43,


0)

(extent number, block number, offset)=(61, 44,


0)

Question 7 Suppose a disk has 200 cylinders (marked from 0


Correct to 199); the head is currently at the cylinder 16;
Disk request string is 98, 183, 37, 122, 14.
Mark 1.00 out of
Suppose FCFS disk scheduling algorithm is used,
1.00
calculate the total cylinders the head has to move
Flag question to serve the above requests (e.g. 432)?

Answer: 506

Question 8 Suppose a disk has 200 cylinders (marked from 0


Correct to 199); the head is currently at the cylinder 153
with the direction toward the cylinder 199; The disk
Mark 1.00 out of
request string is 98, 183, 37, 122, 14. Suppose C-
1.00
LOOK disk scheduling algorithm is used (serving
Flag question direction is from 0 to 199), calculate the total
number of cylinders the head has to move (e.g.
432)?

Answer: 307

[Link] Page 3 of 9
Bài kiểm tra chương 7 + 8 6/14/20, 15:36

Question 9 Suppose a disk has 200 cylinders (marked from 0


Correct to 199); the head is currently at the cylinder 56
with the direction toward the cylinder 199; The disk
Mark 1.00 out of
request string is 98, 183, 37, 122, 14. Suppose
1.00
LOOK disk scheduling algorithm is used, calculate
Flag question the total number of cylinders the head has to move
(e.g. 432)?

Answer: 296

Question 10 Given the following RAID system in the following


Correct figure. How many hard-disks can be broken (in
ideal case) without losing the data?
Mark 1.00 out of
1.00

Flag question

Select one:
3

2
4

Question 11 A UNIX file system has 12 direct pointers (named


Correct from 1 to 12), 1 single indirect pointer, 1 double
indirect pointer, 1 triple indirect pointer; the block
Mark 1.00 out of
size is 1KB, and the pointer is 4 byte. Given the
1.00
logical address x=125958. Which is the correct
Flag question information about the location of the above
address?

Select one:
SINGLE INDIRECT POINTER, (block,offset)=
(112, 16)

SINGLE INDIRECT POINTER, (block,offset)=


(111, 6)

[Link] Page 4 of 9
Bài kiểm tra chương 7 + 8 6/14/20, 15:36

SINGLE INDIRECT POINTER, (block,offset)=


(111, 16)

SINGLE INDIRECT POINTER, (block,offset)=


(112, 6)

Question 12 A UNIX file system has 12 direct pointers (named


Correct from 1 to 12), 1 single indirect pointer, 1 double
indirect pointer, 1 triple indirect pointer; the block
Mark 1.00 out of
size is 1KB, and the pointer is 4 bytes. Given a
1.00
valid logical address x=2723668. Which is the
Flag question correct information about the location of the above
address?

Select one:
DOUPLE INDIRECT POINTER
(index_block,block,offset)=(9, 88, 852)

DOUPLE INDIRECT POINTER


(index_block,block,offset)=(8, 87, 852)

DOUPLE INDIRECT POINTER


(index_block,block,offset)=(8, 87, 852)

DOUPLE INDIRECT POINTER


(index_block,block,offset)=(9, 87, 852)

Question 13 Suppose a level-5 RAID system has 12 hard-disks


Correct of size 500 GB. How much is the performance of
the system improved?
Mark 1.00 out of
1.00
Select one:
Flag question
11 times

9 times
10 times

12 times

Question 14 Given the following RAID system in the following


Correct figure. Suppose each disk has the size of 500GB,
which is the maximum size of data can be stored
Mark 1.00 out of
on the system?

[Link] Page 5 of 9
Bài kiểm tra chương 7 + 8 6/14/20, 15:36

1.00

Flag question

Select one:
approximate 1 TB

approximate 1.5 TB
approximate 2 TB

approximate 2.5 TB

Question 15 Given the following RAID-5 system in the following


Correct figure. Suppose each disk is 500GB, which is the
maximum size of data can be stored on the
Mark 1.00 out of
system?
1.00

Flag question

Select one:
approximate 0.5 TB
approximate 1.5 TB

approximate 1 TB
approximate 1.75 TB

[Link] Page 6 of 9
Bài kiểm tra chương 7 + 8 6/14/20, 15:36

Question 16 Suppose a system uses linked list disk allocation.


Correct Which is the reason why we cannot have random
access?
Mark 1.00 out of
1.00
Select one:
Flag question
Because the information about the data block
of a file is hidden

Because it is impossible to know the location


of nth block from the first block
Because of security reason

Because the data blocks of a file is non-


contiguous

Question 17 A system uses linked list disk allocation with the


Incorrect block size of 2KB; the pointer size of 4 bytes.
Suppose a file has the size of 15.5MB. Calculate
Mark 0.00 out of
the block number (starting from 0) of the location
1.00
at file offset (from 0) 1MB?
Flag question

Answer: 512

Question 18 Which is INCORRECT about hard disk?


Correct
Select one:
Mark 1.00 out of
1.00
Rotation latency is the time waiting for the
desire sector to be at the head
Flag question
Transfer rate is the most significant factor for
disk scheduling algorithms
Transfer rate is the data rate between the disk
drive and the computer

Seek time is the time to move the head to the


desire cylinder

Question 19 A UNIX file system has 12 direct pointers (named


Correct from 1 to 12), 1 single indirect pointer, 1 double
indirect pointer, 1 triple indirect pointer; the block
Mark 1.00 out of

[Link] Page 7 of 9
Bài kiểm tra chương 7 + 8 6/14/20, 15:36

1.00 size is 4KB, and the pointer is 4 bytes. Given a


valid logical address x=2493668. Which is the
Flag question
correct information about the location of the above
address?

Select one:
SINGLE INDIRECT POINTER (block,offset)=
(598, 3300)

SINGLE INDIRECT POINTER (block,offset)=


(590, 3300)
SINGLE INDIRECT POINTER (block,offset)=
(594, 3300)
SINGLE INDIRECT POINTER (block,offset)=
(596, 3300)

Question 20 Given the following RAID system in the following


Correct figure. Suppose each disk is 500GB, which is the
maximum size of data can be stored on the
Mark 1.00 out of
system?
1.00

Flag question

Select one:
approximate 1 TB
approximate 1.5 TB

approximate 2 TB
approximate 3 TB

Finish review

[Link] Page 8 of 9
Bài kiểm tra chương 7 + 8 6/14/20, 15:36

You are logged in as Đỗ Văn Bằng (Log out)


S2_NT220620_20_1920

[Link] Page 9 of 9
UETOTS Lưu Lê Tuấn Đạt

Operating systems INT2206 9 (2019-2020)


Home ▶ My courses ▶ Operating Systems ▶ S2INT2206_9_1920 ▶ 14 June - 20 June ▶ Bài kiểm tra chương 7 +8

Started on Sunday, 14 June 2020, 3:30 PM


QUIZ NAVIGATION
State Finished
1 2 3 4 5 6 7 8 9 10 11 12 Completed on Sunday, 14 June 2020, 4:01 PM
13 14 15 16 17 18 19 20 Time taken 31 mins
Show one page at a time Marks 19.00/20.00
Grade 9.50 out of 10.00 (95%)
Finish review

Question 1 Suppose a disk has 200 cylinders (marked from 0 to 199); the head is currently at the cylinder 175 with the direction toward the cylinder 0; The disk request string is
Correct 98, 183, 37, 122, 14. Suppose SCAN disk scheduling algorithm is used, calculate the total number of cylinders the head moved (e.g. 432)?

Mark 1.00 out of


1.00 Answer: 358

Flag question

Question 2 A UNIX file system with the block size of 4KB; pointer size of 4 bytes; 12 direct pointers; 1 indirect pointer; 1 double indirect pointer; and 1 triple indirect pointer.
Correct Which is the maximum number of index blocks the system can use to create a file?

Mark 1.00 out of


Select one:
1.00
1024*1024
Flag question
1024*2+1024*1024
3+1024*2+1024*1024
3+1024+1024*1024

Question 3 Suppose a system uses RAID 5 with 4 disks, given 4 blocks in the corresponding disks (1 0 1 0) (1 1 1 0) (1 0 0 0) (0 0 1 0), calculate the parity block of the four
Correct blocks (e.g. 1 0 1 0).

Mark 1.00 out of


1.00 Answer: 1 1 1 0

Remove flag

Question 4 Suppose a disk has 200 cylinders (marked from 0 to 199); the head is currently at the cylinder 161; the disk request string is 28, 83, 137, 12, 141. Suppose FCFS
Correct disk scheduling algorithm is used, calculate the total cylinders the head has to move to serve the above requests (e.g. 432)?

Mark 1.00 out of


1.00 Answer: 496

Flag question

Question 5 The disk partition is 500GB (1GB=1024MB, 1MB=1024KB, ...); the block size is 1KB. Suppose a system uses linked list disk allocation. Which is the suitable data
Correct type of the pointer (e.g. long)?

Mark 1.00 out of


1.00 Answer: int

Flag question

Question 6 Suppose a disk has 200 cylinders (marked from 0 to 199); the head is currently at the cylinder 16; Disk request string is 98, 183, 37, 122, 14. Suppose FCFS disk
Correct scheduling algorithm is used, calculate the total cylinders the head has to move to serve the above requests (e.g. 432)?

Mark 1.00 out of


1.00 Answer: 506

Flag question

Question 7 Suppose a system uses (1-level) indexed allocation with the block size of 16KB; the pointer size of 4 bytes. Calculate the maximum file size in MB (e.g. 5) the system
Correct can create?

Mark 1.00 out of


1.00 Answer: 64

Remove flag

Question 8 A system uses 2 level indexed allocation with block size of 4KB; pointer size of 4 bytes. Suppose a file has the size of 20MB. Which is the location of file offset (from
Correct 0) 156 KB?

Mark 1.00 out of


Select one:
1.00
(index block, block offset, offset)=(1,39,0)
Flag question
(index block, block offset, offset)=(0,38,0)
(index block, block offset, offset)=(1,38,0)
(index block, block offset, offset)=(0,39,0)

Question 9 Consider a stable storage system, suppose the crash occurs before writing the first copy. Which is correct about the read protocol to recover the data?
Correct
Select one:
Mark 1.00 out of
The new data is not written, so the two copies of the data are incorrect
1.00
The two copies of old data are intact, so no need to do anything
Remove flag
Replace the first copy with the second
Erase the two copies of the old data

Question 10 Given the following RAID system in the following figure. How much is the performance of the system improved?
Correct

Mark 1.00 out of


1.00

Flag question

Select one:
3 times
4 times
2 times
5 times

Question 11 A UNIX file system has 12 direct pointers (named from 1 to 12), 1 single indirect pointer, 1 double indirect pointer, 1 triple indirect pointer; the block size is 1KB, and
Correct the pointer is 4 bytes. Given a valid logical address x=123668. Which is the correct information about the location of the above address?

Mark 1.00 out of


Select one:
1.00
SINGLE INDIRECT POINTER (block,offset)=(107, 786)
Flag question
SINGLE INDIRECT POINTER (block,offset)=(108, 788)
SINGLE INDIRECT POINTER (block,offset)=(108, 786)
SINGLE INDIRECT POINTER (block,offset)=(107, 788)

Question 12 Suppose a system uses contiguous disk allocation with the block size of 2KB. A file has the size of 12.3MB. Which is the correct location of the file offset (from 0) 1
Correct MB?

Mark 1.00 out of


Select one:
1.00
(block index, offset)=(514, 0)
Flag question
(block index, offset)=(512, 0)
(block index, offset)=(513, 0)
(block index, offset)=(511, 0)

Question 13 Suppose a system uses contiguous disk allocation with the block size of 2KB. A file has the size of 12.3MB. Which is the correct location of the file offset (from 0)
Correct 415 KB?

Mark 1.00 out of


Select one:
1.00
(block index, offset)=(207, 0)
Flag question
(block index, offset)=(208, 0)
(block index, offset)=(207, 1024)
(block index, offset)=(208, 1024)

Question 14 A UNIX file system has 12 direct pointers (named from 1 to 12), 1 single indirect pointer, 1 double indirect pointer, 1 triple indirect pointer; the block size is 1KB, and
Correct the pointer is 4 byte. Given the logical address x=6874. Which is the correct information about the location of the above address?

Mark 1.00 out of


Select one:
1.00
6 (st/nd/rd/th) DIRECT POINTER, OFFSET=730
Flag question
7 (st/nd/rd/th) DIRECT POINTER, OFFSET=720
7 (st/nd/rd/th) DIRECT POINTER, OFFSET=730
6 (st/nd/rd/th) DIRECT POINTER, OFFSET=720

Question 15 Suppose a disk has 200 cylinders (marked from 0 to 199); the head is currently at the cylinder 163; Disk request string is 98, 183, 37, 122, 14. Suppose FCFS disk
Correct scheduling algorithm is used, calculate the total cylinders the head has to move to serve the above requests (e.g. 432)?

Mark 1.00 out of


1.00 Answer: 489

Flag question

Question 16 Consider a stable storage system, suppose the crash occurs during writing the second copy. Which is correct about the read protocol to recover the data?
Correct
Select one:
Mark 1.00 out of
Second copy is bad, while the first copy is good, thus, replace the second with the first
1.00
It is impossible to recover the data
Remove flag
The first copy is good, just use this one
The second is bad, so the two copies are useless

Question 17 A UNIX file system with the block size of 4KB; pointer size of 4 bytes; 12 direct pointers; 1 indirect pointer; 1 double indirect pointer; and 1 triple indirect pointer.
Correct Which is the maximum file size when the (single) indirect pointer is used?

Mark 1.00 out of


Select one:
1.00
(12+1024)*4 KB
Remove flag
(12+1024*1024) KB
(12+1024) KB
1024 KB

Question 18 Which is INCORRECT about hard disk?


Correct
Select one:
Mark 1.00 out of
Transfer rate is the data rate between the disk drive and the computer
1.00
Rotation latency is the time waiting for the desire sector to be at the head
Remove flag
Seek time is the time to move the head to the desire cylinder
Transfer rate is the most significant factor for disk scheduling algorithms

Question 19 Suppose a system uses contiguous disk allocation with the block size of 2KB. A file has the size of 12.3MB. Which is the correct location of the file offset (from 0)
Correct 511KB?

Mark 1.00 out of


Select one:
1.00
(block index, offset)=(256, 1024)
Flag question
(block index, offset)=(255, 1024)
(block index, offset)=(255, 0)
(block index, offset)=(256, 0)

Question 20 Suppose a disk has 200 cylinders (marked from 0 to 199); the head is currently at the cylinder 53 with the direction toward the cylinder 0; The disk request string is
Incorrect 98, 183, 37, 122, 14, 124, 65, 67. Suppose SCAN disk scheduling algorithm is used, calculate the total number of cylinders the head has to move to serve the above
requests (e.g. 432)?
Mark 0.00 out of
1.00
Answer: 236
Flag question

Finish review

You are logged in as Lưu Lê Tuấn Đạt (Log out)


S2INT2206_9_1920
17/3/2019 Bài kiểm tra số 1 (lần 2)
UETOTS Lê Nam Khánh

Operating systems INT2206-5 Summer 2018-


2019
Home ► My courses ► Operating Systems ► INT2206-5 Summer 2018-2019 ► 14 March - 20 March ►
Bài kiểm tra số 1 (lần 2)

Started on Sunday, 17 March 2019, 9:03 PM


State Finished
Completed on Sunday, 17 March 2019, 9:33 PM
Time taken 29 mins 59 secs
Marks 16.00/20.00
Grade 8.00 out of 10.00 (80%)

Question 1 Suppose a system uses SJN (or SJF) scheduling algorithm. The processes information
Correct (arrival time, duration) is P1(0,7), P2(2,4), P3(4,1), P4(5,5). Calculate the response time of
process P3 ?
Mark 1.00 out of
1.00

Flag question
Answer: 3

Question 2 Suppose a system uses SJN (or SJF) scheduling algorithm. The processes information
Correct (arrival time, duration) is P1(0,7), P2(2,4), P3(4,1), P4(5,5). Calculate the turnaround time of
process P4 ?
Mark 1.00 out of
1.00
Answer: 12
Flag question

Question 3 Select the best description about the resources a computer may have
Correct
Select one:
Mark 1.00 out of
1.00 CPU, RAM, Disks

Flag question CPU, RAM and anything that can connect to the computer, such as CD, network card,
...

CPU, RAM, Disk, printer, monitor


CPU, RAM, Disk, printer

[Link] 1/5
17/3/2019 Bài kiểm tra số 1 (lần 2)
Question 4 Suppose a system uses Round Robin (RR) scheduling algorithm. The processes
Incorrect information (arrival time, duration) is P1(0,21), P2(30,10), P3(20,40), P4(40,25), and the
time quantum is 15. Show the order (e.g. P2, P1, P3, P4) in which the processes are run?
Mark 0.00 out of
1.00

Flag question
Answer: P1, P3, P2, P4

Question 5 Which is NOT a criterion to evaluate a CPU scheduling algorithm?


Correct
Select one:
Mark 1.00 out of
1.00 CPU utilization

Flag question RAM utilization


Response time

Waiting time

Question 6 Suppose a system uses SJN (or SJF) scheduling algorithm. The processes information
Correct (arrival time, duration) is P1(0,7), P2(2,4), P3(4,1), P4(5,5). Calculate the turnaround time of
P1 ?
Mark 1.00 out of
1.00
Answer: 7
Flag question

Question 7 Which is preemptive CPU scheduling algorithm?


Correct
Select one:
Mark 1.00 out of
1.00 SRTF

Flag question SJN (or SJF)

None of the above


FIFO

Question 8 Which is non-preemptive CPU scheduling algorithm?


Correct
Select one:
Mark 1.00 out of
1.00 None of the above

Flag question Round robin


FIFO

SRTF

[Link] 2/5
17/3/2019 Bài kiểm tra số 1 (lần 2)
Question 9 Which is INCORRECT about the criteria to evaluate a good CPU scheduling algorithm?
Incorrect
Select one:
Mark 0.00 out of
1.00 Maximize turnaround time

Flag question Maximize throughput


Minimize waiting time
Minimize response time

Question 10 Suppose a system uses FCFS CPU scheduling algorithm, the processes information (arrival
Correct time, duration) is P1(0,21), P2(30,10),P3(20,40), P4(40,25). Calculate the average waiting
time of the processes?
Mark 1.00 out of
1.00

Flag question
Answer: 15.75

Question 11 Which is non-preemptive CPU scheduling algorithm?


Correct
Select one:
Mark 1.00 out of
1.00 Round robin

Flag question None of the above


SRTF

FIFO

Question 12 Which is INCORRECT about Shortest Remaining Time First (SRTF) scheduling algorithm?
Incorrect
Select one:
Mark 0.00 out of
1.00 It is also a priority scheduling algorithm

Flag question The shortest remaining time process will be selected to run
The shortest process will be run first
It is the preemptive Shortest Job First (SJF) algorithm

Question 13 Which is the INCORRECT process scheduling type?


Correct
Select one:
Mark 1.00 out of
1.00 Quick-term scheduler

Flag question Short-term scheduler


Medium-term scheduler
Long-term scheduler
[Link] 3/5
17/3/2019 Bài kiểm tra số 1 (lần 2)

Question 14 Suppose a system uses Round Robin (RR) CPU scheduling algorithm, the processes
Incorrect information (arrival time, duration) is P1(0,21), P2(30,10), P3(20,40), P4(40,25), and the
time quantum is 15. Calculate the total waiting time of the processes?
Mark 0.00 out of
1.00

Flag question
Answer: 62

Question 15 Suppose a system uses SJN (or SJF) scheduling algorithm. The processes information
Correct (arrival time, duration) is P1(0,7), P2(2,4), P3(4,1), P4(5,5). Which is the turnaround time of
process P2 ?
Mark 1.00 out of
1.00
Select one:
Flag question
10

8
12

Question 16 Which is INCORRECT about batch system?


Correct
Select one:
Mark 1.00 out of
1.00 Is a simple operating system

Flag question May use FIFO mechanism


Is not like time-sharing system
Allow many people to use a computer concurrently

Question 17 Which is INCORRECT about process control block (PCB)?


Correct
Select one:
Mark 1.00 out of
1.00 It contains the state of the process

Flag question It is a data structure containing information of a process


It contains memory management information
PCBs in all operating systems are the same

Question 18 Which is INCORRECT about time-sharing system?


Correct
Select one:
Mark 1.00 out of
1.00 Only utilize CPU effectively
[Link] 4/5
UETOTS Nguyễn Tùng Lâm

Operating systems INT2206 9 (2019-2020)


Home ► My courses ► Operating Systems ► S2INT2206_9_1920 ► 26 April - 2 May ►
Kiểm tra chương 3+4

Started on Sunday, 26 April 2020, 3:03 PM


QUIZ
NAVIGATION State Finished
Completed on Sunday, 26 April 2020, 3:38 PM
1 2 3 4
Time taken 35 mins
5 6 7 8 Marks 20.00/20.00
Grade 10.00 out of 10.00 (100%)
9 10 11 12

13 14 15 16
Question 1 Given the following system information, and process P1
17 18 19 20 Correct requests (1, 0, 2) more resources:

Show one page at a Mark 1.00 out of


ALLOCATION
time 1.00
MAX AVBALABLE
Finish review Remove flag

PROCESS A B C
A B C A B
C

P0 0 1 0
7 5 3 3
3 2

P1 2 0 0
3 2 2

P2 3 0 1
9 0 2

P3 2 1 1
2 2 2
P4 0 0 2
4 3 3

Which is the correct value of FINISH and WORK vectors


during the running of Banker's algorithm which is called in
the Resource-Request algorithm (to avoid deadlock)?

Select one:
FINISH=(F, F, T, T, T), WORK=(7, 5, 2)

FINISH=(T, F, T, T, F), WORK=(5, 4, 3)

FINISH=(T, T, F, T, F), WORK=(7, 5, 3)

FINISH=(F, T, T, T, F), WORK=(7, 4, 3)

Question 2 Given the following system information:


Correct
ALLOCATION
Mark 1.00 out of
REQUEST AVBALABLE
1.00

Flag question

PROCESS A B C
A B C A B
C

P0 0 1 0
0 0 0 0
0 0

P1 2 0 0
2 0 2

P2 3 0 3
0 0 0

P3 2 1 1
1 0 0
P4 0 0 2
0 0 2

Which is correct for the deadlock detection algorithm?

Select one:
The algorithm results in FINISH=(T, T, T, T, T),
WORK=(7, 2, 6), thus there is no deadlock.

The algorithm results in FINISH=(F, T, T, T, T),


WORK=(5, 1, 2), thus there is a deadlock.

The algorithm results in FINISH=(T, T, T, T, T),


WORK=(7, 2, 4), thus there is no deadlock.

The algorithm results in FINISH=(F, T, T, T, T),


WORK=(7, 2, 5), thus there is a deadlock.

Question 3 Given the following resource allocation graph. What is the


Correct correct name of the edge from R1 to P2?

Mark 1.00 out of


1.00

Flag question

Select one:
Claim edge.
Assignment edge.

Request edge.

Question 4 Given the two bellow processes sharing three


Correct semaphores full, empty, mutex, and a buffer buff having
initial N empty slots:
Mark 1.00 out of
1.00
semaphore mutex=1, full=0, empty=
Flag question N;

int buff[N];

Write_Process:

do {

wait(empty);

wait(mutex);

Write(buff);

signal(mutex);

signal(full);

} while (TRUE);

Read_Process:

do {
wait(full);

wait(mutex);

Read(buff);

signal(mutex);

signal(empty);

} while (TRUE);

Which is correct about the method to satisfy the


constraint: the buff can be accessed (read or write) at
most by 1 process at a time?

Select one:
The semaphore mutex is used to ensure this
constraint.

The semaphore full to ensure this constraint.

The semaphore empty is used to ensure this


constraint.

Both semaphore mutex and full are used to ensure


this constraint.

Question 5 Which is the BEST description about safe state?


Correct
Select one:
Mark 1.00 out of
1.00 It is an order in which processes finish to ensure
there is no deadlock
Flag question
It is the state to make a process terminate normally

It is the state of the processes in the system

It is the state of a process

Question 6 Given the code for bounded-buffer problem:


Correct Write process P:

Mark 1.00 out of


1.00
do {
Flag question

wait(empty);

wait(mutex);

Write (item);

signal(mutex);

signal(full);

} while (TRUE);

Read process Q:

do {

wait(full);

wait(mutex);

Read(item);

signal(mutex);

signal(empty);

} while (TRUE);

What will be the problem if the initialized value of the full


variable is 1?
Select one:
the writer process can not run

the reader can read an invalid value

no problem at all

the reader process can not run

Question 7 Which is not Interprocess Communication?


Correct
Select one:
Mark 1.00 out of
1.00
A process connects to a Database Management
System (such as Microsoft SQL Server)
Flag question
A process shares a semaphore with another
process.

A process writes data to a file.

A web browser views a webpage from a web server.

Question 8 Given the code for bounded-buffer problem:


Correct Write process P:

Mark 1.00 out of


do {
1.00

Flag question

wait(empty);

wait(mutex);

Write (item);

signal(mutex);

signal(full);

} while (TRUE);

Read process Q:

do {
wait(full);

wait(mutex);

Read(item);

signal(mutex);

signal(empty);

} while (TRUE);

Which is the correct initialized value of the semaphore


variable full?

Select one:
NULL

-1

Question 9 Given the code of producer-consumer problem, where buf


Correct is the shared resource; mutex, full and empty semaphores
are initialized by 1, 0 and N, correspondingly. Suppose
Mark 1.00 out of
process P calls wait(mutex), then Q calls wait(mutex)
1.00
before P calling signal(mutex). Suppose semaphores are
Remove flag implemented using queue instead of while loop. Which of
the following is incorrect?

//Write process P:

do {

wait(empty);
wait(mutex);

Write(item,buf);

signal(mutex);

signal(full);

} while (TRUE);

//Read process Q:

do {

wait(full);

wait(mutex);

Read(item,buf);

signal(mutex);

signal(empty);

} while (TRUE);

Select one:
P will be put into the waiting list of mutex

Q will be put into the waiting list of mutex

mutex->value is -1 when wait(mutex) (called by Q)


finished
mutex->value is 0 when wait(mutex) (called by P)
finished

Question 10 Which is a CORRECT method for recovering from a


Correct deadlock?

Mark 1.00 out of


Select one:
1.00
Reboot the system
Flag question
Abort each process in the deadlock until the
deadlock disappears

Abort one of the processes in the deadlock

Provide more resources for the system

Question 11 Given the following system information:


Correct
ALLOCATION MA
Mark 1.00 out of
X AVAILABLE
1.00

Flag question

PROCESS TAPES TAPES


TAPES

P0 5
10 3

P1 2
4

P2 2
9

Which is the correct value of FINISH and W


ORK vectors during the running of Banker's
algorithm?

Select one:
FINISH=(T, F, T) WORK=(12)

FINISH=(T, F, F) WORK=(12)
FINISH=(F, T, F) WORK=(12)

FINISH=(T, T, T) WORK=(12)

Question 12 Given the code of Readers-Writers problem:


Correct Process writer P:

Mark 1.00 out of


do {
1.00

Flag question

wait(wrt);

write(data_set);

signal(wrt);

}while (TRUE);

Process reader Q:

do {

wait(mutex);

readcount++;

if (readcount ==1) wait(wr


t);

signal(mutex);

read(data_set);

wait(mutex);
readcount--;

if (readcount ==0) signal


(wrt);

signal(mutex);

} while (TRUE);

Which is the initialized value of the mutex variable in the


above algorithm?

Select one:
1

NULL

-1

Question 13 Which is CORRECT goal of progress condition of critical


Correct section?

Mark 1.00 out of


Select one:
1.00
It supports the priority of processes
Flag question
It ensures the correct use of the shared resource

It reduces the waiting time of requested processes

It makes the implementation of OS simpler

Question 14

Correct

Mark 1.00 out of


1.00

Flag question
Which is incorrect about Semaphore?

Select one:
One important statement in signal (or V) operator is
to increase the integer by 1.

Semaphore includes an integer and two atomic


operators.

wait (or P) operator is corresponding to ENTRY in


the protocol of a critical section.

wait() operator must be called before signal() in all


cases

Question 15 Given the following system information, and process P1


Correct requests (1, 0, 2) more resources:

Mark 1.00 out of


ALLOCATION
1.00
MAX AVBALABLE
Flag question

PROCESS A B C
A B C A B
C

P0 0 1 0
7 5 3 3
3 2

P1 2 0 0
3 2 2

P2 3 0 2
9 0 2

P3 2 1 1
2 2 2
P4 0 0 2
4 3 3

Which is the correct value of FINISH and WORK vectors


during the running of Banker's algorithm which is called in
the Resource-Request algorithm (to avoid deadlock)?

Select one:
FINISH=(F, F, F, T, F), WORK=(3, 3, 2)

FINISH=(F, F, F, F, F), WORK=(2, 3, 0)

FINISH=(F, F, F, F, T), WORK=(3, 3, 2)

FINISH=(F, T, F, F, F), WORK=(5, 3, 2)

Question 16 Given the following system information, and process P0


Correct requests 1 more tape:

Mark 1.00 out of


ALLOCATION MA
1.00
X AVAILABLE
Flag question

PROCESS TAPES TAPES TA


PES

P0 5
10 3

P1 2
4

P2 2
9

Which is the correct value of FINISH and WORK vectors


during the running of Banker's algorithm which is called in
the Resource-Request algorithm (to avoid deadlock)?

Select one:
FINISH=(F, F, F), WORK=(4)

FINISH=(F, T, F), WORK=(4)

FINISH=(F, F, T), WORK=(5)


FINISH=(F, T, F), WORK=(5)

Question 17 Which is not Interprocess Communication?


Correct
Select one:
Mark 1.00 out of
1.00
A web browser views a webpage from a web server.

Flag question A process reads data from a file.

A process shares a semaphore with another


process.

A process writes data to a named pipe for another


process to read (in a UNIX like platform)

Question 18 Given the following system information, and process P2


Correct requests 1 more tape:

Mark 1.00 out of


ALLOCATION MA
1.00
X AVAILABLE
Flag question

PROCESS TAPES TAPES TA


PES

P0 5
10 3

P1 2
4

P2 2
9

Which is the filnal value of FINISH vector of Banker's


algorithm which is called in the Resource-Request
algorithm (to avoid deadlock)?

Select one:
FINISH=(F, F, F), WORK=(4)

FINISH=(F, T, F), WORK=(5)

FINISH=(F, T, F), WORK=(4)

FINISH=(F, F, T), WORK=(5)


Question 19 Given the following system information, and process P1
Correct requests (1, 0, 2) more resources:

Mark 1.00 out of


ALLOCATION
1.00
MAX AVBALABLE
Flag question

PROCESS A B C
A B C A B
C

P0 0 1 0
7 5 3 3
3 2

P1 2 0 0
3 2 2

P2 3 0 2
9 0 2

P3 2 1 1
2 2 2

P4 0 0 2
4 3 3

Which is the correct value of FINISH and WORK vectors


during the running of Banker's algorithm which is called in
the Resource-Request algorithm (to avoid deadlock)?

Select one:
FINISH=(T, T, T, T, T), WORK=(10, 5, 7)

FINISH=(T, T, F, T, T), WORK=(10, 5, 7)

FINISH=(F, T, F, T, T), WORK=(10, 5, 7)

FINISH=(F, T, T, T, T), WORK=(10, 4, 7)


Question 20 Given the code of two semaphore atomic operation,
Correct where S is initialized by 3. Suppose process P1 calls
wait(S), and P2 calls wait(S) before P1 calling signal(S).
Mark 1.00 out of
Which of the following is incorrect?
1.00

Flag question void wait(semaphore *S)

S->value--;

if (S->value<0) {

Add the requested


process P into S->L;

block(P);

void signal(semaphore *S)

S->value++;

if (S->value<=0) {

remove a process P
from S->L;
wakeup(P);

Select one:
S can not be initialized by 3

P1 can continue with its next instructions

S is now a counting semaphore

P2 can continue with its next instructions

Finish review

You are logged in as Nguyễn Tùng Lâm (Log out)


S2INT2206_9_1920
UETOTS Nguyễn Thị Huệ

Operating systems INT2206 9 (2019-2020)


Home ► My courses ► Operating Systems ► S2INT2206_9_1920 ► 26 April - 2 May ►
Kiểm tra chương 3+4

Started on Sunday, 26 April 2020, 3:00 PM


State Finished
Completed on Sunday, 26 April 2020, 3:35 PM
Time taken 35 mins
Marks 20.00/20.00
Grade 10.00 out of 10.00 (100%)

Question 1 Given the following system information:


Correct
ALLOCATION MAX AVAILABLE
Mark 1.00 out of
1.00

Flag question
PROCESS TAPES TAPES TAPES

P0 5 10 3

P1 2 4

P2 2 9

Which is the correct value of FINISH and WORK vectors during the running of
Banker's algorithm?

Select one:
FINISH=(T, T, T) WORK=(12)

FINISH=(T, F, T) WORK=(12)
FINISH=(F, T, F) WORK=(12)
FINISH=(T, F, F) WORK=(12)

/
Question 2 Given the two bellow processes sharing three semaphores full, empty, mutex, and a buffer
Correct buff having initial N empty slots:

Mark 1.00 out of


semaphore mutex=1, full=0, empty=N;
1.00

Flag question

int buff[N];

Write_Process:

do {

wait(empty);

wait(mutex);

Write(buff);

signal(mutex);

signal(full);

} while (TRUE);

Read_Process:

do {

wait(full);

wait(mutex);
/
Read(buff);

signal(mutex);

signal(empty);

} while (TRUE);

Which is incorrect about semaphore full?

Select one:
The minimum value of full is -1.

The minimum value of full is 0.


The maximum value of full is N.
It is a counting semaphore.

Question 3 Which is INCORRECT about Resource Allocation Graph (RAG)?


Correct
Select one:
Mark 1.00 out of
1.00 A circle represents a process

Flag question A request edge is from a process vertex to a resource vertex

An edge from a resource vertex to a process vertex represents an instance of the


resources is allocated to the process

A rectangle represents a process

Question 4 Given the following resource allocation graph, provide the name of the edge from R2 to P2
Correct (Assignment, Claim,or Request)?

Mark 1.00 out of


1.00

Flag question

/
Answer: Assignment

Question 5 Given the following information of the system.


Correct
Pro Allocation Max
Mark 1.00 out of
Available
1.00

Remove flag

A B C A B
C A B C

/
P0 0 0 1 0 0
1 1 5 2

P1 1 0 0 1 7
5

P2 1 3 5 2 3
5

P3 0 6 3 0 6
5

P4 0 0 1 0 6
5

If P4 requests resource A B C (0 5 2), the resource request algorithm will produce:

Select one:
P0 P2 P1 P3 P4 is a safe sequence, the request can be granted immediately

P0 P1 P2 P3 P4 is a safe sequence, the request can be granted immediately


P0 P2 P3 P1 P4 is a safe sequence, the request can be granted immediately
The system is not in the safe state, the request is not granted

Question 6 Which is CORRECT about the goal of mutual exclusion condition of critical section?
Correct
Select one:
Mark 1.00 out of
1.00 It tries to utilize the shared resource more effectively

Flag question It ensures the correct use of the shared resource

It makes the implementation of operating system simpler


It supports the priority of processes

Question 7 Given the following resource allocation graph, which is correct?


Correct

Mark 1.00 out of


1.00

Remove flag /
Select one:
There is no deadlock in a multiple instance resource type system.

There is a cycle in the graph: P1-R1-P3-R2-P1, thus there is a deadlock in the system.
There is no deadlock in the system, since there is a safe sequence for processes to
run.

Question 8 Given the following resource allocation graph, provide the name of the edge from R2 to P2
Correct (Assignment, Claim,or Request)?

Mark 1.00 out of


1.00

Flag question
/
Answer: Assignment

Question 9 Given the code of two semaphore atomic operation, where S is initialized by 3. Suppose
Correct process P1 calls wait(S), and P2 calls wait(S) before P1 calling signal(S). Which of the
following is incorrect?
Mark 1.00 out of
1.00
void wait(semaphore *S)
Remove flag

S->value--;

if (S->value<0) {

/
Add the requested process P into S->L;

block(P);

void signal(semaphore *S)

S->value++;

if (S->value<=0) {

remove a process P from S->L;

wakeup(P);

Select one:
S can not be initialized by 3

S is now a counting semaphore


P2 can continue with its next instructions
/
P1 can continue with its next instructions

Question 10 Given the following information of the system.


Correct
Pro Allocation Request
Mark 1.00 out of
Available
1.00

Remove flag

A B C A B
C A B C

P0 0 1 0 0 0
0 0 0 0

P1 2 0 0 2 0
2

P2 3 0 3 0 0
0

P3 2 1 1 1 0
0

P4 0 0 2 0 0
2

The deadlock detection algorithm will indicate:

Select one:
The system is in a safe state since P0 P2 P1 P3 P4 is a safe sequence
The system is in a safe state since P0 P2 P3 P1 P4 is a safe sequence

The system is in a deadlock


The system is in a safe state since P0 P2 P1 P4 P3 is a safe sequence

Question 11 Which is incorrect about Semaphore?


Correct
/
Mark 1.00 out of Select one:
1.00 wait (or P) operator is corresponding to ENTRY in the protocol of a critical section
Flag question
Semaphore includes an integer and two atomic operators.
signal (or V) operator is corresponding to EXIT in the protocol of a critical section
We can manipulate the semaphore's integer directly.

Question 12 Which is incorrect with the disk of a computer?


Correct
Select one:
Mark 1.00 out of
1.00 This is a shared resource of the system

Remove flag There is a critical section with the disk

The disk has the ability to read/write the processes' requests concurrently, thus there is
no race condition
The operating system is responsible for managing disk - the shared resource

Question 13 Which is incorrect about the following code?


Correct
int S;
Mark 1.00 out of
1.00

Remove flag
void wait(int &S)

while (S<=0);

S--;

void signal(int &S)

/
S++;

Select one:
When the resource is in use, and another process call wait(), the CPU is waste to run
the while loop.

The while loop can be removed.


The while loop in the wait() procedure will cause the calling process to wait if the
resource is in use.
This is an implementation of semaphore.

Question 14 Which is INCORRECT about deadlock recovery handling method?


Correct
Select one:
Mark 1.00 out of
1.00 Recover the system from a deadlock

Remove flag Allow the system to enter a deadlock state

Use a deadlock detection algorithm


Never allow the system to enter a deadlock state

Question 15 Given the following resource allocation graph, provide the name of the edge from R2 to P1
Correct (Assignment, Claim,or Request)?

Mark 1.00 out of


1.00

Flag question

/
Answer: Assignment

Question 16 Which is incorrect with the main memory of a computer?


Correct
Select one:
Mark 1.00 out of
1.00 It is not possible to divide the main memory into small parts and handle the race
condition for each part instead of the whole memory
Remove flag
This is a shared resource of the system, even in the case the system has multiple
RAMs
Memory management is responsible for handling critical section with main memory

/
The operating system is responsible for handling critical section on main memory
among running processes

Question 17 Given the code of two semaphore atomic operation, where S is initialized by 1. Suppose
Correct process P1 calls wait(S), and P2 calls wait(S) before P1 calling signal(S). Which of the
following is incorrect?
Mark 1.00 out of
1.00
void wait(semaphore *S)
Flag question

S->value--;

if (S->value<0) {

Add the requested process P into S->L;

block(P);

void signal(semaphore *S)

S->value++;

if (S->value<=0) {

/
remove a process P from S->L;

wakeup(P);

Select one:
P2 is put into the waiting queue L of S

The value of S->value is -1


P1 is put into the waiting queue L of S
wakeup(P) means to resume process P

Question 18 Given the following resource allocation graph. What is the correct name of the edge from
Correct R3 to P3?

Mark 1.00 out of


1.00

Flag question

/
Select one:
Assignment edge.

Claim edge.
Request edge.

Question 19 Which is not Interprocess Communication?


Correct
Select one:
Mark 1.00 out of
1.00 A process shares a semaphore with another process.

Flag question A php page in a webserver connects to a Database Management System (such as
Microsoft SQL Server)
A web browser views a webpage from a web server.

A process writes data to a file.


/
UETOTS Nguyễn Tùng Lâm

Operating systems INT2206 9 (2019-2020)


Home ► My courses ► Operating Systems ► S2INT2206_9_1920 ► 5 April - 11 April ►
Bài kiểm tra chương 1 + 2

Started on Sunday, 5 April 2020, 8:33 PM


QUIZ
NAVIGATION State Finished
Completed on Sunday, 5 April 2020, 9:03 PM
1 2 3 4
Time taken 29 mins 56 secs
5 6 7 8 Marks 20.00/20.00
Grade 10.00 out of 10.00 (100%)
9 10 11 12

13 14 15 16
Question 1 Which is INCORRECT about process control block
17 18 19 20 Correct (PCB)?

Show one page at a Mark 1.00 out of


Select one:
time 1.00
PCBs in all operating systems are the same
Finish review Flag question
It contains memory management information

It contains the state of the process

It is a data structure containing information of a


process

Question 2 Which is the correct type of Windows XP?


Correct
Select one:
Mark 1.00 out of
1.00 Uni-programming

Flag question Multi-programming

Special purpose

Embedded

Question 3 Which is preemptive CPU scheduling algorithm?


Correct
Select one:
Mark 1.00 out of
1.00
SJN (or SJF)

Flag question RR

FIFO

None of the above


Question 4 Select the best description about what a pure computer (a
Correct computer without an operating system) can do

Mark 1.00 out of


Select one:
1.00
Provide applications and network connection for
Flag question
users

Provide applications for users

CPU can do arithmetic calculation, detect available


devices such as RAM, disks, ...

Provide graphical user interface

Question 5 Suppose a system uses RR scheduling algorithm. The


Correct processes information (arrival time, duration) is P1(0, 25),
P3(20, 40), P2(30, 10), P4(35, 25), and the time quantum
Mark 1.00 out of
is 15. Which is the response time of P3?
1.00

Flag question Select one:


5

15

10

Question 6 Suppose a system uses SJN (or SJF) scheduling


Correct algorithm. The processes information (arrival time,
duration) is P1(0,7), P2(2,4), P3(4,1), P4(5,5). Calculate
Mark 1.00 out of
the response time of P4 ?
1.00

Flag question
Answer: 7

Question 7 Which is INCORRECT about preemptive in CPU


Correct scheduling algorithms?

Mark 1.00 out of


Select one:
1.00
The current process will always be run until
Flag question
terminated

The current process can be switched into ready state

The current process can be switched into waiting


terminated state

The current process can be switched into waiting


state
Question 8 Suppose a system uses RR scheduling algorithm. The
Correct processes information (arrival time, duration) is P1(0, 25),
P3(20, 40), P2(30, 10), P4(35, 25), and the time quantum
Mark 1.00 out of
is 15. Which is the waiting time of P1?
1.00

Flag question Select one:


20

15

10

Question 9 Suppose a system uses RR scheduling algorithm. The


Correct processes information (arrival time, duration) is P1(0, 25),
P3(20, 40), P2(30, 10), P4(35, 25), and the time quantum
Mark 1.00 out of
is 15. Which is the total waiting time of the processes?
1.00

Flag question Select one:


50

60

80

70

Question 10 Select the best description about the resources a


Correct computer may have

Mark 1.00 out of


Select one:
1.00
CPU, RAM, Disk, printer, monitor
Flag question
CPU, RAM, Disks

CPU, RAM and anything that can connect to the


computer, such as CD, network card, ...

CPU, RAM, Disk, printer

Question 11

Correct

Mark 1.00 out of


1.00

Flag question
Suppose a system uses SJN (or SJF) CPU scheduling
algorithm. The processes information (arrival time,
duration) is P1(0,7), P2(2,4), P3(4,1), P4(5,5). Which is
the average waiting time of the processes?

Select one:
2

Question 12 Suppose a system uses SRTF scheduling algorithm. The


Correct processes information (arrival time, duration) is P1(0,21),
P2(30,10),P3(20,40), P4(40,15). Show the order (e.g. P2,
Mark 1.00 out of
P1, P3, P4) in which the processes are run?
1.00

Flag question
Answer: P1, P3, P2, P4, P3

Question 13 Which is INCORRECT about Shortest Remaining Time


Correct First (SRTF) scheduling algorithm?

Mark 1.00 out of


Select one:
1.00
The shortest remaining time process will be selected
Flag question
to run

It is the preemptive Shortest Job First (SJF)


algorithm

It is also a priority scheduling algorithm

The shortest process will be run first

Question 14 Suppose a system uses SJF scheduling algorithm, the


Correct processes information (arrival time, duration) is P1(0,21),
P2(30,20),P3(20,40), P4(35,15). Show the order (e.g. P2
Mark 1.00 out of
P1 P3 P4) in which the processes are run?
1.00

Flag question
Answer: P1 P3 P4 P2

Question 15 Which is non-preemptive CPU scheduling algorithm?


Correct
Select one:
Mark 1.00 out of
1.00 Round robin
Flag question
SRTF

FIFO

None of the above

Question 16 Which code a CPU can understand and execute?


Correct
Select one:
Mark 1.00 out of
1.00
[Link]();

Flag question 0110010110

a=a+b

add AX, BX

Question 17 Suppose a system uses FCFS CPU scheduling algorithm.


Correct The duration and order of the process are P1(20), P2(11),
P3(6). Which is the average waiting time of the
Mark 1.00 out of
processes?
1.00

Flag question Select one:


47

37

17

27

Question 18 Select INCORRECT description about the main tasks of


Correct operating systems

Mark 1.00 out of


Select one:
1.00
Resource allocation (for processes)
Flag question
Provide Application Programming Interface (API) for
application developers

Process management

Provide database management systems (e.g. MS


SQL Server)

Question 19 Suppose a system uses FCFS CPU scheduling algorithm,


Correct the processes information (arrival time, duration) is
P1(0,21), P2(30,10),P3(20,40), P4(40,25). Calculate the
Mark 1.00 out of
average waiting time of the processes?
1.00

Flag question
Answer: 15.75

Question 20 What language a CPU can understand?


Correct
Select one:
Mark 1.00 out of
1.00 Assembly

Flag question C++

Binary code (0110010110)

Finish review

You are logged in as Nguyễn Tùng Lâm (Log out)


S2INT2206_9_1920
UETOTS Phan Anh

Operating systems INT2206 9 (2019-2020)


Home ► My courses ► Operating Systems ► S2INT2206_9_1920 ► 31 May - 6 June ►
Bài kiểm tra chương 5 -6

Started on Monday, 1 June 2020, 9:00 PM


State Finished
Completed on Monday, 1 June 2020, 9:31 PM
Time taken 31 mins
Marks 20.00/20.00
Grade 10.00 out of 10.00 (100%)

Question 1 Suppose a paging system has the page fault rate=0.3%; the memory access time is: 250
Correct nano seconds; and the page fault handling time is: 7 milli seconds. How many times the
performance is slowdown? (eg. 87).
Mark 1.00 out of
1.00

Flag question
Answer: 85

Question 2 A system does NOT use Translation Look-aside Buffer (TLB) for address translation in
Correct paging (1 level page table). Suppose the access time of the memory is 200ms; Which is the
Effective Access Time (EAT) of the system?
Mark 1.00 out of
1.00
Select one:
Flag question
160 ms

200 ms
180 ms

400 ms

Question 3 Suppose a system uses segmentation memory allocation. The content of the segment table
Correct (limit, base) of a process is [(1000, 1400), (400, 6300), (400, 4300), (1100, 3200), (1000,
4700)]. Calculate the physical address of the reference (3, 106) (e.g. a number or invalid)?
Mark 1.00 out of
1.00
Answer: 3306
Flag question

Question 4 Given the reference string: 1, 2, 3, 4, 1, 2, 5, 1, 2, 3, 4, 5. Suppose a system uses FIFO


Correct page replacement algorithm with 3 frames. Calculate the total page faults?
/
Mark 1.00 out of
Answer: 9
1.00

Flag question

Question 5 Suppose a system uses second chance page replacement algorithm with 6 frames. The
Correct values of the reference bits of the frames are 1 1 0 1 1 0. The current position of the pointer
is at 2nd frame. When the page replacement is called, show the values of the reference bits
Mark 1.00 out of
(e.g. 1 1 0 1 1 0)?
1.00

Flag question
Answer: 1 0 0 1 1 0

Question 6 Given the 1-level page table of a process as bellow, with the frame size=1KB.
Correct
FRAME VALID
Mark 1.00 out of
1.00

Flag question
0 1291 1

1 12 0

2 5 1

3 23 1

4 132 0

Calculate the physical address of the logical address 986? (e.g. 18932
or error)

Answer: 1322970

Question 7 Suppose a system uses paging (1 level page table), and the access time of memory is 200
Correct ms. Calculate the time to access the memory from a reference (p,d)?

/
Mark 1.00 out of
Answer: 400
1.00

Flag question

Question 8 Given the 1-level page table of a process as bellow, with the frame size=1KB.
Correct
FRAME VALID
Mark 1.00 out of
1.00

Flag question
0 1291 1

1 12 0

2 5 1

3 23 1

4 132 0

Calculate the physical address of the logical address 3782? (e.g. 1893
2 or error)

Answer: 24262

Question 9 Suppose a paging system has the page fault rate=0.08%; the memory access time is: 150
Correct nano seconds; and the page fault handling time is: 7 milli seconds. How many times the
performance is slowdown? (eg. 87).
Mark 1.00 out of
1.00
Answer: 38
Flag question

Question 10 Suppose a system uses paging (1 level page table) with Translation Look-aside Buffer
Correct (TLB) for address translation. Which statement is INCORRECT?

Select one:
/
Mark 1.00 out of The physical address is f*frame_size+d, where f is the corresponding frame of p
1.00
It always takes at least a TLB access and a 2 memory accesses for a reference (p, d)
Remove flag

A reference has the form of (p,d)


It takes at least a TLB access and a memory access for a reference (p, d)

Question 11 Suppose a system uses paging on demand without a Translation Look-aside Table (TLB).
Correct The memory access time is 200 nano seconds; page-fault service time is 7 miliseconds;
page-fault rate is 1/1000. Which is the Effective Access Time (EAT) of the system?
Mark 1.00 out of
1.00
Select one:
Flag question
9.2 micro seconds
6.2 micro seconds

8.2 micro seconds


7.2 micro seconds

Question 12 Suppose a system uses paging (1-level page table) with the frame size of 4KB; the address
Correct register is 32bits. Which is the CORRECT split of the address register?

Mark 1.00 out of


Select one:
1.00
(page-offset)=(22:10)
Flag question
(page-offset)=(20:12)

(page-offset)=(19:13)
(page-offset)=(21:11)

Question 13 Suppose a paging system has the page fault rate=0.3%; the memory access time is: 200
Correct nano seconds; and the page fault handling time is: 7 milli seconds. How many times the
performance is slowdown? (eg. 87).
Mark 1.00 out of
1.00
Answer: 106
Flag question

Question 14 A system uses proportional memory allocation method. There are 3 processes in the
Correct system: P1, P2, P3 with the size of 138KB, 96KB, and 164KB, correspondingly. Suppose
the memory size is 180KB, and the frame size is 2KB, calculate the number of frames
Mark 1.00 out of
allocated for processes P1, P2, P3 (e.g. 23:34:12)?
1.00

Flag question
Answer: 31:22:37

/
Question 15 Suppose a system uses segmentation memory allocation. The content of the segment table
Correct (limit, base) of a process is [(1000, 1400), (400, 6300), (400, 4300), (1100, 3200), (1000,
4700)]. Calculate the physical address of the reference (4, 106) (e.g. a number or invalid)?
Mark 1.00 out of
1.00

Flag question
Answer: 4806

Question 16 Which is INCORRECT about thrashing?


Correct
Select one:
Mark 1.00 out of
1.00 LRU page replacement algorithm can prevent thrashing from occurring

Remove flag It is the situation where page fault rate is high, the time for serving page faults is high
CPU utilization is low when thrashing occurs

Working set model can prevent thrashing from occurring

Question 17 Suppose a system uses segmentation memory allocation. The content of the segment table
Correct (limit, base) of a process is [(1000, 1400), (400, 6300), (400, 4300), (1100, 3200), (1000,
4700)]. Calculate the physical address of the reference (1, 402) (e.g. a number or invalid)?
Mark 1.00 out of
1.00
Answer: invalid
Flag question

Question 18 Suppose a paging system has the page fault rate=0.08%; the memory access time is: 320
Correct nano seconds; and the page fault handling time is: 7 milli seconds. How many times the
performance is slowdown? (eg. 87).
Mark 1.00 out of
1.00
Answer: 18
Flag question

Question 19 Given the reference string: 7 0 1 2 0 3 0 4 2 3 0 3 2 1 2 0 1 7 0 1. Suppose the system uses


Correct Least Recently Used (LRU) page replacement algorithm with 3 frames. Calculate the total
page faults?
Mark 1.00 out of
1.00

Flag question
Answer: 12

Question 20 Given the 1-level page table of a process as bellow, with the frame size=1KB.
Correct
FRAME VALID
Mark 1.00 out of
1.00

/
Bài kiểm tra chương 1 + 2 4/5/20, 21:01

UETOTS Lưu Lê Tuấn Đạt

Operating systems INT2206 9 (2019-2020)


Home ▶ My courses ▶ Operating Systems ▶ S2INT2206_9_1920 ▶ 5 April - 11 April ▶
Bài kiểm tra chương 1 + 2

Started on Sunday, 5 April 2020, 8:30 PM


QUIZ
NAVIGATION State Finished
Completed on Sunday, 5 April 2020, 9:00 PM
1 2 3 4
Time taken 30 mins 1 sec
5 6 7 8 Marks 20.00/20.00
Grade 10.00 out of 10.00 (100%)
9 10 11 12

13 14 15 16
Question 1 Suppose a system uses SJN (or SJF) scheduling
17 18 19 20 Correct algorithm. The processes information (arrival time,
Show one page at duration) is P1(0,7), P2(2,4), P3(4,1), P4(5,5).
Mark 1.00 out of
a time Calculate the response time of P4 ?
1.00

Finish review Flag question


Answer: 7

Question 2 Which is INCORRECT about an application?


Correct
Select one:
Mark 1.00 out of
1.00
It serves a certain task for users or
programmers
Flag question
It can be organized into multiple files on disks.

A database management system is an


example of an application

It controls I/O (such as read/write operations


on disks)

Question 3 Suppose a system uses RR scheduling algorithm.


Correct The processes information (arrival time, duration) is
P1(0, 25), P3(20, 40), P2(30, 10), P4(35, 25), and
Mark 1.00 out of
1.00

[Link] Page 1 of 7
Bài kiểm tra chương 1 + 2 4/5/20, 21:01

Flag question the time quantum is 15. Which is the running order
of the processes?

Select one:
P1, P3, P2, P4, P3, P4, P3

P1, P1, P2, P3, P4, P3, P4, P3

P1, P1, P3, P2, P3, P4, P3, P4

P1, P1, P3, P2, P4, P3, P4, P3

Question 4 Suppose a system uses RR scheduling algorithm.


Correct The processes information (arrival time, duration) is
P1(0, 25), P3(20, 40), P2(30, 10), P4(35, 25), and
Mark 1.00 out of
the time quantum is 15. Which is the response
1.00
time of P4?
Flag question

Select one:
10

20

15

Question 5 Which is INCORRECT about preemptive in CPU


Correct scheduling algorithms?

Mark 1.00 out of


Select one:
1.00
The current process will always be run until
Flag question
terminated

The current process can be switched into


ready state

The current process can be switched into


waiting state

The current process can be switched into


waiting terminated state

Question 6 Which is NOT one of the main tasks of operating


Correct systems?

[Link] Page 2 of 7
Bài kiểm tra chương 1 + 2 4/5/20, 21:01

Mark 1.00 out of Select one:


1.00 Memory management
Flag question Protection and security

Storage management (such as CD, DVD,


disks, ...)

Play audio files

Question 7 Suppose a system uses SRTF scheduling


Correct algorithm. The processes information (arrival time,
duration) is P1(0,21), P2(30,10),P3(20,40),
Mark 1.00 out of
P4(40,15). Show the order (e.g. P2, P1, P3, P4) in
1.00
which the processes are run?
Remove flag

Answer:
P1, P3, P2, P4, P3

Question 8 Select the best description about what a pure


Correct computer (a computer without an operating
system) can do
Mark 1.00 out of
1.00
Select one:
Flag question
Provide applications and network connection
for users

Provide applications for users

Provide graphical user interface

CPU can do arithmetic calculation, detect


available devices such as RAM, disks, ...

Question 9 Suppose a system uses RR scheduling algorithm.


Correct The processes information (arrival time, duration) is
P1(0, 25), P3(20, 40), P2(30, 10), P4(35, 25), and
Mark 1.00 out of
the time quantum is 15. Which is the waiting time
1.00
of P2?
Flag question

Select one:
20

[Link] Page 3 of 7
Bài kiểm tra chương 1 + 2 4/5/20, 21:01

10

Question 10 Suppose a system uses SJN (or SJF) scheduling


Correct algorithm. The processes information (arrival time,
duration) is P1(0,7), P2(2,4), P3(4,1), P4(5,5). Which
Mark 1.00 out of
is the turnaround time of process P2 ?
1.00

Flag question Select one:


10

12

Question 11 Which code a CPU can understand and execute?


Correct
Select one:
Mark 1.00 out of
1.00 0110010110

Flag question [Link]();

add AX, BX

a=a+b

Question 12 Suppose a system uses SJN (or SJF) scheduling


Correct algorithm. The processes information (arrival time,
duration) is P1(0,7), P2(2,4), P3(4,1), P4(5,5).
Mark 1.00 out of
Calculate the turnaround time of P1 ?
1.00

Flag question
Answer: 7

Question 13 Suppose a system uses SJN (or SJF) CPU


Correct scheduling algorithm. The processes information
(arrival time, duration) is P1(0,7), P2(2,4), P3(4,1),
Mark 1.00 out of
1.00

[Link] Page 4 of 7
Bài kiểm tra chương 1 + 2 4/5/20, 21:01

Flag question P4(5,5). Which is the total waiting time of the


processes?

Select one:
17

16

15

18

Question 14 Which is NOT a criterion to evaluate a CPU


Correct scheduling algorithm?

Mark 1.00 out of


Select one:
1.00
Response time
Flag question
Waiting time

CPU utilization

RAM utilization

Question 15 Suppose a system uses FCFS CPU scheduling


Correct algorithm. The duration and order of processes are
P1(21), P2(10), P3(6). Which is the throughput of
Mark 1.00 out of
the system?
1.00

Flag question Select one:


0.1

0.2
0.3

0.4

Question 16 Which is INCORRECT about Shortest Remaining


Correct Time First (SRTF) scheduling algorithm?

Mark 1.00 out of


Select one:
1.00
It is also a priority scheduling algorithm
Flag question
It is the preemptive Shortest Job First (SJF)

[Link] Page 5 of 7
Bài kiểm tra chương 1 + 2 4/5/20, 21:01

algorithm

The shortest remaining time process will be


selected to run

The shortest process will be run first

Question 17 Suppose a system uses SRTF (or preemtive SJF)


Correct scheduling algorithm. The processes information
(arrival time, duration) is P1(0,24), P2(20,40),
Mark 1.00 out of
P3(30,10), P4(50,15). Show the order (e.g. P1 P3
1.00
P1 P4 ...) in which the processes are run?
Flag question

Answer:
P1 P2 P3 P2 P4 P2

Question 18 Which is INCORRECT about context switch?


Correct
Select one:
Mark 1.00 out of
1.00 The current process will be put into waiting
queue
Flag question
It is the steps of switching to run another
process
The context of the current process will be
saved

The target process will be run

Question 19 Which is NOT the purpose of virtual machine?


Correct
Select one:
Mark 1.00 out of
1.00 Allow multiple operating system to run on the
same hardware
Remove flag
Allow operating systems on the same
hardware to use some resources (such as IP,
port, domain name,...) independently

Utilize RAM and CPU more effectively

Increase the number of processes in memory

[Link] Page 6 of 7
Bài kiểm tra chương 1 + 2 4/5/20, 21:01

Question 20 Suppose a system uses RR scheduling algorithm.


Correct The processes information (arrival time, duration) is
P1(0, 25), P3(20, 40), P2(30, 10), P4(35, 25), and
Mark 1.00 out of
the time quantum is 15. Which is the response
1.00
time of P3?
Flag question

Select one:
0

10

15

Finish review

You are logged in as Lưu Lê Tuấn Đạt (Log out)


S2INT2206_9_1920

[Link] Page 7 of 7
UETOTS Nguyễn Thị Huệ

Operating systems INT2206 9 (2019-2020)


Home ► My courses ► Operating Systems ► S2INT2206_9_1920 ► 5 April - 11 April ►
Bài kiểm tra chương 1 + 2

Started on Sunday, 5 April 2020, 8:34 PM


State Finished
Completed on Sunday, 5 April 2020, 9:03 PM
Time taken 29 mins 52 secs
Marks 20.00/20.00
Grade 10.00 out of 10.00 (100%)

Question 1 Suppose a system uses Round Robin (RR) CPU scheduling algorithm, the processes
Correct information (arrival time, duration) is P1(0,21), P2(30,10), P3(20,40), P4(40,25), and the
time quantum is 15. Calculate the total waiting time of the processes?
Mark 1.00 out of
1.00

Remove flag
Answer: 63

Question 2 Which is INCORRECT about time-sharing system?


Correct
Select one:
Mark 1.00 out of
1.00 Only utilize CPU effectively

Flag question It is also applicable for multiple CPU hardware

Utilize resources more effectively

Allow several processes to run on a single CPU hardware

Question 3 Which is the correct type of Windows XP?


Correct
Select one:
Mark 1.00 out of
1.00 Uni-programming

Flag question Multi-programming


Special purpose

Embedded

/
Question 4 Suppose a system uses SJN (or SJF) scheduling algorithm. The processes information
Correct (arrival time, duration) is P1(0,7), P2(2,4), P3(4,1), P4(5,5). Calculate the response time of
P4 ?
Mark 1.00 out of
1.00

Remove flag
Answer: 7

Question 5 Suppose a system uses FCFS CPU scheduling algorithm. The duration and order of
Correct processes are P1(21), P2(10), P3(6). Which is the throughput of the system?

Mark 1.00 out of


Select one:
1.00
0.3
Remove flag
0.4
0.2

0.1

Question 6 Suppose a system uses SRTF scheduling algorithm. The processes information (arrival
Correct time, duration) is P1(0,21), P2(30,10),P3(20,40), P4(40,15). Show the order (e.g. P2, P1,
P3, P4) in which the processes are run?
Mark 1.00 out of
1.00
Answer: P1, P3, P2, P4, P3
Remove flag

Question 7 Which is INCORRECT about batch system?


Correct
Select one:
Mark 1.00 out of
1.00 Is not like time-sharing system

Flag question May use FIFO mechanism

Is a simple operating system


Allow many people to use a computer concurrently

Question 8 Suppose a system uses RR scheduling algorithm. The processes information (arrival time,
Correct duration) is P1(0, 25), P3(20, 40), P2(30, 10), P4(35, 25), and the time quantum is 15.
Which is the response time of P1?
Mark 1.00 out of
1.00
Select one:
Remove flag
0
10
15

20 /
Question 9 Suppose a system uses SJN (or SJF) CPU scheduling algorithm. The processes
Correct information (arrival time, duration) is P1(0,7), P2(2,4), P3(4,1), P4(5,5). Which is the total
waiting time of the processes?
Mark 1.00 out of
1.00
Select one:
Remove flag
17
16
18

15

Question 10 Suppose a system uses SJF scheduling algorithm, the processes information (arrival time,
Correct duration) is P1(0,21), P2(30,20),P3(20,40), P4(35,15). Show the order (e.g. P2 P1 P3 P4) in
which the processes are run?
Mark 1.00 out of
1.00
Answer: P1 P3 P4 P2
Remove flag

Question 11 Which is NOT one of the main tasks of operating systems?


Correct
Select one:
Mark 1.00 out of
1.00 Memory management

Flag question Storage management (such as CD, DVD, disks, ...)

Protection and security


Play audio files

Question 12 Suppose a system uses SJN (or SJF) scheduling algorithm. The processes information
Correct (arrival time, duration) is P1(0,7), P2(2,4), P3(4,1), P4(5,5). Calculate the response time of
process P3 ?
Mark 1.00 out of
1.00
Answer: 3
Remove flag

Question 13 Which is the BEST reason why we need process scheduling?


Correct
Select one:
Mark 1.00 out of
1.00 Because the system has many processes to run and they need to be treated equally

Flag question Many reasons: Many processes; Utilize system resources more effectively; Don’t let
users wait; ...
/
Because we need to utilize the memory more effectively

Because the system has many processes to run

Question 14 Suppose a system uses RR scheduling algorithm. The processes information (arrival time,
Correct duration) is P1(0, 25), P3(20, 40), P2(30, 10), P4(35, 25), and the time quantum is 15.
Which is the waiting time of P2?
Mark 1.00 out of
1.00
Select one:
Remove flag
5

20
0
10

Question 15 Suppose a system uses SJN (or SJF) scheduling algorithm. The processes information
Correct (arrival time, duration) is P1(0,7), P2(2,4), P3(4,1), P4(5,5). Calculate the turnaround time of
P1 ?
Mark 1.00 out of
1.00

Remove flag
Answer: 7

Question 16 Which is the CORRECT statement about a program?


Correct
Select one:
Mark 1.00 out of
1.00 Is a compiled (e.g binary code) application

Flag question Is a library


Is a process

Is a part of the operating system

Question 17 Suppose a system uses RR scheduling algorithm. The processes information (arrival time,
Correct duration) is P1(0, 25), P3(20, 40), P2(30, 10), P4(35, 25), and the time quantum is 15.
Which is the throughput of P1?
Mark 1.00 out of
1.00
Select one:
Remove flag
0.04

0.02
0.01

0.03

/
Question 18 Which is the CORRECT relationship among process, program and application concepts?
Correct
Select one:
Mark 1.00 out of
1.00 An application may have several programs, a program may have several processes

Flag question An application may have several processes, a process may have several programs
An application has only one program, a program has only one process
An application may have several programs, a program has only one process

Question 19 Which is CORRECT about the structure of a process?


Correct
Select one:
Mark 1.00 out of
1.00 Stack, heap, code (text)

Flag question Data, code (text)

Heap, data, code (text)


Stack, heap, data, code (text), program counter, and addtional information

Question 20 Which is NOT an operating system type?


Correct
Select one:
Mark 1.00 out of
1.00 Embedded system

Flag question Batch system

Sequential system,
Uni-programming operating system

Finish review

QUIZ NAVIGATION

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
Show one page at a time
Finish review

You are logged in as Nguyễn Thị Huệ (Log out)


S2INT2206_9_1920

/
UETOTS Phan Công Hậu

Operating systems INT2206 9 (2019-2020)


Home ► My courses ► Operating Systems ► S2INT2206_9_1920 ► 5 April - 11 April ► Bài kiểm tra chương 1 + 2

Started on Sunday, 5 April 2020, 8:32 PM


QUIZ NAVIGATION
State Finished
1 2 3 4 5 6 7 Completed on Sunday, 5 April 2020, 8:57 PM
8 9 10 11 12 13 14 Time taken 25 mins 42 secs
Marks 20.00/20.00
15 16 17 18 19 20
Grade 10.00 out of 10.00 (100%)
Show one page at a time
Finish review Question 1 Which is INCORRECT about First Comes First Served (FCFS) CPU scheduling algorithm?
Correct
Select one:
Mark 1.00 out of
1.00 A process can be switched from running into waiting state

Flag question Once a process is executed, it can only be switched into terminated state

A process cannot be switched into ready state


It is a non-preemptive algorithm

Question 2 Suppose a system uses RR scheduling algorithm. The processes information (arrival time,
Correct duration) is P1(0, 25), P3(20, 40), P2(30, 10), P4(35, 25), and the time quantum is 15. Which is
the response time of P2?
Mark 1.00 out of
1.00
Select one:
Flag question
10
20

15

Question 3 Which is the CORRECT relationship among process, program and application concepts?
Correct
Select one:
Mark 1.00 out of
1.00 An application may have several processes, a process may have several programs

Flag question An application may have several programs, a program may have several processes

An application may have several programs, a program has only one process
An application has only one program, a program has only one process

Question 4 Which is INCORRECT about the states of a process?


Correct
Select one:
Mark 1.00 out of
1.00 A process can be switched from running into ready state

Flag question Valid states are new, ready, running, waiting and terminated

The number of states of a process is the same in all operating systems

A process can be switched from running into waiting state

Question 5 Suppose a system uses FCFS CPU scheduling algorithm. The duration and order of the process
Correct are P1(20), P2(11), P3(6). Which is the average waiting time of the processes?

Mark 1.00 out of


Select one:
1.00
27
Flag question
17
47

37

Question 6 Which is NOT a criterion to evaluate a CPU scheduling algorithm?


/
Correct Select one:
Mark 1.00 out of Waiting time
1.00
RAM utilization
Flag question
CPU utilization

Response time

Question 7 Which is NOT the purpose of virtual machine?


Correct
Select one:
Mark 1.00 out of
1.00 Allow operating systems on the same hardware to use some resources (such as IP, port,
domain name,...) independently
Flag question
Allow multiple operating system to run on the same hardware

Utilize RAM and CPU more effectively


Increase the number of processes in memory

Question 8 Suppose a system uses SJF scheduling algorithm, the processes information (arrival time,
Correct duration) is P1(0,21), P2(30,20),P3(20,40), P4(35,15). Show the order (e.g. P2 P1 P3 P4) in
which the processes are run?
Mark 1.00 out of
1.00
Answer: P1 P3 P4 P2
Flag question

Question 9 Suppose a system uses Round Robin (RR) CPU scheduling algorithm, the processes information
Correct (arrival time, duration) is P1(0,21), P2(30,10), P3(20,40), P4(40,25), and the time quantum is 15.
Calculate the total waiting time of the processes?
Mark 1.00 out of
1.00
Answer: 63
Flag question

Question 10 Suppose a system uses SJN (or SJF) scheduling algorithm. The processes information (arrival
Correct time, duration) is P1(0,7), P2(2,4), P3(4,1), P4(5,5). Calculate the response time of P1 ?

Mark 1.00 out of


1.00 Answer: 0

Flag question

Question 11 Which is CORRECT about a process?


Correct
Select one:
Mark 1.00 out of
1.00 Is a library

Flag question Is a file on hard disk


Is an application

Is an instance of a program

Question 12 Suppose a system uses SJN (or SJF) CPU scheduling algorithm. The processes information
Correct (arrival time, duration) is P1(0,7), P2(2,4), P3(4,1), P4(5,5). Which is the total waiting time of the
processes?
Mark 1.00 out of
1.00
Select one:
Flag question
18

15

16
17

Question 13 Suppose a system uses SJN (or SJF) scheduling algorithm. The processes information (arrival
Correct time, duration) is P1(0,7), P2(2,4), P3(4,1), P4(5,5). Calculate the response time of process P3 ?

Mark 1.00 out of


1.00 Answer: 3
Flag question

/
Question 14 Which module should NOT be implemented in the kernel of operating systems?
Correct
Select one:
Mark 1.00 out of
1.00 Process management module

Flag question Device drivers (such as network card device drivers)

Networking module

Memory management module

Question 15 Which is INCORRECT about time-sharing system?


Correct
Select one:
Mark 1.00 out of
1.00 Allow several processes to run on a single CPU hardware

Flag question It is also applicable for multiple CPU hardware


Only utilize CPU effectively

Utilize resources more effectively

Question 16 Which is INCORRECT about Shortest Remaining Time First (SRTF) scheduling algorithm?
Correct
Select one:
Mark 1.00 out of
1.00 The shortest process will be run first

Flag question It is also a priority scheduling algorithm

The shortest remaining time process will be selected to run

It is the preemptive Shortest Job First (SJF) algorithm

Question 17 Suppose a system uses FCFS scheduling algorithm, the processes information (arrival time,
Correct duration) is P1(0,21), P2(30,10),P3(20,40), P4(50,15). Show the order in which the processes are
run (e.g. P2 P1 P3 P4)?
Mark 1.00 out of
1.00
Answer: P1 P3 P2 P4
Flag question

Question 18 Which is NOT one of the main tasks of operating systems?


Correct
Select one:
Mark 1.00 out of
1.00 Play audio files

Flag question Memory management

Storage management (such as CD, DVD, disks, ...)


Protection and security

Question 19 Suppose a system uses SJN (or SJF) scheduling algorithm. The processes information (arrival
Correct time, duration) is P1(0,7), P2(2,4), P3(4,1), P4(5,5). Which is the turnaround time of process P2 ?

Mark 1.00 out of


Select one:
1.00
6
Flag question
12

10

Question 20 Select INCORRECT description about the main tasks of operating systems
Correct
Select one:
Mark 1.00 out of
1.00 Provide database management systems (e.g. MS SQL Server)

Flag question Process management

Provide Application Programming Interface (API) for application developers

Resource allocation (for processes)

/
Finish review

You are logged in as Phan Công Hậu (Log out)


S2INT2206_9_1920

/
UETOTS Phan Anh

Operating systems INT2206 9 (2019-2020)


Home ► My courses ► Operating Systems ► S2INT2206_9_1920 ► 5 April - 11 April ►
Bài kiểm tra chương 1 + 2

Started on Sunday, 5 April 2020, 8:30 PM


State Finished
Completed on Sunday, 5 April 2020, 9:00 PM
Time taken 30 mins
Marks 20.00/20.00
Grade 10.00 out of 10.00 (100%)

Question 1 Which is NOT a criterion to evaluate a CPU scheduling algorithm?


Correct
Select one:
Mark 1.00 out of
1.00 Response time

Flag question CPU utilization


RAM utilization
Waiting time

Question 2 Which is the BEST reason why we need process scheduling?


Correct
Select one:
Mark 1.00 out of
1.00 Because the system has many processes to run

Flag question Many reasons: Many processes; Utilize system resources more effectively; Don’t let
users wait; ...

Because the system has many processes to run and they need to be treated equally
Because we need to utilize the memory more effectively

Question 3 Which code a CPU can understand and execute?


Correct
Select one:
Mark 1.00 out of
1.00 a=a+b

Remove flag 0110010110

[Link]();
add AX, BX
/
Question 4 Suppose a system uses RR scheduling algorithm. The processes information (arrival time,
Correct duration) is P1(0, 25), P3(20, 40), P2(30, 10), P4(35, 25), and the time quantum is 15.
Which is the waiting time of P1?
Mark 1.00 out of
1.00
Select one:
Flag question
15

20
10
0

Question 5 Which is the INCORRECT process scheduling type?


Correct
Select one:
Mark 1.00 out of
1.00 Short-term scheduler

Flag question Medium-term scheduler

Quick-term scheduler
Long-term scheduler

Question 6 Which is the correct type of Windows XP?


Correct
Select one:
Mark 1.00 out of
1.00 Embedded

Flag question Special purpose

Uni-programming
Multi-programming

Question 7 Which is INCORRECT about multi-user operating systems?


Correct
Select one:
Mark 1.00 out of
1.00 Allow each user to run several processes at the same time

Flag question It is the same as a multi-programming operating system

Allow several processes to run on a single CPU hardware


Allow several people to use the computer at the same time

Question 8 Select the best description about operating systems for computers
Correct
Select one:
/
Mark 1.00 out of They are applications
1.00
They are libraries
Flag question
They are software that are between users and computer hardware
They are firmware

Question 9 Which is INCORRECT about an application?


Correct
Select one:
Mark 1.00 out of
1.00 A database management system is an example of an application

Flag question It can be organized into multiple files on disks.

It serves a certain task for users or programmers


It controls I/O (such as read/write operations on disks)

Question 10 Suppose a system uses FCFS CPU scheduling algorithm. The duration and order of the
Correct process are P1(20), P2(11), P3(6). Which is the average waiting time of the processes?

Mark 1.00 out of


Select one:
1.00
47
Flag question
17

27
37

Question 11 Suppose a system uses SJN (or SJF) scheduling algorithm. The processes information
Correct (arrival time, duration) is P1(0,7), P2(2,4), P3(4,1), P4(5,5). Calculate the turnaround time of
P1 ?
Mark 1.00 out of
1.00
Answer: 7
Flag question

Question 12 Which is NOT the purpose of virtual machine?


Correct
Select one:
Mark 1.00 out of
1.00 Increase the number of processes in memory

Remove flag Allow operating systems on the same hardware to use some resources (such as IP,
port, domain name,...) independently
Utilize RAM and CPU more effectively
Allow multiple operating system to run on the same hardware

/
Question 13 Which is INCORRECT about Shortest Remaining Time First (SRTF) scheduling algorithm?
Correct
Select one:
Mark 1.00 out of
1.00 It is also a priority scheduling algorithm

Flag question The shortest remaining time process will be selected to run
The shortest process will be run first
It is the preemptive Shortest Job First (SJF) algorithm

Question 14 What language a CPU can understand?


Correct
Select one:
Mark 1.00 out of
1.00 Assembly

Remove flag Binary code (0110010110)

C++
C

Question 15 Suppose a system uses RR scheduling algorithm. The processes information (arrival time,
Correct duration) is P1(0, 25), P3(20, 40), P2(30, 10), P4(35, 25), and the time quantum is 15.
Which is the response time of P1?
Mark 1.00 out of
1.00
Select one:
Flag question
10
0

20
15

Question 16 Which is NOT an operating system type?


Correct
Select one:
Mark 1.00 out of
1.00 Batch system

Flag question Uni-programming operating system

Embedded system
Sequential system,

Question 17 Which is INCORRECT about context switch?


Correct
Select one:
/
Mark 1.00 out of It is the steps of switching to run another process
1.00
The current process will be put into waiting queue
Flag question
The target process will be run
The context of the current process will be saved

Question 18 Which is non-preemptive CPU scheduling algorithm?


Correct
Select one:
Mark 1.00 out of
1.00 SRTF

Flag question FIFO

Round robin
None of the above

Question 19 Which is NOT an operating system structure?


Correct
Select one:
Mark 1.00 out of
1.00 Modularity

Flag question Object-oriented

Layered
Micro-kernel

Question 20 Suppose a system uses FCFS CPU scheduling algorithm, the processes information (arrival
Correct time, duration) is P1(0,21), P2(30,10),P3(20,40), P4(40,25). Calculate the average waiting
time of the processes?
Mark 1.00 out of
1.00
Answer: 15.75
Flag question

Finish review

QUIZ NAVIGATION

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
Show one page at a time
Finish review

/
You are logged in as Phan Anh (Log out)
S2INT2206_9_1920

/
17/3/2019 Bài kiểm tra số 1 (lần 2)
UETOTS Lê Nam Khánh

Operating systems INT2206-5 Summer 2018-


2019
Home ► My courses ► Operating Systems ► INT2206-5 Summer 2018-2019 ► 14 March - 20 March ►
Bài kiểm tra số 1 (lần 2)

Started on Sunday, 17 March 2019, 9:03 PM


State Finished
Completed on Sunday, 17 March 2019, 9:33 PM
Time taken 29 mins 59 secs
Marks 16.00/20.00
Grade 8.00 out of 10.00 (80%)

Question 1 Suppose a system uses SJN (or SJF) scheduling algorithm. The processes information
Correct (arrival time, duration) is P1(0,7), P2(2,4), P3(4,1), P4(5,5). Calculate the response time of
process P3 ?
Mark 1.00 out of
1.00

Flag question
Answer: 3

Question 2 Suppose a system uses SJN (or SJF) scheduling algorithm. The processes information
Correct (arrival time, duration) is P1(0,7), P2(2,4), P3(4,1), P4(5,5). Calculate the turnaround time of
process P4 ?
Mark 1.00 out of
1.00
Answer: 12
Flag question

Question 3 Select the best description about the resources a computer may have
Correct
Select one:
Mark 1.00 out of
1.00 CPU, RAM, Disks

Flag question CPU, RAM and anything that can connect to the computer, such as CD, network card,
...

CPU, RAM, Disk, printer, monitor


CPU, RAM, Disk, printer

[Link] 1/5
17/3/2019 Bài kiểm tra số 1 (lần 2)
Question 4 Suppose a system uses Round Robin (RR) scheduling algorithm. The processes
Incorrect information (arrival time, duration) is P1(0,21), P2(30,10), P3(20,40), P4(40,25), and the
time quantum is 15. Show the order (e.g. P2, P1, P3, P4) in which the processes are run?
Mark 0.00 out of
1.00

Flag question
Answer: P1, P3, P2, P4

Question 5 Which is NOT a criterion to evaluate a CPU scheduling algorithm?


Correct
Select one:
Mark 1.00 out of
1.00 CPU utilization

Flag question RAM utilization


Response time

Waiting time

Question 6 Suppose a system uses SJN (or SJF) scheduling algorithm. The processes information
Correct (arrival time, duration) is P1(0,7), P2(2,4), P3(4,1), P4(5,5). Calculate the turnaround time of
P1 ?
Mark 1.00 out of
1.00
Answer: 7
Flag question

Question 7 Which is preemptive CPU scheduling algorithm?


Correct
Select one:
Mark 1.00 out of
1.00 SRTF

Flag question SJN (or SJF)

None of the above


FIFO

Question 8 Which is non-preemptive CPU scheduling algorithm?


Correct
Select one:
Mark 1.00 out of
1.00 None of the above

Flag question Round robin


FIFO

SRTF

[Link] 2/5
17/3/2019 Bài kiểm tra số 1 (lần 2)
Question 9 Which is INCORRECT about the criteria to evaluate a good CPU scheduling algorithm?
Incorrect
Select one:
Mark 0.00 out of
1.00 Maximize turnaround time

Flag question Maximize throughput


Minimize waiting time
Minimize response time

Question 10 Suppose a system uses FCFS CPU scheduling algorithm, the processes information (arrival
Correct time, duration) is P1(0,21), P2(30,10),P3(20,40), P4(40,25). Calculate the average waiting
time of the processes?
Mark 1.00 out of
1.00

Flag question
Answer: 15.75

Question 11 Which is non-preemptive CPU scheduling algorithm?


Correct
Select one:
Mark 1.00 out of
1.00 Round robin

Flag question None of the above


SRTF

FIFO

Question 12 Which is INCORRECT about Shortest Remaining Time First (SRTF) scheduling algorithm?
Incorrect
Select one:
Mark 0.00 out of
1.00 It is also a priority scheduling algorithm

Flag question The shortest remaining time process will be selected to run
The shortest process will be run first
It is the preemptive Shortest Job First (SJF) algorithm

Question 13 Which is the INCORRECT process scheduling type?


Correct
Select one:
Mark 1.00 out of
1.00 Quick-term scheduler

Flag question Short-term scheduler


Medium-term scheduler
Long-term scheduler
[Link] 3/5
17/3/2019 Bài kiểm tra số 1 (lần 2)

Question 14 Suppose a system uses Round Robin (RR) CPU scheduling algorithm, the processes
Incorrect information (arrival time, duration) is P1(0,21), P2(30,10), P3(20,40), P4(40,25), and the
time quantum is 15. Calculate the total waiting time of the processes?
Mark 0.00 out of
1.00

Flag question
Answer: 62

Question 15 Suppose a system uses SJN (or SJF) scheduling algorithm. The processes information
Correct (arrival time, duration) is P1(0,7), P2(2,4), P3(4,1), P4(5,5). Which is the turnaround time of
process P2 ?
Mark 1.00 out of
1.00
Select one:
Flag question
10

8
12

Question 16 Which is INCORRECT about batch system?


Correct
Select one:
Mark 1.00 out of
1.00 Is a simple operating system

Flag question May use FIFO mechanism


Is not like time-sharing system
Allow many people to use a computer concurrently

Question 17 Which is INCORRECT about process control block (PCB)?


Correct
Select one:
Mark 1.00 out of
1.00 It contains the state of the process

Flag question It is a data structure containing information of a process


It contains memory management information
PCBs in all operating systems are the same

Question 18 Which is INCORRECT about time-sharing system?


Correct
Select one:
Mark 1.00 out of
1.00 Only utilize CPU effectively
[Link] 4/5
UETOTS Nguyễn Tùng Lâm

Operating systems INT2206 9 (2019-2020)


Home ► My courses ► Operating Systems ► S2INT2206_9_1920 ► 5 April - 11 April ►
Bài kiểm tra chương 1 + 2

Started on Sunday, 5 April 2020, 8:33 PM


QUIZ
NAVIGATION State Finished
Completed on Sunday, 5 April 2020, 9:03 PM
1 2 3 4
Time taken 29 mins 56 secs
5 6 7 8 Marks 20.00/20.00
Grade 10.00 out of 10.00 (100%)
9 10 11 12

13 14 15 16
Question 1 Which is INCORRECT about process control block
17 18 19 20 Correct (PCB)?

Show one page at a Mark 1.00 out of


Select one:
time 1.00
PCBs in all operating systems are the same
Finish review Flag question
It contains memory management information

It contains the state of the process

It is a data structure containing information of a


process

Question 2 Which is the correct type of Windows XP?


Correct
Select one:
Mark 1.00 out of
1.00 Uni-programming

Flag question Multi-programming

Special purpose

Embedded

Question 3 Which is preemptive CPU scheduling algorithm?


Correct
Select one:
Mark 1.00 out of
1.00
SJN (or SJF)

Flag question RR

FIFO

None of the above


Question 4 Select the best description about what a pure computer (a
Correct computer without an operating system) can do

Mark 1.00 out of


Select one:
1.00
Provide applications and network connection for
Flag question
users

Provide applications for users

CPU can do arithmetic calculation, detect available


devices such as RAM, disks, ...

Provide graphical user interface

Question 5 Suppose a system uses RR scheduling algorithm. The


Correct processes information (arrival time, duration) is P1(0, 25),
P3(20, 40), P2(30, 10), P4(35, 25), and the time quantum
Mark 1.00 out of
is 15. Which is the response time of P3?
1.00

Flag question Select one:


5

15

10

Question 6 Suppose a system uses SJN (or SJF) scheduling


Correct algorithm. The processes information (arrival time,
duration) is P1(0,7), P2(2,4), P3(4,1), P4(5,5). Calculate
Mark 1.00 out of
the response time of P4 ?
1.00

Flag question
Answer: 7

Question 7 Which is INCORRECT about preemptive in CPU


Correct scheduling algorithms?

Mark 1.00 out of


Select one:
1.00
The current process will always be run until
Flag question
terminated

The current process can be switched into ready state

The current process can be switched into waiting


terminated state

The current process can be switched into waiting


state
Question 8 Suppose a system uses RR scheduling algorithm. The
Correct processes information (arrival time, duration) is P1(0, 25),
P3(20, 40), P2(30, 10), P4(35, 25), and the time quantum
Mark 1.00 out of
is 15. Which is the waiting time of P1?
1.00

Flag question Select one:


20

15

10

Question 9 Suppose a system uses RR scheduling algorithm. The


Correct processes information (arrival time, duration) is P1(0, 25),
P3(20, 40), P2(30, 10), P4(35, 25), and the time quantum
Mark 1.00 out of
is 15. Which is the total waiting time of the processes?
1.00

Flag question Select one:


50

60

80

70

Question 10 Select the best description about the resources a


Correct computer may have

Mark 1.00 out of


Select one:
1.00
CPU, RAM, Disk, printer, monitor
Flag question
CPU, RAM, Disks

CPU, RAM and anything that can connect to the


computer, such as CD, network card, ...

CPU, RAM, Disk, printer

Question 11

Correct

Mark 1.00 out of


1.00

Flag question
Suppose a system uses SJN (or SJF) CPU scheduling
algorithm. The processes information (arrival time,
duration) is P1(0,7), P2(2,4), P3(4,1), P4(5,5). Which is
the average waiting time of the processes?

Select one:
2

Question 12 Suppose a system uses SRTF scheduling algorithm. The


Correct processes information (arrival time, duration) is P1(0,21),
P2(30,10),P3(20,40), P4(40,15). Show the order (e.g. P2,
Mark 1.00 out of
P1, P3, P4) in which the processes are run?
1.00

Flag question
Answer: P1, P3, P2, P4, P3

Question 13 Which is INCORRECT about Shortest Remaining Time


Correct First (SRTF) scheduling algorithm?

Mark 1.00 out of


Select one:
1.00
The shortest remaining time process will be selected
Flag question
to run

It is the preemptive Shortest Job First (SJF)


algorithm

It is also a priority scheduling algorithm

The shortest process will be run first

Question 14 Suppose a system uses SJF scheduling algorithm, the


Correct processes information (arrival time, duration) is P1(0,21),
P2(30,20),P3(20,40), P4(35,15). Show the order (e.g. P2
Mark 1.00 out of
P1 P3 P4) in which the processes are run?
1.00

Flag question
Answer: P1 P3 P4 P2

Question 15 Which is non-preemptive CPU scheduling algorithm?


Correct
Select one:
Mark 1.00 out of
1.00 Round robin
Flag question
SRTF

FIFO

None of the above

Question 16 Which code a CPU can understand and execute?


Correct
Select one:
Mark 1.00 out of
1.00
[Link]();

Flag question 0110010110

a=a+b

add AX, BX

Question 17 Suppose a system uses FCFS CPU scheduling algorithm.


Correct The duration and order of the process are P1(20), P2(11),
P3(6). Which is the average waiting time of the
Mark 1.00 out of
processes?
1.00

Flag question Select one:


47

37

17

27

Question 18 Select INCORRECT description about the main tasks of


Correct operating systems

Mark 1.00 out of


Select one:
1.00
Resource allocation (for processes)
Flag question
Provide Application Programming Interface (API) for
application developers

Process management

Provide database management systems (e.g. MS


SQL Server)

Question 19 Suppose a system uses FCFS CPU scheduling algorithm,


Correct the processes information (arrival time, duration) is
P1(0,21), P2(30,10),P3(20,40), P4(40,25). Calculate the
Mark 1.00 out of
average waiting time of the processes?
1.00

Flag question
Answer: 15.75

Question 20 What language a CPU can understand?


Correct
Select one:
Mark 1.00 out of
1.00 Assembly

Flag question C++

Binary code (0110010110)

Finish review

You are logged in as Nguyễn Tùng Lâm (Log out)


S2INT2206_9_1920
Họ và tên: Nguyễn Thị Hằng
MSSV: 19020279

Bài tập phần đồng bộ hóa tiến trình

Bài 1 trang 12:

Bài làm
Chứng minh ba tính chất trên được đảm bảo:
* Mutual exclusion được đảm bảo bởi vì
- P0 và P1 đều ở trong CS nếu và chỉ nếu flag[0] = flag[1]=true và chỉ nếu turn = i
với mỗi Pi (không thể xảy ra)
* Chứng minh thỏa mãn yêu cầu về progess và bounded waiting
- Pi không thể vào CS nếu và chỉ nếu bị kẹt tại vòng lặp while() với điều kiện
flag[i] = true và tủn = j
- Nếu Pj không muốn vào CS thì flag[j] = false và do đó Pi có thể vào CS
- Nếu Pj đã bật flag[j] = true và đang chờ tại while() thì chỉ có hai trường hợp là
turn = i và turn =j
- Nếu turn = i thì Pi vào CS. Nếu turn = j thì Pj vào CS nhưng sẽ bật flag[j] = false
khi thoát ra => cho phép Pi vào CS
- Nhưng nếu Pj có đủ thời gian bật flag[j] = true thì Pj cũng phải gán turn = i
- Vì Pi không thay đổi trị của biến turn khi đang kẹt trong vòng lặp while() , Pi sẽ
chờ để vào CS nhiều nhất là sau một lần Pj vào CS ( bounded waiting)
Bài 2 trang 19:

Bài làm
Đoạn mã trên thỏa mãn hai tính chất đầu, không thỏa mãn tính chất chờ đợi có giới
hạn
- Biến chia sẻ lock được khởi tạo bởi giá trị false
- Mỗi progess Pi có biến cục bộ key
- Process Pi nào thấy giá trị lock = false thì được vào CS. Process Pi sẽ loại trừ các
process Pi khác khi thiết lập lock = true.
Cho nên, mutual exclusion được đảm bảo nếu Pi vào CS, các process Pj khác đều
đang busy waiting
- Khi Pi ra khỏi CS, quá trình lựa chọn process Pj vào CS kế tiếp là tùy ý = >
Không đảm bảo điều kiện bounded waiting. Do đó có thể xảy ra starvation (bị bỉ
đói)

Bài 3: Bài toán bữa ăn của năm nhà hiền triết

Chọn một giải pháp khắc phục tình trạng bế tắc viết lại tiến trình cho nhà triết học i
Bài làm
Ta có tiến trình cho các nhà triết học i:

Với bài toán trên thì khi 5 nhà triết học đều đói và lấy đũa cùng một lúc => họ đợi
nhau và không ai có đủ đũa để ăn => xảy ra tình trạng bế tắc
Giải pháp khắc phục tình trạng bế tắc: chỉ cho phép một nhà triết học lấy đũa khi
cả 2 chiếc đũa trái và phải ở trạng thái sẵn sàng.
3/10/2020 Bài kiểm tra chương 1+2 (thi lần 2)
UETOTS Thái Huy Nhật Quang

Operating systems INT2206-6 Summer 2018-2019


Home ► My courses ► Operating Systems ► INT2206-6 Summer 2018-2019 ► 14 March - 20 March ►
Bài kiểm tra chương 1+2 (thi lần 2)

Started on Sunday, 17 March 2019, 8:00 PM


State Finished
Completed on Sunday, 17 March 2019, 8:15 PM
Time taken 15 mins 33 secs
Marks 19.00/20.00
Grade 9.50 out of 10.00 (95%)

Question 1 Suppose a system uses SJN (or SJF) CPU scheduling algorithm. The processes information
Correct (arrival time, duration) is P1(0,7), P2(2,4), P3(4,1), P4(5,5). Which is the average waiting time of
the processes?
Mark 1.00 out of
1.00
Select one:
Flag question
2

3
5
4

Question 2 Suppose a system uses SJN (or SJF) scheduling algorithm. The processes information (arrival
Correct time, duration) is P1(0,7), P2(2,4), P3(4,1), P4(5,5). Calculate the turnaround time of P1 ?

Mark 1.00 out of


1.00 Answer: 7
Flag question

Question 3 Suppose a system uses SJN (or SJF) CPU scheduling algorithm. The processes information
Correct (arrival time, duration) is P1(0,7), P2(2,4), P3(4,1), P4(5,5). Which is the total waiting time of the
processes?
Mark 1.00 out of
1.00
Select one:
Flag question
16
17
18

15
[Link] 1/5
3/10/2020 Bài kiểm tra chương 1+2 (thi lần 2)
Question 4 Suppose a system uses SRTF (or preemtive SJF) scheduling algorithm. The processes
Incorrect information (arrival time, duration) is P1(0,24), P2(20,40), P3(30,10), P4(50,15). Show the order
(e.g. P1 P3 P1 P4 ...) in which the processes are run?
Mark 0.00 out of
1.00

Flag question
Answer: P1 P2 P3 P4

Question 5 Which is non-preemptive CPU scheduling algorithm?


Correct
Select one:
Mark 1.00 out of
1.00 FIFO

Flag question SRTF


None of the above

Round robin

Question 6 Which is INCORRECT about Shortest Job First (SJF) CPU scheduling algorithm?
Correct
Select one:
Mark 1.00 out of
1.00 The shortest process will be selected to be run

Flag question Shortest remaining time first (SRTF) CPU scheduling algorithm is the same as SJF
It is also a priority scheduling algorithm

Another name of the algorithm is Shortest Job Next (SJN)

Question 7 Suppose a system uses SJN (or SJF) scheduling algorithm. The processes information (arrival
Correct time, duration) is P1(0,7), P2(2,4), P3(4,1), P4(5,5). Calculate the turnaround time of P3 ?

Mark 1.00 out of


1.00 Answer: 4
Flag question

Question 8 Suppose a system uses Round Robin (RR) CPU scheduling algorithm, the processes information
Correct (arrival time, duration) is P1(0,21), P2(30,10), P3(20,40), P4(40,25), and the time quantum is 15.
Calculate the total waiting time of the processes?
Mark 1.00 out of
1.00
Answer: 63
Flag question

Question 9 Which is NOT one of the main tasks of operating systems?


Correct
Select one:
[Link] 2/5
3/10/2020
Mark 1.00 out of Bài kiểm tra chương 1+2 (thi lần 2)
Memory management
1.00
Protection and security
Flag question
Play audio files
Storage management (such as CD, DVD, disks, ...)

Question 10 Which is INCORRECT about time-sharing system?


Correct
Select one:
Mark 1.00 out of
1.00 It is also applicable for multiple CPU hardware

Flag question Utilize resources more effectively

Allow several processes to run on a single CPU hardware


Only utilize CPU effectively

Question 11 Suppose a system uses SJN (or SJF) scheduling algorithm. The processes information (arrival
Correct time, duration) is P1(0,7), P2(2,4), P3(4,1), P4(5,5). Which is the response time of process P2?

Mark 1.00 out of


Select one:
1.00
6
Flag question
10

8
12

Question 12 Suppose a system uses RR scheduling algorithm. The processes information (arrival time,
Correct duration) is P1(0,20), P2(30,10),P3(20,40), P4(40,25), and the time quantum is 15. Which is the
total waiting time of the processes?
Mark 1.00 out of
1.00
Select one:
Flag question
60
70

50
40

Question 13 Which is the CORRECT relationship among process, program and application concepts?
Correct
Select one:
Mark 1.00 out of
1.00 An application may have several programs, a program has only one process

Flag question An application has only one program, a program has only one process
[Link] 3/5
3/10/2020 Bài kiểm tra chương 1+2 (thi lần 2)
An application may have several processes, a process may have several programs

An application may have several programs, a program may have several processes

Question 14 Which is the CORRECT statement about a program?


Correct
Select one:
Mark 1.00 out of
1.00 Is a process

Flag question Is a library


Is a compiled (e.g binary code) application
Is a part of the operating system

Question 15 Suppose a system uses FCFS scheduling algorithm, the processes information (arrival time,
Correct duration) is P1(0,21), P2(30,10),P3(20,40), P4(50,15). Show the order in which the processes are
run (e.g. P2 P1 P3 P4)?
Mark 1.00 out of
1.00

Flag question
Answer: P1 P3 P2 P4

Question 16 Which is INCORRECT about Shortest Remaining Time First (SRTF) scheduling algorithm?
Correct
Select one:
Mark 1.00 out of
1.00 The shortest process will be run first

Flag question The shortest remaining time process will be selected to run
It is also a priority scheduling algorithm

It is the preemptive Shortest Job First (SJF) algorithm

Question 17 Suppose a system uses FCFS CPU scheduling algorithm. The duration of the processes is
Correct P1(21), P2(10), P3(6) (and this is also the order of the processes in the queue). Calculate the total
waiting time of the processes?
Mark 1.00 out of
1.00
Answer: 52
Flag question

Question 18 Which is CORRECT about a process?


Correct
Select one:
Mark 1.00 out of
1.00 Is an instance of a program

Flag question Is a file on hard disk


[Link] 4/5
/
/
/
/
/
Bài kiểm tra chương 1 + 2 4/5/20, 21:01

UETOTS Lưu Lê Tuấn Đạt

Operating systems INT2206 9 (2019-2020)


Home ▶ My courses ▶ Operating Systems ▶ S2INT2206_9_1920 ▶ 5 April - 11 April ▶
Bài kiểm tra chương 1 + 2

Started on Sunday, 5 April 2020, 8:30 PM


QUIZ
NAVIGATION State Finished
Completed on Sunday, 5 April 2020, 9:00 PM
1 2 3 4
Time taken 30 mins 1 sec
5 6 7 8 Marks 20.00/20.00
Grade 10.00 out of 10.00 (100%)
9 10 11 12

13 14 15 16
Question 1 Suppose a system uses SJN (or SJF) scheduling
17 18 19 20 Correct algorithm. The processes information (arrival time,
Show one page at duration) is P1(0,7), P2(2,4), P3(4,1), P4(5,5).
Mark 1.00 out of
a time Calculate the response time of P4 ?
1.00

Finish review Flag question


Answer: 7

Question 2 Which is INCORRECT about an application?


Correct
Select one:
Mark 1.00 out of
1.00
It serves a certain task for users or
programmers
Flag question
It can be organized into multiple files on disks.

A database management system is an


example of an application

It controls I/O (such as read/write operations


on disks)

Question 3 Suppose a system uses RR scheduling algorithm.


Correct The processes information (arrival time, duration) is
P1(0, 25), P3(20, 40), P2(30, 10), P4(35, 25), and
Mark 1.00 out of
1.00

[Link] Page 1 of 7
Bài kiểm tra chương 1 + 2 4/5/20, 21:01

Flag question the time quantum is 15. Which is the running order
of the processes?

Select one:
P1, P3, P2, P4, P3, P4, P3

P1, P1, P2, P3, P4, P3, P4, P3

P1, P1, P3, P2, P3, P4, P3, P4

P1, P1, P3, P2, P4, P3, P4, P3

Question 4 Suppose a system uses RR scheduling algorithm.


Correct The processes information (arrival time, duration) is
P1(0, 25), P3(20, 40), P2(30, 10), P4(35, 25), and
Mark 1.00 out of
the time quantum is 15. Which is the response
1.00
time of P4?
Flag question

Select one:
10

20

15

Question 5 Which is INCORRECT about preemptive in CPU


Correct scheduling algorithms?

Mark 1.00 out of


Select one:
1.00
The current process will always be run until
Flag question
terminated

The current process can be switched into


ready state

The current process can be switched into


waiting state

The current process can be switched into


waiting terminated state

Question 6 Which is NOT one of the main tasks of operating


Correct systems?

[Link] Page 2 of 7
Bài kiểm tra chương 1 + 2 4/5/20, 21:01

Mark 1.00 out of Select one:


1.00 Memory management
Flag question Protection and security

Storage management (such as CD, DVD,


disks, ...)

Play audio files

Question 7 Suppose a system uses SRTF scheduling


Correct algorithm. The processes information (arrival time,
duration) is P1(0,21), P2(30,10),P3(20,40),
Mark 1.00 out of
P4(40,15). Show the order (e.g. P2, P1, P3, P4) in
1.00
which the processes are run?
Remove flag

Answer:
P1, P3, P2, P4, P3

Question 8 Select the best description about what a pure


Correct computer (a computer without an operating
system) can do
Mark 1.00 out of
1.00
Select one:
Flag question
Provide applications and network connection
for users

Provide applications for users

Provide graphical user interface

CPU can do arithmetic calculation, detect


available devices such as RAM, disks, ...

Question 9 Suppose a system uses RR scheduling algorithm.


Correct The processes information (arrival time, duration) is
P1(0, 25), P3(20, 40), P2(30, 10), P4(35, 25), and
Mark 1.00 out of
the time quantum is 15. Which is the waiting time
1.00
of P2?
Flag question

Select one:
20

[Link] Page 3 of 7
Bài kiểm tra chương 1 + 2 4/5/20, 21:01

10

Question 10 Suppose a system uses SJN (or SJF) scheduling


Correct algorithm. The processes information (arrival time,
duration) is P1(0,7), P2(2,4), P3(4,1), P4(5,5). Which
Mark 1.00 out of
is the turnaround time of process P2 ?
1.00

Flag question Select one:


10

12

Question 11 Which code a CPU can understand and execute?


Correct
Select one:
Mark 1.00 out of
1.00 0110010110

Flag question [Link]();

add AX, BX

a=a+b

Question 12 Suppose a system uses SJN (or SJF) scheduling


Correct algorithm. The processes information (arrival time,
duration) is P1(0,7), P2(2,4), P3(4,1), P4(5,5).
Mark 1.00 out of
Calculate the turnaround time of P1 ?
1.00

Flag question
Answer: 7

Question 13 Suppose a system uses SJN (or SJF) CPU


Correct scheduling algorithm. The processes information
(arrival time, duration) is P1(0,7), P2(2,4), P3(4,1),
Mark 1.00 out of
1.00

[Link] Page 4 of 7
Bài kiểm tra chương 1 + 2 4/5/20, 21:01

Flag question P4(5,5). Which is the total waiting time of the


processes?

Select one:
17

16

15

18

Question 14 Which is NOT a criterion to evaluate a CPU


Correct scheduling algorithm?

Mark 1.00 out of


Select one:
1.00
Response time
Flag question
Waiting time

CPU utilization

RAM utilization

Question 15 Suppose a system uses FCFS CPU scheduling


Correct algorithm. The duration and order of processes are
P1(21), P2(10), P3(6). Which is the throughput of
Mark 1.00 out of
the system?
1.00

Flag question Select one:


0.1

0.2
0.3

0.4

Question 16 Which is INCORRECT about Shortest Remaining


Correct Time First (SRTF) scheduling algorithm?

Mark 1.00 out of


Select one:
1.00
It is also a priority scheduling algorithm
Flag question
It is the preemptive Shortest Job First (SJF)

[Link] Page 5 of 7
Bài kiểm tra chương 1 + 2 4/5/20, 21:01

algorithm

The shortest remaining time process will be


selected to run

The shortest process will be run first

Question 17 Suppose a system uses SRTF (or preemtive SJF)


Correct scheduling algorithm. The processes information
(arrival time, duration) is P1(0,24), P2(20,40),
Mark 1.00 out of
P3(30,10), P4(50,15). Show the order (e.g. P1 P3
1.00
P1 P4 ...) in which the processes are run?
Flag question

Answer:
P1 P2 P3 P2 P4 P2

Question 18 Which is INCORRECT about context switch?


Correct
Select one:
Mark 1.00 out of
1.00 The current process will be put into waiting
queue
Flag question
It is the steps of switching to run another
process
The context of the current process will be
saved

The target process will be run

Question 19 Which is NOT the purpose of virtual machine?


Correct
Select one:
Mark 1.00 out of
1.00 Allow multiple operating system to run on the
same hardware
Remove flag
Allow operating systems on the same
hardware to use some resources (such as IP,
port, domain name,...) independently

Utilize RAM and CPU more effectively

Increase the number of processes in memory

[Link] Page 6 of 7
Bài kiểm tra chương 1 + 2 4/5/20, 21:01

Question 20 Suppose a system uses RR scheduling algorithm.


Correct The processes information (arrival time, duration) is
P1(0, 25), P3(20, 40), P2(30, 10), P4(35, 25), and
Mark 1.00 out of
the time quantum is 15. Which is the response
1.00
time of P3?
Flag question

Select one:
0

10

15

Finish review

You are logged in as Lưu Lê Tuấn Đạt (Log out)


S2INT2206_9_1920

[Link] Page 7 of 7
UETOTS Nguyễn Thị Huệ

Operating systems INT2206 9 (2019-2020)


Home ► My courses ► Operating Systems ► S2INT2206_9_1920 ► 5 April - 11 April ►
Bài kiểm tra chương 1 + 2

Started on Sunday, 5 April 2020, 8:34 PM


State Finished
Completed on Sunday, 5 April 2020, 9:03 PM
Time taken 29 mins 52 secs
Marks 20.00/20.00
Grade 10.00 out of 10.00 (100%)

Question 1 Suppose a system uses Round Robin (RR) CPU scheduling algorithm, the processes
Correct information (arrival time, duration) is P1(0,21), P2(30,10), P3(20,40), P4(40,25), and the
time quantum is 15. Calculate the total waiting time of the processes?
Mark 1.00 out of
1.00

Remove flag
Answer: 63

Question 2 Which is INCORRECT about time-sharing system?


Correct
Select one:
Mark 1.00 out of
1.00 Only utilize CPU effectively

Flag question It is also applicable for multiple CPU hardware

Utilize resources more effectively

Allow several processes to run on a single CPU hardware

Question 3 Which is the correct type of Windows XP?


Correct
Select one:
Mark 1.00 out of
1.00 Uni-programming

Flag question Multi-programming


Special purpose

Embedded

/
Question 4 Suppose a system uses SJN (or SJF) scheduling algorithm. The processes information
Correct (arrival time, duration) is P1(0,7), P2(2,4), P3(4,1), P4(5,5). Calculate the response time of
P4 ?
Mark 1.00 out of
1.00

Remove flag
Answer: 7

Question 5 Suppose a system uses FCFS CPU scheduling algorithm. The duration and order of
Correct processes are P1(21), P2(10), P3(6). Which is the throughput of the system?

Mark 1.00 out of


Select one:
1.00
0.3
Remove flag
0.4
0.2

0.1

Question 6 Suppose a system uses SRTF scheduling algorithm. The processes information (arrival
Correct time, duration) is P1(0,21), P2(30,10),P3(20,40), P4(40,15). Show the order (e.g. P2, P1,
P3, P4) in which the processes are run?
Mark 1.00 out of
1.00
Answer: P1, P3, P2, P4, P3
Remove flag

Question 7 Which is INCORRECT about batch system?


Correct
Select one:
Mark 1.00 out of
1.00 Is not like time-sharing system

Flag question May use FIFO mechanism

Is a simple operating system


Allow many people to use a computer concurrently

Question 8 Suppose a system uses RR scheduling algorithm. The processes information (arrival time,
Correct duration) is P1(0, 25), P3(20, 40), P2(30, 10), P4(35, 25), and the time quantum is 15.
Which is the response time of P1?
Mark 1.00 out of
1.00
Select one:
Remove flag
0
10
15

20 /
Question 9 Suppose a system uses SJN (or SJF) CPU scheduling algorithm. The processes
Correct information (arrival time, duration) is P1(0,7), P2(2,4), P3(4,1), P4(5,5). Which is the total
waiting time of the processes?
Mark 1.00 out of
1.00
Select one:
Remove flag
17
16
18

15

Question 10 Suppose a system uses SJF scheduling algorithm, the processes information (arrival time,
Correct duration) is P1(0,21), P2(30,20),P3(20,40), P4(35,15). Show the order (e.g. P2 P1 P3 P4) in
which the processes are run?
Mark 1.00 out of
1.00
Answer: P1 P3 P4 P2
Remove flag

Question 11 Which is NOT one of the main tasks of operating systems?


Correct
Select one:
Mark 1.00 out of
1.00 Memory management

Flag question Storage management (such as CD, DVD, disks, ...)

Protection and security


Play audio files

Question 12 Suppose a system uses SJN (or SJF) scheduling algorithm. The processes information
Correct (arrival time, duration) is P1(0,7), P2(2,4), P3(4,1), P4(5,5). Calculate the response time of
process P3 ?
Mark 1.00 out of
1.00
Answer: 3
Remove flag

Question 13 Which is the BEST reason why we need process scheduling?


Correct
Select one:
Mark 1.00 out of
1.00 Because the system has many processes to run and they need to be treated equally

Flag question Many reasons: Many processes; Utilize system resources more effectively; Don’t let
users wait; ...
/
Because we need to utilize the memory more effectively

Because the system has many processes to run

Question 14 Suppose a system uses RR scheduling algorithm. The processes information (arrival time,
Correct duration) is P1(0, 25), P3(20, 40), P2(30, 10), P4(35, 25), and the time quantum is 15.
Which is the waiting time of P2?
Mark 1.00 out of
1.00
Select one:
Remove flag
5

20
0
10

Question 15 Suppose a system uses SJN (or SJF) scheduling algorithm. The processes information
Correct (arrival time, duration) is P1(0,7), P2(2,4), P3(4,1), P4(5,5). Calculate the turnaround time of
P1 ?
Mark 1.00 out of
1.00

Remove flag
Answer: 7

Question 16 Which is the CORRECT statement about a program?


Correct
Select one:
Mark 1.00 out of
1.00 Is a compiled (e.g binary code) application

Flag question Is a library


Is a process

Is a part of the operating system

Question 17 Suppose a system uses RR scheduling algorithm. The processes information (arrival time,
Correct duration) is P1(0, 25), P3(20, 40), P2(30, 10), P4(35, 25), and the time quantum is 15.
Which is the throughput of P1?
Mark 1.00 out of
1.00
Select one:
Remove flag
0.04

0.02
0.01

0.03

/
Question 18 Which is the CORRECT relationship among process, program and application concepts?
Correct
Select one:
Mark 1.00 out of
1.00 An application may have several programs, a program may have several processes

Flag question An application may have several processes, a process may have several programs
An application has only one program, a program has only one process
An application may have several programs, a program has only one process

Question 19 Which is CORRECT about the structure of a process?


Correct
Select one:
Mark 1.00 out of
1.00 Stack, heap, code (text)

Flag question Data, code (text)

Heap, data, code (text)


Stack, heap, data, code (text), program counter, and addtional information

Question 20 Which is NOT an operating system type?


Correct
Select one:
Mark 1.00 out of
1.00 Embedded system

Flag question Batch system

Sequential system,
Uni-programming operating system

Finish review

QUIZ NAVIGATION

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
Show one page at a time
Finish review

You are logged in as Nguyễn Thị Huệ (Log out)


S2INT2206_9_1920

/
UETOTS Phan Công Hậu

Operating systems INT2206 9 (2019-2020)


Home ► My courses ► Operating Systems ► S2INT2206_9_1920 ► 5 April - 11 April ► Bài kiểm tra chương 1 + 2

Started on Sunday, 5 April 2020, 8:32 PM


QUIZ NAVIGATION
State Finished
1 2 3 4 5 6 7 Completed on Sunday, 5 April 2020, 8:57 PM
8 9 10 11 12 13 14 Time taken 25 mins 42 secs
Marks 20.00/20.00
15 16 17 18 19 20
Grade 10.00 out of 10.00 (100%)
Show one page at a time
Finish review Question 1 Which is INCORRECT about First Comes First Served (FCFS) CPU scheduling algorithm?
Correct
Select one:
Mark 1.00 out of
1.00 A process can be switched from running into waiting state

Flag question Once a process is executed, it can only be switched into terminated state

A process cannot be switched into ready state


It is a non-preemptive algorithm

Question 2 Suppose a system uses RR scheduling algorithm. The processes information (arrival time,
Correct duration) is P1(0, 25), P3(20, 40), P2(30, 10), P4(35, 25), and the time quantum is 15. Which is
the response time of P2?
Mark 1.00 out of
1.00
Select one:
Flag question
10
20

15

Question 3 Which is the CORRECT relationship among process, program and application concepts?
Correct
Select one:
Mark 1.00 out of
1.00 An application may have several processes, a process may have several programs

Flag question An application may have several programs, a program may have several processes

An application may have several programs, a program has only one process
An application has only one program, a program has only one process

Question 4 Which is INCORRECT about the states of a process?


Correct
Select one:
Mark 1.00 out of
1.00 A process can be switched from running into ready state

Flag question Valid states are new, ready, running, waiting and terminated

The number of states of a process is the same in all operating systems

A process can be switched from running into waiting state

Question 5 Suppose a system uses FCFS CPU scheduling algorithm. The duration and order of the process
Correct are P1(20), P2(11), P3(6). Which is the average waiting time of the processes?

Mark 1.00 out of


Select one:
1.00
27
Flag question
17
47

37

Question 6 Which is NOT a criterion to evaluate a CPU scheduling algorithm?


/
Correct Select one:
Mark 1.00 out of Waiting time
1.00
RAM utilization
Flag question
CPU utilization

Response time

Question 7 Which is NOT the purpose of virtual machine?


Correct
Select one:
Mark 1.00 out of
1.00 Allow operating systems on the same hardware to use some resources (such as IP, port,
domain name,...) independently
Flag question
Allow multiple operating system to run on the same hardware

Utilize RAM and CPU more effectively


Increase the number of processes in memory

Question 8 Suppose a system uses SJF scheduling algorithm, the processes information (arrival time,
Correct duration) is P1(0,21), P2(30,20),P3(20,40), P4(35,15). Show the order (e.g. P2 P1 P3 P4) in
which the processes are run?
Mark 1.00 out of
1.00
Answer: P1 P3 P4 P2
Flag question

Question 9 Suppose a system uses Round Robin (RR) CPU scheduling algorithm, the processes information
Correct (arrival time, duration) is P1(0,21), P2(30,10), P3(20,40), P4(40,25), and the time quantum is 15.
Calculate the total waiting time of the processes?
Mark 1.00 out of
1.00
Answer: 63
Flag question

Question 10 Suppose a system uses SJN (or SJF) scheduling algorithm. The processes information (arrival
Correct time, duration) is P1(0,7), P2(2,4), P3(4,1), P4(5,5). Calculate the response time of P1 ?

Mark 1.00 out of


1.00 Answer: 0

Flag question

Question 11 Which is CORRECT about a process?


Correct
Select one:
Mark 1.00 out of
1.00 Is a library

Flag question Is a file on hard disk


Is an application

Is an instance of a program

Question 12 Suppose a system uses SJN (or SJF) CPU scheduling algorithm. The processes information
Correct (arrival time, duration) is P1(0,7), P2(2,4), P3(4,1), P4(5,5). Which is the total waiting time of the
processes?
Mark 1.00 out of
1.00
Select one:
Flag question
18

15

16
17

Question 13 Suppose a system uses SJN (or SJF) scheduling algorithm. The processes information (arrival
Correct time, duration) is P1(0,7), P2(2,4), P3(4,1), P4(5,5). Calculate the response time of process P3 ?

Mark 1.00 out of


1.00 Answer: 3
Flag question

/
Question 14 Which module should NOT be implemented in the kernel of operating systems?
Correct
Select one:
Mark 1.00 out of
1.00 Process management module

Flag question Device drivers (such as network card device drivers)

Networking module

Memory management module

Question 15 Which is INCORRECT about time-sharing system?


Correct
Select one:
Mark 1.00 out of
1.00 Allow several processes to run on a single CPU hardware

Flag question It is also applicable for multiple CPU hardware


Only utilize CPU effectively

Utilize resources more effectively

Question 16 Which is INCORRECT about Shortest Remaining Time First (SRTF) scheduling algorithm?
Correct
Select one:
Mark 1.00 out of
1.00 The shortest process will be run first

Flag question It is also a priority scheduling algorithm

The shortest remaining time process will be selected to run

It is the preemptive Shortest Job First (SJF) algorithm

Question 17 Suppose a system uses FCFS scheduling algorithm, the processes information (arrival time,
Correct duration) is P1(0,21), P2(30,10),P3(20,40), P4(50,15). Show the order in which the processes are
run (e.g. P2 P1 P3 P4)?
Mark 1.00 out of
1.00
Answer: P1 P3 P2 P4
Flag question

Question 18 Which is NOT one of the main tasks of operating systems?


Correct
Select one:
Mark 1.00 out of
1.00 Play audio files

Flag question Memory management

Storage management (such as CD, DVD, disks, ...)


Protection and security

Question 19 Suppose a system uses SJN (or SJF) scheduling algorithm. The processes information (arrival
Correct time, duration) is P1(0,7), P2(2,4), P3(4,1), P4(5,5). Which is the turnaround time of process P2 ?

Mark 1.00 out of


Select one:
1.00
6
Flag question
12

10

Question 20 Select INCORRECT description about the main tasks of operating systems
Correct
Select one:
Mark 1.00 out of
1.00 Provide database management systems (e.g. MS SQL Server)

Flag question Process management

Provide Application Programming Interface (API) for application developers

Resource allocation (for processes)

/
Finish review

You are logged in as Phan Công Hậu (Log out)


S2INT2206_9_1920

/
UETOTS Phan Anh

Operating systems INT2206 9 (2019-2020)


Home ► My courses ► Operating Systems ► S2INT2206_9_1920 ► 5 April - 11 April ►
Bài kiểm tra chương 1 + 2

Started on Sunday, 5 April 2020, 8:30 PM


State Finished
Completed on Sunday, 5 April 2020, 9:00 PM
Time taken 30 mins
Marks 20.00/20.00
Grade 10.00 out of 10.00 (100%)

Question 1 Which is NOT a criterion to evaluate a CPU scheduling algorithm?


Correct
Select one:
Mark 1.00 out of
1.00 Response time

Flag question CPU utilization


RAM utilization
Waiting time

Question 2 Which is the BEST reason why we need process scheduling?


Correct
Select one:
Mark 1.00 out of
1.00 Because the system has many processes to run

Flag question Many reasons: Many processes; Utilize system resources more effectively; Don’t let
users wait; ...

Because the system has many processes to run and they need to be treated equally
Because we need to utilize the memory more effectively

Question 3 Which code a CPU can understand and execute?


Correct
Select one:
Mark 1.00 out of
1.00 a=a+b

Remove flag 0110010110

[Link]();
add AX, BX
/
Question 4 Suppose a system uses RR scheduling algorithm. The processes information (arrival time,
Correct duration) is P1(0, 25), P3(20, 40), P2(30, 10), P4(35, 25), and the time quantum is 15.
Which is the waiting time of P1?
Mark 1.00 out of
1.00
Select one:
Flag question
15

20
10
0

Question 5 Which is the INCORRECT process scheduling type?


Correct
Select one:
Mark 1.00 out of
1.00 Short-term scheduler

Flag question Medium-term scheduler

Quick-term scheduler
Long-term scheduler

Question 6 Which is the correct type of Windows XP?


Correct
Select one:
Mark 1.00 out of
1.00 Embedded

Flag question Special purpose

Uni-programming
Multi-programming

Question 7 Which is INCORRECT about multi-user operating systems?


Correct
Select one:
Mark 1.00 out of
1.00 Allow each user to run several processes at the same time

Flag question It is the same as a multi-programming operating system

Allow several processes to run on a single CPU hardware


Allow several people to use the computer at the same time

Question 8 Select the best description about operating systems for computers
Correct
Select one:
/
Mark 1.00 out of They are applications
1.00
They are libraries
Flag question
They are software that are between users and computer hardware
They are firmware

Question 9 Which is INCORRECT about an application?


Correct
Select one:
Mark 1.00 out of
1.00 A database management system is an example of an application

Flag question It can be organized into multiple files on disks.

It serves a certain task for users or programmers


It controls I/O (such as read/write operations on disks)

Question 10 Suppose a system uses FCFS CPU scheduling algorithm. The duration and order of the
Correct process are P1(20), P2(11), P3(6). Which is the average waiting time of the processes?

Mark 1.00 out of


Select one:
1.00
47
Flag question
17

27
37

Question 11 Suppose a system uses SJN (or SJF) scheduling algorithm. The processes information
Correct (arrival time, duration) is P1(0,7), P2(2,4), P3(4,1), P4(5,5). Calculate the turnaround time of
P1 ?
Mark 1.00 out of
1.00
Answer: 7
Flag question

Question 12 Which is NOT the purpose of virtual machine?


Correct
Select one:
Mark 1.00 out of
1.00 Increase the number of processes in memory

Remove flag Allow operating systems on the same hardware to use some resources (such as IP,
port, domain name,...) independently
Utilize RAM and CPU more effectively
Allow multiple operating system to run on the same hardware

/
Question 13 Which is INCORRECT about Shortest Remaining Time First (SRTF) scheduling algorithm?
Correct
Select one:
Mark 1.00 out of
1.00 It is also a priority scheduling algorithm

Flag question The shortest remaining time process will be selected to run
The shortest process will be run first
It is the preemptive Shortest Job First (SJF) algorithm

Question 14 What language a CPU can understand?


Correct
Select one:
Mark 1.00 out of
1.00 Assembly

Remove flag Binary code (0110010110)

C++
C

Question 15 Suppose a system uses RR scheduling algorithm. The processes information (arrival time,
Correct duration) is P1(0, 25), P3(20, 40), P2(30, 10), P4(35, 25), and the time quantum is 15.
Which is the response time of P1?
Mark 1.00 out of
1.00
Select one:
Flag question
10
0

20
15

Question 16 Which is NOT an operating system type?


Correct
Select one:
Mark 1.00 out of
1.00 Batch system

Flag question Uni-programming operating system

Embedded system
Sequential system,

Question 17 Which is INCORRECT about context switch?


Correct
Select one:
/
Mark 1.00 out of It is the steps of switching to run another process
1.00
The current process will be put into waiting queue
Flag question
The target process will be run
The context of the current process will be saved

Question 18 Which is non-preemptive CPU scheduling algorithm?


Correct
Select one:
Mark 1.00 out of
1.00 SRTF

Flag question FIFO

Round robin
None of the above

Question 19 Which is NOT an operating system structure?


Correct
Select one:
Mark 1.00 out of
1.00 Modularity

Flag question Object-oriented

Layered
Micro-kernel

Question 20 Suppose a system uses FCFS CPU scheduling algorithm, the processes information (arrival
Correct time, duration) is P1(0,21), P2(30,10),P3(20,40), P4(40,25). Calculate the average waiting
time of the processes?
Mark 1.00 out of
1.00
Answer: 15.75
Flag question

Finish review

QUIZ NAVIGATION

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
Show one page at a time
Finish review

/
You are logged in as Phan Anh (Log out)
S2INT2206_9_1920

/
17/3/2019 Bài kiểm tra số 1 (lần 2)
UETOTS Lê Nam Khánh

Operating systems INT2206-5 Summer 2018-


2019
Home ► My courses ► Operating Systems ► INT2206-5 Summer 2018-2019 ► 14 March - 20 March ►
Bài kiểm tra số 1 (lần 2)

Started on Sunday, 17 March 2019, 9:03 PM


State Finished
Completed on Sunday, 17 March 2019, 9:33 PM
Time taken 29 mins 59 secs
Marks 16.00/20.00
Grade 8.00 out of 10.00 (80%)

Question 1 Suppose a system uses SJN (or SJF) scheduling algorithm. The processes information
Correct (arrival time, duration) is P1(0,7), P2(2,4), P3(4,1), P4(5,5). Calculate the response time of
process P3 ?
Mark 1.00 out of
1.00

Flag question
Answer: 3

Question 2 Suppose a system uses SJN (or SJF) scheduling algorithm. The processes information
Correct (arrival time, duration) is P1(0,7), P2(2,4), P3(4,1), P4(5,5). Calculate the turnaround time of
process P4 ?
Mark 1.00 out of
1.00
Answer: 12
Flag question

Question 3 Select the best description about the resources a computer may have
Correct
Select one:
Mark 1.00 out of
1.00 CPU, RAM, Disks

Flag question CPU, RAM and anything that can connect to the computer, such as CD, network card,
...

CPU, RAM, Disk, printer, monitor


CPU, RAM, Disk, printer

[Link] 1/5
17/3/2019 Bài kiểm tra số 1 (lần 2)
Question 4 Suppose a system uses Round Robin (RR) scheduling algorithm. The processes
Incorrect information (arrival time, duration) is P1(0,21), P2(30,10), P3(20,40), P4(40,25), and the
time quantum is 15. Show the order (e.g. P2, P1, P3, P4) in which the processes are run?
Mark 0.00 out of
1.00

Flag question
Answer: P1, P3, P2, P4

Question 5 Which is NOT a criterion to evaluate a CPU scheduling algorithm?


Correct
Select one:
Mark 1.00 out of
1.00 CPU utilization

Flag question RAM utilization


Response time

Waiting time

Question 6 Suppose a system uses SJN (or SJF) scheduling algorithm. The processes information
Correct (arrival time, duration) is P1(0,7), P2(2,4), P3(4,1), P4(5,5). Calculate the turnaround time of
P1 ?
Mark 1.00 out of
1.00
Answer: 7
Flag question

Question 7 Which is preemptive CPU scheduling algorithm?


Correct
Select one:
Mark 1.00 out of
1.00 SRTF

Flag question SJN (or SJF)

None of the above


FIFO

Question 8 Which is non-preemptive CPU scheduling algorithm?


Correct
Select one:
Mark 1.00 out of
1.00 None of the above

Flag question Round robin


FIFO

SRTF

[Link] 2/5
17/3/2019 Bài kiểm tra số 1 (lần 2)
Question 9 Which is INCORRECT about the criteria to evaluate a good CPU scheduling algorithm?
Incorrect
Select one:
Mark 0.00 out of
1.00 Maximize turnaround time

Flag question Maximize throughput


Minimize waiting time
Minimize response time

Question 10 Suppose a system uses FCFS CPU scheduling algorithm, the processes information (arrival
Correct time, duration) is P1(0,21), P2(30,10),P3(20,40), P4(40,25). Calculate the average waiting
time of the processes?
Mark 1.00 out of
1.00

Flag question
Answer: 15.75

Question 11 Which is non-preemptive CPU scheduling algorithm?


Correct
Select one:
Mark 1.00 out of
1.00 Round robin

Flag question None of the above


SRTF

FIFO

Question 12 Which is INCORRECT about Shortest Remaining Time First (SRTF) scheduling algorithm?
Incorrect
Select one:
Mark 0.00 out of
1.00 It is also a priority scheduling algorithm

Flag question The shortest remaining time process will be selected to run
The shortest process will be run first
It is the preemptive Shortest Job First (SJF) algorithm

Question 13 Which is the INCORRECT process scheduling type?


Correct
Select one:
Mark 1.00 out of
1.00 Quick-term scheduler

Flag question Short-term scheduler


Medium-term scheduler
Long-term scheduler
[Link] 3/5
17/3/2019 Bài kiểm tra số 1 (lần 2)

Question 14 Suppose a system uses Round Robin (RR) CPU scheduling algorithm, the processes
Incorrect information (arrival time, duration) is P1(0,21), P2(30,10), P3(20,40), P4(40,25), and the
time quantum is 15. Calculate the total waiting time of the processes?
Mark 0.00 out of
1.00

Flag question
Answer: 62

Question 15 Suppose a system uses SJN (or SJF) scheduling algorithm. The processes information
Correct (arrival time, duration) is P1(0,7), P2(2,4), P3(4,1), P4(5,5). Which is the turnaround time of
process P2 ?
Mark 1.00 out of
1.00
Select one:
Flag question
10

8
12

Question 16 Which is INCORRECT about batch system?


Correct
Select one:
Mark 1.00 out of
1.00 Is a simple operating system

Flag question May use FIFO mechanism


Is not like time-sharing system
Allow many people to use a computer concurrently

Question 17 Which is INCORRECT about process control block (PCB)?


Correct
Select one:
Mark 1.00 out of
1.00 It contains the state of the process

Flag question It is a data structure containing information of a process


It contains memory management information
PCBs in all operating systems are the same

Question 18 Which is INCORRECT about time-sharing system?


Correct
Select one:
Mark 1.00 out of
1.00 Only utilize CPU effectively
[Link] 4/5
UETOTS Nguyễn Tùng Lâm

Operating systems INT2206 9 (2019-2020)


Home ► My courses ► Operating Systems ► S2INT2206_9_1920 ► 5 April - 11 April ►
Bài kiểm tra chương 1 + 2

Started on Sunday, 5 April 2020, 8:33 PM


QUIZ
NAVIGATION State Finished
Completed on Sunday, 5 April 2020, 9:03 PM
1 2 3 4
Time taken 29 mins 56 secs
5 6 7 8 Marks 20.00/20.00
Grade 10.00 out of 10.00 (100%)
9 10 11 12

13 14 15 16
Question 1 Which is INCORRECT about process control block
17 18 19 20 Correct (PCB)?

Show one page at a Mark 1.00 out of


Select one:
time 1.00
PCBs in all operating systems are the same
Finish review Flag question
It contains memory management information

It contains the state of the process

It is a data structure containing information of a


process

Question 2 Which is the correct type of Windows XP?


Correct
Select one:
Mark 1.00 out of
1.00 Uni-programming

Flag question Multi-programming

Special purpose

Embedded

Question 3 Which is preemptive CPU scheduling algorithm?


Correct
Select one:
Mark 1.00 out of
1.00
SJN (or SJF)

Flag question RR

FIFO

None of the above


Question 4 Select the best description about what a pure computer (a
Correct computer without an operating system) can do

Mark 1.00 out of


Select one:
1.00
Provide applications and network connection for
Flag question
users

Provide applications for users

CPU can do arithmetic calculation, detect available


devices such as RAM, disks, ...

Provide graphical user interface

Question 5 Suppose a system uses RR scheduling algorithm. The


Correct processes information (arrival time, duration) is P1(0, 25),
P3(20, 40), P2(30, 10), P4(35, 25), and the time quantum
Mark 1.00 out of
is 15. Which is the response time of P3?
1.00

Flag question Select one:


5

15

10

Question 6 Suppose a system uses SJN (or SJF) scheduling


Correct algorithm. The processes information (arrival time,
duration) is P1(0,7), P2(2,4), P3(4,1), P4(5,5). Calculate
Mark 1.00 out of
the response time of P4 ?
1.00

Flag question
Answer: 7

Question 7 Which is INCORRECT about preemptive in CPU


Correct scheduling algorithms?

Mark 1.00 out of


Select one:
1.00
The current process will always be run until
Flag question
terminated

The current process can be switched into ready state

The current process can be switched into waiting


terminated state

The current process can be switched into waiting


state
Question 8 Suppose a system uses RR scheduling algorithm. The
Correct processes information (arrival time, duration) is P1(0, 25),
P3(20, 40), P2(30, 10), P4(35, 25), and the time quantum
Mark 1.00 out of
is 15. Which is the waiting time of P1?
1.00

Flag question Select one:


20

15

10

Question 9 Suppose a system uses RR scheduling algorithm. The


Correct processes information (arrival time, duration) is P1(0, 25),
P3(20, 40), P2(30, 10), P4(35, 25), and the time quantum
Mark 1.00 out of
is 15. Which is the total waiting time of the processes?
1.00

Flag question Select one:


50

60

80

70

Question 10 Select the best description about the resources a


Correct computer may have

Mark 1.00 out of


Select one:
1.00
CPU, RAM, Disk, printer, monitor
Flag question
CPU, RAM, Disks

CPU, RAM and anything that can connect to the


computer, such as CD, network card, ...

CPU, RAM, Disk, printer

Question 11

Correct

Mark 1.00 out of


1.00

Flag question
Suppose a system uses SJN (or SJF) CPU scheduling
algorithm. The processes information (arrival time,
duration) is P1(0,7), P2(2,4), P3(4,1), P4(5,5). Which is
the average waiting time of the processes?

Select one:
2

Question 12 Suppose a system uses SRTF scheduling algorithm. The


Correct processes information (arrival time, duration) is P1(0,21),
P2(30,10),P3(20,40), P4(40,15). Show the order (e.g. P2,
Mark 1.00 out of
P1, P3, P4) in which the processes are run?
1.00

Flag question
Answer: P1, P3, P2, P4, P3

Question 13 Which is INCORRECT about Shortest Remaining Time


Correct First (SRTF) scheduling algorithm?

Mark 1.00 out of


Select one:
1.00
The shortest remaining time process will be selected
Flag question
to run

It is the preemptive Shortest Job First (SJF)


algorithm

It is also a priority scheduling algorithm

The shortest process will be run first

Question 14 Suppose a system uses SJF scheduling algorithm, the


Correct processes information (arrival time, duration) is P1(0,21),
P2(30,20),P3(20,40), P4(35,15). Show the order (e.g. P2
Mark 1.00 out of
P1 P3 P4) in which the processes are run?
1.00

Flag question
Answer: P1 P3 P4 P2

Question 15 Which is non-preemptive CPU scheduling algorithm?


Correct
Select one:
Mark 1.00 out of
1.00 Round robin
Flag question
SRTF

FIFO

None of the above

Question 16 Which code a CPU can understand and execute?


Correct
Select one:
Mark 1.00 out of
1.00
[Link]();

Flag question 0110010110

a=a+b

add AX, BX

Question 17 Suppose a system uses FCFS CPU scheduling algorithm.


Correct The duration and order of the process are P1(20), P2(11),
P3(6). Which is the average waiting time of the
Mark 1.00 out of
processes?
1.00

Flag question Select one:


47

37

17

27

Question 18 Select INCORRECT description about the main tasks of


Correct operating systems

Mark 1.00 out of


Select one:
1.00
Resource allocation (for processes)
Flag question
Provide Application Programming Interface (API) for
application developers

Process management

Provide database management systems (e.g. MS


SQL Server)

Question 19 Suppose a system uses FCFS CPU scheduling algorithm,


Correct the processes information (arrival time, duration) is
P1(0,21), P2(30,10),P3(20,40), P4(40,25). Calculate the
Mark 1.00 out of
average waiting time of the processes?
1.00

Flag question
3/10/2020 Bài kiểm tra chương 1+2 (thi lần 2)
UETOTS Thái Huy Nhật Quang

Operating systems INT2206-6 Summer 2018-2019


Home ► My courses ► Operating Systems ► INT2206-6 Summer 2018-2019 ► 14 March - 20 March ►
Bài kiểm tra chương 1+2 (thi lần 2)

Started on Sunday, 17 March 2019, 8:00 PM


State Finished
Completed on Sunday, 17 March 2019, 8:15 PM
Time taken 15 mins 33 secs
Marks 19.00/20.00
Grade 9.50 out of 10.00 (95%)

Question 1 Suppose a system uses SJN (or SJF) CPU scheduling algorithm. The processes information
Correct (arrival time, duration) is P1(0,7), P2(2,4), P3(4,1), P4(5,5). Which is the average waiting time of
the processes?
Mark 1.00 out of
1.00
Select one:
Flag question
2

3
5
4

Question 2 Suppose a system uses SJN (or SJF) scheduling algorithm. The processes information (arrival
Correct time, duration) is P1(0,7), P2(2,4), P3(4,1), P4(5,5). Calculate the turnaround time of P1 ?

Mark 1.00 out of


1.00 Answer: 7
Flag question

Question 3 Suppose a system uses SJN (or SJF) CPU scheduling algorithm. The processes information
Correct (arrival time, duration) is P1(0,7), P2(2,4), P3(4,1), P4(5,5). Which is the total waiting time of the
processes?
Mark 1.00 out of
1.00
Select one:
Flag question
16
17
18

15
[Link] 1/5
3/10/2020 Bài kiểm tra chương 1+2 (thi lần 2)
Question 4 Suppose a system uses SRTF (or preemtive SJF) scheduling algorithm. The processes
Incorrect information (arrival time, duration) is P1(0,24), P2(20,40), P3(30,10), P4(50,15). Show the order
(e.g. P1 P3 P1 P4 ...) in which the processes are run?
Mark 0.00 out of
1.00

Flag question
Answer: P1 P2 P3 P4

Question 5 Which is non-preemptive CPU scheduling algorithm?


Correct
Select one:
Mark 1.00 out of
1.00 FIFO

Flag question SRTF


None of the above

Round robin

Question 6 Which is INCORRECT about Shortest Job First (SJF) CPU scheduling algorithm?
Correct
Select one:
Mark 1.00 out of
1.00 The shortest process will be selected to be run

Flag question Shortest remaining time first (SRTF) CPU scheduling algorithm is the same as SJF
It is also a priority scheduling algorithm

Another name of the algorithm is Shortest Job Next (SJN)

Question 7 Suppose a system uses SJN (or SJF) scheduling algorithm. The processes information (arrival
Correct time, duration) is P1(0,7), P2(2,4), P3(4,1), P4(5,5). Calculate the turnaround time of P3 ?

Mark 1.00 out of


1.00 Answer: 4
Flag question

Question 8 Suppose a system uses Round Robin (RR) CPU scheduling algorithm, the processes information
Correct (arrival time, duration) is P1(0,21), P2(30,10), P3(20,40), P4(40,25), and the time quantum is 15.
Calculate the total waiting time of the processes?
Mark 1.00 out of
1.00
Answer: 63
Flag question

Question 9 Which is NOT one of the main tasks of operating systems?


Correct
Select one:
[Link] 2/5
3/10/2020
Mark 1.00 out of Bài kiểm tra chương 1+2 (thi lần 2)
Memory management
1.00
Protection and security
Flag question
Play audio files
Storage management (such as CD, DVD, disks, ...)

Question 10 Which is INCORRECT about time-sharing system?


Correct
Select one:
Mark 1.00 out of
1.00 It is also applicable for multiple CPU hardware

Flag question Utilize resources more effectively

Allow several processes to run on a single CPU hardware


Only utilize CPU effectively

Question 11 Suppose a system uses SJN (or SJF) scheduling algorithm. The processes information (arrival
Correct time, duration) is P1(0,7), P2(2,4), P3(4,1), P4(5,5). Which is the response time of process P2?

Mark 1.00 out of


Select one:
1.00
6
Flag question
10

8
12

Question 12 Suppose a system uses RR scheduling algorithm. The processes information (arrival time,
Correct duration) is P1(0,20), P2(30,10),P3(20,40), P4(40,25), and the time quantum is 15. Which is the
total waiting time of the processes?
Mark 1.00 out of
1.00
Select one:
Flag question
60
70

50
40

Question 13 Which is the CORRECT relationship among process, program and application concepts?
Correct
Select one:
Mark 1.00 out of
1.00 An application may have several programs, a program has only one process

Flag question An application has only one program, a program has only one process
[Link] 3/5
3/10/2020 Bài kiểm tra chương 1+2 (thi lần 2)
An application may have several processes, a process may have several programs

An application may have several programs, a program may have several processes

Question 14 Which is the CORRECT statement about a program?


Correct
Select one:
Mark 1.00 out of
1.00 Is a process

Flag question Is a library


Is a compiled (e.g binary code) application
Is a part of the operating system

Question 15 Suppose a system uses FCFS scheduling algorithm, the processes information (arrival time,
Correct duration) is P1(0,21), P2(30,10),P3(20,40), P4(50,15). Show the order in which the processes are
run (e.g. P2 P1 P3 P4)?
Mark 1.00 out of
1.00

Flag question
Answer: P1 P3 P2 P4

Question 16 Which is INCORRECT about Shortest Remaining Time First (SRTF) scheduling algorithm?
Correct
Select one:
Mark 1.00 out of
1.00 The shortest process will be run first

Flag question The shortest remaining time process will be selected to run
It is also a priority scheduling algorithm

It is the preemptive Shortest Job First (SJF) algorithm

Question 17 Suppose a system uses FCFS CPU scheduling algorithm. The duration of the processes is
Correct P1(21), P2(10), P3(6) (and this is also the order of the processes in the queue). Calculate the total
waiting time of the processes?
Mark 1.00 out of
1.00
Answer: 52
Flag question

Question 18 Which is CORRECT about a process?


Correct
Select one:
Mark 1.00 out of
1.00 Is an instance of a program

Flag question Is a file on hard disk


[Link] 4/5
Kiểm tra chương 3+4 [Link]

UETOTS Phan Anh

Operating systems INT2206 9 (2019-2020)


Home ► My courses ► Operating Systems ► S2INT2206_9_1920 ► 26 April - 2 May ►
Kiểm tra chương 3+4

Started on Sunday, 26 April 2020, 3:00 PM


QUIZ
NAVIGATION State Finished
Completed on Sunday, 26 April 2020, 3:35 PM
1 2 3 4 5 Time taken 35 mins
6 7 8 9 10 Marks 16.00/20.00
Grade 8.00 out of 10.00 (80%)
11 12 13 14 15

16 17 18 19 20
Question 1 Which is NOT a deadlock handling method?
Show one page at a Correct
time Select one:
Mark 1.00 out of
Finish review Ensure the system never enters deadlock state
1.00

Flag question Reboot the system whenever a deadlock occurs

Allow the system to have deadlock and, then, recover

Ignore deadlock as if it never occurs

Question 2 There are two processes below running concurrently:


Correct

Mark 1.00 out of


1.00

Flag question

1 trong 18 3:36 CH, 26/04/2020


Kiểm tra chương 3+4 [Link]

2 trong 18 3:36 CH, 26/04/2020


Kiểm tra chương 3+4 [Link]
Select one:
When process A locks file F1 and process B locks F2 at
the same time (before open_file() operations), there will
be a deadlock.

Deadlock always occurs.

Deadlock occurs when process A unlock(F1) after


process B locks F2;

Deadlock never occurs.

Question 3 Which is incorrect about the following code?


Correct

Mark 1.00 out of


1.00

Flag question

Select one:
3 trong 18 3:36 CH, 26/04/2020
Kiểm tra chương 3+4 [Link]
When the resource is in use, and another process call
wait(), the CPU is waste to run the while loop.

This is an implementation of semaphore.

The while loop can be removed.

The while loop in the wait() procedure will cause the


calling process to wait if the resource is in use.

Question 4 Given the following system information, and process P0


Incorrect requests 1 more tape:

Mark 0.00 out of


1.00

Flag question

Which is the correct value of FINISH and WORK vectors


during the running of Banker's algorithm which is called in
the Resource-Request algorithm (to avoid deadlock)?

Select one:
FINISH=(T, F, T), WORK=(12)

FINISH=(T, T, T), WORK=(12)

FINISH=(F, T, F), WORK=(12)

FINISH=(F, T, T), WORK=(12)

Question 5 Given the two bellow processes sharing three semaphores


Correct full, empty, mutex, and a buffer buff having initial N empty
slots:
Mark 1.00 out of

4 trong 18 3:36 CH, 26/04/2020


Kiểm tra chương 3+4 [Link]
1.00

Flag question

5 trong 18 3:36 CH, 26/04/2020


Kiểm tra chương 3+4 [Link]

Which is incorrect about semaphore empty?

Select one:
The minimum value of empty is -1.

The maximum value of empty is N.

It is a counting semaphore.

The minimum value of empty is 0.

Question 6 Given the following resource allocation graph, provide the


Correct name of the edge from R2 to P1 (Assignment, Claim,or
Request)?
Mark 1.00 out of
1.00

Flag question

6 trong 18 3:36 CH, 26/04/2020


Kiểm tra chương 3+4 [Link]

Answer: Assignment

Question 7 Given the code of two semaphore atomic operation, where S


Incorrect is initialized by 3. Suppose process P1 calls wait(S), and P2
calls wait(S) before P1 calling signal(S). Which of the
Mark 0.00 out of
following is incorrect?
1.00

Flag question

7 trong 18 3:36 CH, 26/04/2020


Kiểm tra chương 3+4 [Link]

Select one:

8 trong 18 3:36 CH, 26/04/2020


Kiểm tra chương 3+4 [Link]
P1 can continue with its next instructions

S is now a counting semaphore

P2 can continue with its next instructions

S can not be initialized by 3

Question 8 Given the code of Readers-Writers problem:


Correct Process writer P:

Mark 1.00 out of


1.00

Flag question

Process reader Q:

9 trong 18 3:36 CH, 26/04/2020


Kiểm tra chương 3+4 [Link]

Which is the purpose of mutex variable?

Select one:
To safely access the data_set

We may remove this variable without affecting the


program

To safely access the wrt variable

To safely access the readcount variable

Question 9 A deadlock will occur if only if the following conditions occur


Correct at the same time

Mark 1.00 out of


Select one:
1.00
Mutual exclusion, hold and wait, circular wait
Flag question
Mutual exclusion, hold and wait, no circular wait, no-
preemption

Hold and wait, circular wait, no-preemption

Mutual exclusion, hold and wait, circular wait, no-


preemption

Given the two bellow processes sharing three semaphores


full, empty, mutex, and a buffer buff having initial N empty
slots:

10 trong 18 3:36 CH, 26/04/2020


Kiểm tra chương 3+4 [Link]

Question 10

Correct

Mark 1.00 out of


1.00

Flag question

11 trong 18 3:36 CH, 26/04/2020


Kiểm tra chương 3+4 [Link]

Which is incorrect about semaphore full?

Select one:
The maximum value of full is N.

The minimum value of full is 0.

The minimum value of full is -1.

It is a counting semaphore.

Question 11 Which is the CORRECT semaphore type?


Correct
Select one:
Mark 1.00 out of
1.00 Counting semaphore

Flag question Boolean semaphore

Waiting semaphore

Multiple value semaphore

Question 12 Given the following system information, and process P4


Incorrect requests (1, 0, 0) more resources:

Mark 0.00 out of


1.00

Remove flag

12 trong 18 3:36 CH, 26/04/2020


Kiểm tra chương 3+4 [Link]

Which is the correct value of FINISH and WORK vectors


during the running of Banker's algorithm which is called in
the Resource-Request algorithm (to avoid deadlock)?

Select one:
FINISH=(F, T, T, F, T), WORK=(6, 4, 3)

FINISH=(F, F, T, F, T), WORK=(5, 3, 3)

FINISH=(F, T, T, T, F), WORK=(6, 4, 3)

FINISH=(T, T, F, T, F), WORK=(6, 5, 3)

Question 13 Given the two bellow processes sharing three semaphores


Correct full, empty, mutex, and a buffer buff having initial N empty
slots:
Mark 1.00 out of
1.00

Flag question

13 trong 18 3:36 CH, 26/04/2020


Kiểm tra chương 3+4 [Link]

14 trong 18 3:36 CH, 26/04/2020


Kiểm tra chương 3+4 [Link]

Which is incorrect about semaphore empty?

Select one:
The minimum value of empty is 0.

It is a binary semaphore.

It is a counting semaphore.

The maximum value of empty is N.

Question 14 Which is a CRITERION to abort a process in a deadlock to


Correct recover the system?

Mark 1.00 out of


Select one:
1.00
The number of processes in the system
Flag question
The total number of available resources in the system

The available memory

The number of resources the process needs to finish

Question 15 Which is NOT a deadlock handling method?


Correct
Select one:
Mark 1.00 out of
1.00 deadlock ignorance

Flag question deadlock prevention

deadlock avoidance

deadlock prediction

Question 16 Which is incorrect about critical section?


Incorrect
Select one:
Mark 0.00 out of
1.00 It is the function manipulating the shared resource.

Remove flag It is the smallest code manipulating the shared resource.

Occurs if there is a race condition.

Occurs if multiple processes share a resource.

Question 17

15 trong 18 3:36 CH, 26/04/2020


Kiểm tra chương 3+4 [Link]

Correct Given the following resource allocation graph. What is the


Mark 1.00 out of
correct name of the edge from P2 to R3?
1.00

Flag question

Select one:
Request edge.

Assignment edge.

Claim edge.

Question 18 Given the following resource allocation graph. What is the


Correct correct name of the edge from R3 to P3?

Mark 1.00 out of


1.00

Flag question

16 trong 18 3:36 CH, 26/04/2020


Kiểm tra chương 3+4 [Link]

Select one:
Assignment edge.

Request edge.

Claim edge.

Question 19 Given the following resource allocation graph. What is the


Correct correct name of the edge from P1 to R2?

Mark 1.00 out of


1.00

Flag question

17 trong 18 3:36 CH, 26/04/2020


Kiểm tra chương 3+4 [Link]

Select one:
Assignment edge.

Claim edge.

Request edge.

Question 20 Which is incorrect with the mouse of a computer?


Correct
Select one:
Mark 1.00 out of
1.00 Multiple processes can use the mouse concurrently

Remove flag This is a shared resource of the system

There is a race condition with the mouse

There is a critical section with the mouse

Finish review

You are logged in as Phan Anh (Log out)


S2INT2206_9_1920

18 trong 18 3:36 CH, 26/04/2020


Kiểm tra chương 3+4 4/26/20, 16:29

UETOTS Lưu Lê Tuấn Đạt

Operating systems INT2206 9 (2019-2020)


Home ▶ My courses ▶ Operating Systems ▶ S2INT2206_9_1920 ▶ 26 April - 2 May ▶
Kiểm tra chương 3+4

Started on Sunday, 26 April 2020, 3:00 PM


QUIZ
NAVIGATION State Finished
Completed on Sunday, 26 April 2020, 3:35 PM
1 2 3 4
Time taken 35 mins
5 6 7 8 Marks 17.00/20.00
Grade 8.50 out of 10.00 (85%)
9 10 11 12

13 14 15 16
Question 1 Given the following system information:
17 18 19 20 Correct
ALLOCATION
Show one page at Mark 1.00 out of
REQUEST AVBALABLE
a time 1.00

Finish review Remove flag

PROCESS A B C
A B C A B
C

P0 0 1
0 0 0 0
0 0 0

P1 2 0
0 2 0 2

P2 3 0
3 0 0 1

[Link] Page 1 of 20
Kiểm tra chương 3+4 4/26/20, 16:29

P3 2 1
1 1 0 0

P4 0 0
2 0 0 2

Which is correct about the deadlock detection


algorithm?

Select one:
There algorithm results in FINISH=(T, F, T, F, F),
thus P1, P3 and P4 are in a deadlock.

There algorithm results in FINISH=(T, F, F, F, F),


thus P1, P2, P3 and P4 are in a deadlock.

There algorithm results in FINISH=(F, T, F, F, F),


thus P0, P2, P3 and P4 are in a deadlock.

There algorithm results in FINISH=(F, F, F, F, T),


thus P1, P2, P3 and P4 are in a deadlock.

Question 2 Which is incorrect with the mouse of a computer?


Correct
Select one:
Mark 1.00 out of
1.00 There is a critical section with the mouse

Remove flag There is a race condition with the mouse

Multiple processes can use the mouse


concurrently

This is a shared resource of the system

Question 3 Given the following resource allocation graph.


Correct What is the correct name of the edge from P1 to
R1?
Mark 1.00 out of
1.00

Flag question

[Link] Page 2 of 20
Kiểm tra chương 3+4 4/26/20, 16:29

Select one:
Claim edge.

Request edge.

Assignment edge.

Question 4 Which is INCORRECT about Resource Allocation


Correct Graph (RAG)?

Mark 1.00 out of


Select one:
1.00
A circle represents a process
Flag question
A rectangle represents a process

A request edge is from a process vertex to a


resource vertex

An edge from a resource vertex to a process


vertex represents an instance of the resources
is allocated to the process

[Link] Page 3 of 20
Kiểm tra chương 3+4 4/26/20, 16:29

Question 5 Given the following system information, and


Correct process P1 requests 1 more tape:

Mark 1.00 out of


ALLOCATION
1.00
MAX AVAILABLE
Remove flag

PROCESS TAPES TAPES


TAPES

P0 5
10 3

P1 2
4

P2 2
9

Which is the correct value of FINISH and WORK


vectors during the running of Banker's algorithm
which is called in the Resource-Request algorithm
(to avoid deadlock)?

Select one:
FINISH=(T, T, F), WORK=(10)

FINISH=(F, T, F), WORK=(10)

FINISH=(F, F, F), WORK=(10)

FINISH=(F, T, T), WORK=(10)

Question 6 Which is CORRECT about the goal of the progress


Correct condition of critical section?

Mark 1.00 out of


Select one:
1.00
It utilizes the shared resource effectively
Flag question

[Link] Page 4 of 20
Kiểm tra chương 3+4 4/26/20, 16:29

It makes the algorithm complicated to


implement

It ensures the correct use of the shared


resource

It supports the priority of processes

Question 7 Given the code of Readers-Writers problem:


Correct Process writer P:

Mark 1.00 out of


do {
1.00

Flag question

wait(wrt);

write(data_set);

signal(wrt);

}while (TRUE);

Process reader Q:

do {

wait(mutex);

readcount++;

if (readcount ==1) wai


t(wrt);

[Link] Page 5 of 20
Kiểm tra chương 3+4 4/26/20, 16:29

signal(mutex);

read(data_set);

wait(mutex);

readcount--;

if (readcount ==0) sig


nal(wrt);

signal(mutex);

} while (TRUE);

Which is the initialized value of the wrt variable in


the above algorithm?

Select one:
1

-1

NULL

Question 8 Given a global variable hit. Which statement has a


Correct race condition in the following code (when it is run
concurrently several instances):
Mark 1.00 out of
1.00
while (true) {
Flag question

[Link] Page 6 of 20
Kiểm tra chương 3+4 4/26/20, 16:29

var val=0;

waitForNewRequest();

if(found){

hit+=1;

val=hit;

Respond();

Select one:
Respond();

if(found){ ...}

waitForNewRequest();

No race condition at all

Question 9 Which is incorrect about process synchronization?


Correct
Select one:
Mark 1.00 out of
1.00
Process synchronization is needed when the
involving processes have a certain constraint
Remove flag
on execution.

[Link] Page 7 of 20
Kiểm tra chương 3+4 4/26/20, 16:29

Handshaking is one of the condition for the


need of process synchronization

Process synchronization uses IPC

Process synchronization is only in need when


the involving processes use a shared resource

Question 10 Given the code of crossroad problem, where


Incorrect semaphores conner[i] are implemented using
queue instead of while loop. Which of the following
Mark 0.00 out of
is incorrect?
1.00

Remove flag //CODE Car[i]

do {

wait(conner[i]);

wait(conner[(i+1)%4]);

Get_Over_The_Crossroad
(i);

signal(conner[i]);

signal(conner[(i+1)%4]
;

Continue_Going(i);

[Link] Page 8 of 20
Kiểm tra chương 3+4 4/26/20, 16:29

} while (TRUE);

Select one:
At a time, only a car can go through the
crossroad

wait(conner[i]) request to use a street corner[i]

When a car[i] got two corners, the cars in the


crossing road will have to wait

wait(conner[(i+1)%4]) request to use the street


corner ahead corner[i]

Question 11 Given the following system information, and


Incorrect process P4 requests (1, 0, 0) more resources:

Mark 0.00 out of


ALLOCATION
1.00
MAX AVBALABLE
Flag question

PROCESS A B C
A B C A B
C

[Link] Page 9 of 20
Kiểm tra chương 3+4 4/26/20, 16:29

P0 0
1 0 7 5
3 2 3 0

P1 3
0 2 3 2
2

P2 3
0 2 9 0
2

P3 2
1 1 2 2
2

P4 0
0 2 4 3
3

Which is the correct value of FINISH and WORK


vectors during the running of Banker's algorithm
which is called in the Resource-Request algorithm
(to avoid deadlock)?

Select one:
FINISH=(T, T, T, T, F), WORK=(9, 5, 5)

FINISH=(F, T, T, T, F), WORK=(9, 4, 5)

FINISH=(T, F, T, T, F), WORK=(9, 5, 5)

FINISH=(T, F, T, T, F), WORK=(6, 4, 5)

Question 12 Given the code of two semaphore atomic


Correct operation, where S is initialized by 1. Suppose
process P1 calls wait(S), and P2 calls wait(S)
Mark 1.00 out of

[Link] Page 10 of 20
Kiểm tra chương 3+4 4/26/20, 16:29

1.00 before P1 calling signal(S). Which of the following


is incorrect?
Remove flag

void wait(semaphore *S)

S->value--;

if (S->value<0) {

Add the reques


ted process P into S->L;

block(P);

void signal(semaphore *S)

S->value++;

if (S->value<=0) {

[Link] Page 11 of 20
Kiểm tra chương 3+4 4/26/20, 16:29

remove a proce
ss P from S->L;

wakeup(P);

Select one:
Since we have the waiting queue, there no
need to have the variable S->value in the
semaphore S

P1 can continue with its next instructions

The value of S->value is -1

P2 is put into the waiting queue L of S

Question 13 Given the following system information, and


Correct process P4 requests (1, 0, 0) more resources:

Mark 1.00 out of


ALLOCATION
1.00
MAX AVBALABLE
Remove flag

PROCESS A B C
A B C A B
C

P0 0
1 0 7 5
3 2 3 0

[Link] Page 12 of 20
Kiểm tra chương 3+4 4/26/20, 16:29

P1 3
0 2 3 2
2

P2 3
0 2 9 0
2

P3 2
1 1 2 2
2

P4 0
0 2 4 3
3

Which is the correct value of FINISH and WORK


vectors during the running of Banker's algorithm
which is called in the Resource-Request algorithm
(to avoid deadlock)?

Select one:
FINISH=(T, F, T, T, F), WORK=(9, 5, 6)

FINISH=(T, T, T, T, T), WORK=(10, 5, 7)

FINISH=(F, T, T, T, T), WORK=(9, 4, 6)

FINISH=(T, F, T, T, T), WORK=(10, 5, 7)

Question 14 Given the following resource allocation graph.


Correct What is the correct name of the edge from R3 to
P3?
Mark 1.00 out of
1.00

Flag question

[Link] Page 13 of 20
Kiểm tra chương 3+4 4/26/20, 16:29

Select one:
Assignment edge.

Claim edge.

Request edge.

Question 15 Given the following code, with the globally shared


Correct variable int buf, and count() is a function. Which is
correct when multiple instances of the code are
Mark 1.00 out of
running in the system?
1.00

Flag question while (true) {

//Some code

int val=buf;

[Link] Page 14 of 20
Kiểm tra chương 3+4 4/26/20, 16:29

val += count();//A tim


e consuming function

buf=val

//Some other code

Select one:
The globally shared variable buf will always
get an incorrect value when there are more
than 2 instances of the code running.

The globally shared variable buf will always


get an incorrect value when only 2 instances of
the code running.

The globally shared variable buf can get an


incorrect value when there are more than 1
instance of the code running.

The globally shared variable buf will always


get the correct value.

Question 16 Given the following code, with the globally shared


Incorrect variable int buf, and count() is a function. Which is
incorrect when multiple instances of the code are
Mark 0.00 out of
running in the system?
1.00

Flag question while (true) {

//Some code

[Link] Page 15 of 20
Kiểm tra chương 3+4 4/26/20, 16:29

int val=buf; //1.

val += count();//2. A
time consuming function

buf=val; //3.

val=val*4; //4.

//Some other code

Select one:
There is a race condition in the code.

The critical section should be the lines


marked: 1, 2, 3, 4

The critical section should be the lines


marked: 1, 2, 3

There is a critical section in the code.

Question 17 Which is not Interprocess Communication?


Correct
Select one:
Mark 1.00 out of
1.00
A process connects to a Database
Management System (such as Microsoft SQL
Flag question
Server)

A web browser views a webpage from a web


server.

A process writes data to a file.

[Link] Page 16 of 20
Kiểm tra chương 3+4 4/26/20, 16:29

A process sends signal to another process

Question 18 Given the following resource allocation graph,


Correct provide the name of the edge from P1 to R2
(Assignment, Claim,or Request)?
Mark 1.00 out of
1.00

Flag question

Answer:
Claim

Question 19 Given the following system information, and


Correct process P0 requests (0, 2, 0) more resources:

Mark 1.00 out of


ALLOCATION
1.00
MAX AVBALABLE
Remove flag

PROCESS A B
C A B C
A B C

[Link] Page 17 of 20
Kiểm tra chương 3+4 4/26/20, 16:29

P0 0
3 0 7 5
3 2 1 0

P1 3
0 2 3 2
2

P2 3
0 2 9 0
2

P3 2
1 1 2 2
2

P4 0
0 2 4 3
3

Which is the final value of FINISH and WORK


vectors of Banker's algorithm which is called in the
Resource-Request algorithm (to avoid deadlock)?

Select one:
FINISH=(F, T, F, F, F), WORK=(2, 1, 0)

FINISH=(F, F, F, F, F), WORK=(2, 3, 0)

FINISH=(F, F, F, T, F), WORK=(2, 1, 0)

FINISH=(F, F, F, F, F), WORK=(2, 1, 0)

Question 20 Given the following information of the system.


Correct

Mark 1.00 out of


1.00

[Link] Page 18 of 20
Kiểm tra chương 3+4 4/26/20, 16:29

Flag question
Pro Allocation
Max
Available

A B
C A B
C A B
C

P0 0 0
1 0 0
1 1 5
2

P1 1 0
0 1 7
5

P2 1 3
5 2 3
5

P3 0 6
3 0 6
5

P4 0 0
1 0 6
5

If P4 requests resource A B C (0 5 2), the resource


request algorithm will produce:

Select one:

[Link] Page 19 of 20
UETOTS Phan Công Hậu

Operating systems INT2206 9 (2019-2020)


Home ► My courses ► Operating Systems ► S2INT2206_9_1920 ► 5 April - 11 April ► Bài kiểm tra chương 1 + 2

Started on Sunday, 5 April 2020, 8:32 PM


QUIZ NAVIGATION
State Finished
1 2 3 4 5 6 7 Completed on Sunday, 5 April 2020, 8:57 PM
8 9 10 11 12 13 14 Time taken 25 mins 42 secs
Marks 20.00/20.00
15 16 17 18 19 20
Grade 10.00 out of 10.00 (100%)
Show one page at a time
Finish review Question 1 Which is INCORRECT about First Comes First Served (FCFS) CPU scheduling algorithm?
Correct
Select one:
Mark 1.00 out of
1.00 A process can be switched from running into waiting state

Flag question Once a process is executed, it can only be switched into terminated state

A process cannot be switched into ready state


It is a non-preemptive algorithm

Question 2 Suppose a system uses RR scheduling algorithm. The processes information (arrival time,
Correct duration) is P1(0, 25), P3(20, 40), P2(30, 10), P4(35, 25), and the time quantum is 15. Which is
the response time of P2?
Mark 1.00 out of
1.00
Select one:
Flag question
10
20

15

Question 3 Which is the CORRECT relationship among process, program and application concepts?
Correct
Select one:
Mark 1.00 out of
1.00 An application may have several processes, a process may have several programs

Flag question An application may have several programs, a program may have several processes

An application may have several programs, a program has only one process
An application has only one program, a program has only one process

Question 4 Which is INCORRECT about the states of a process?


Correct
Select one:
Mark 1.00 out of
1.00 A process can be switched from running into ready state

Flag question Valid states are new, ready, running, waiting and terminated

The number of states of a process is the same in all operating systems

A process can be switched from running into waiting state

Question 5 Suppose a system uses FCFS CPU scheduling algorithm. The duration and order of the process
Correct are P1(20), P2(11), P3(6). Which is the average waiting time of the processes?

Mark 1.00 out of


Select one:
1.00
27
Flag question
17
47

37

Question 6 Which is NOT a criterion to evaluate a CPU scheduling algorithm?


/
Correct Select one:
Mark 1.00 out of Waiting time
1.00
RAM utilization
Flag question
CPU utilization

Response time

Question 7 Which is NOT the purpose of virtual machine?


Correct
Select one:
Mark 1.00 out of
1.00 Allow operating systems on the same hardware to use some resources (such as IP, port,
domain name,...) independently
Flag question
Allow multiple operating system to run on the same hardware

Utilize RAM and CPU more effectively


Increase the number of processes in memory

Question 8 Suppose a system uses SJF scheduling algorithm, the processes information (arrival time,
Correct duration) is P1(0,21), P2(30,20),P3(20,40), P4(35,15). Show the order (e.g. P2 P1 P3 P4) in
which the processes are run?
Mark 1.00 out of
1.00
Answer: P1 P3 P4 P2
Flag question

Question 9 Suppose a system uses Round Robin (RR) CPU scheduling algorithm, the processes information
Correct (arrival time, duration) is P1(0,21), P2(30,10), P3(20,40), P4(40,25), and the time quantum is 15.
Calculate the total waiting time of the processes?
Mark 1.00 out of
1.00
Answer: 63
Flag question

Question 10 Suppose a system uses SJN (or SJF) scheduling algorithm. The processes information (arrival
Correct time, duration) is P1(0,7), P2(2,4), P3(4,1), P4(5,5). Calculate the response time of P1 ?

Mark 1.00 out of


1.00 Answer: 0

Flag question

Question 11 Which is CORRECT about a process?


Correct
Select one:
Mark 1.00 out of
1.00 Is a library

Flag question Is a file on hard disk


Is an application

Is an instance of a program

Question 12 Suppose a system uses SJN (or SJF) CPU scheduling algorithm. The processes information
Correct (arrival time, duration) is P1(0,7), P2(2,4), P3(4,1), P4(5,5). Which is the total waiting time of the
processes?
Mark 1.00 out of
1.00
Select one:
Flag question
18

15

16
17

Question 13 Suppose a system uses SJN (or SJF) scheduling algorithm. The processes information (arrival
Correct time, duration) is P1(0,7), P2(2,4), P3(4,1), P4(5,5). Calculate the response time of process P3 ?

Mark 1.00 out of


1.00 Answer: 3
Flag question

/
Question 14 Which module should NOT be implemented in the kernel of operating systems?
Correct
Select one:
Mark 1.00 out of
1.00 Process management module

Flag question Device drivers (such as network card device drivers)

Networking module

Memory management module

Question 15 Which is INCORRECT about time-sharing system?


Correct
Select one:
Mark 1.00 out of
1.00 Allow several processes to run on a single CPU hardware

Flag question It is also applicable for multiple CPU hardware


Only utilize CPU effectively

Utilize resources more effectively

Question 16 Which is INCORRECT about Shortest Remaining Time First (SRTF) scheduling algorithm?
Correct
Select one:
Mark 1.00 out of
1.00 The shortest process will be run first

Flag question It is also a priority scheduling algorithm

The shortest remaining time process will be selected to run

It is the preemptive Shortest Job First (SJF) algorithm

Question 17 Suppose a system uses FCFS scheduling algorithm, the processes information (arrival time,
Correct duration) is P1(0,21), P2(30,10),P3(20,40), P4(50,15). Show the order in which the processes are
run (e.g. P2 P1 P3 P4)?
Mark 1.00 out of
1.00
Answer: P1 P3 P2 P4
Flag question

Question 18 Which is NOT one of the main tasks of operating systems?


Correct
Select one:
Mark 1.00 out of
1.00 Play audio files

Flag question Memory management

Storage management (such as CD, DVD, disks, ...)


Protection and security

Question 19 Suppose a system uses SJN (or SJF) scheduling algorithm. The processes information (arrival
Correct time, duration) is P1(0,7), P2(2,4), P3(4,1), P4(5,5). Which is the turnaround time of process P2 ?

Mark 1.00 out of


Select one:
1.00
6
Flag question
12

10

Question 20 Select INCORRECT description about the main tasks of operating systems
Correct
Select one:
Mark 1.00 out of
1.00 Provide database management systems (e.g. MS SQL Server)

Flag question Process management

Provide Application Programming Interface (API) for application developers

Resource allocation (for processes)

/
Finish review

You are logged in as Phan Công Hậu (Log out)


S2INT2206_9_1920

/
UETOTS Phan Anh

Operating systems INT2206 9 (2019-2020)


Home ► My courses ► Operating Systems ► S2INT2206_9_1920 ► 5 April - 11 April ►
Bài kiểm tra chương 1 + 2

Started on Sunday, 5 April 2020, 8:30 PM


State Finished
Completed on Sunday, 5 April 2020, 9:00 PM
Time taken 30 mins
Marks 20.00/20.00
Grade 10.00 out of 10.00 (100%)

Question 1 Which is NOT a criterion to evaluate a CPU scheduling algorithm?


Correct
Select one:
Mark 1.00 out of
1.00 Response time

Flag question CPU utilization


RAM utilization
Waiting time

Question 2 Which is the BEST reason why we need process scheduling?


Correct
Select one:
Mark 1.00 out of
1.00 Because the system has many processes to run

Flag question Many reasons: Many processes; Utilize system resources more effectively; Don’t let
users wait; ...

Because the system has many processes to run and they need to be treated equally
Because we need to utilize the memory more effectively

Question 3 Which code a CPU can understand and execute?


Correct
Select one:
Mark 1.00 out of
1.00 a=a+b

Remove flag 0110010110

[Link]();
add AX, BX
/
Question 4 Suppose a system uses RR scheduling algorithm. The processes information (arrival time,
Correct duration) is P1(0, 25), P3(20, 40), P2(30, 10), P4(35, 25), and the time quantum is 15.
Which is the waiting time of P1?
Mark 1.00 out of
1.00
Select one:
Flag question
15

20
10
0

Question 5 Which is the INCORRECT process scheduling type?


Correct
Select one:
Mark 1.00 out of
1.00 Short-term scheduler

Flag question Medium-term scheduler

Quick-term scheduler
Long-term scheduler

Question 6 Which is the correct type of Windows XP?


Correct
Select one:
Mark 1.00 out of
1.00 Embedded

Flag question Special purpose

Uni-programming
Multi-programming

Question 7 Which is INCORRECT about multi-user operating systems?


Correct
Select one:
Mark 1.00 out of
1.00 Allow each user to run several processes at the same time

Flag question It is the same as a multi-programming operating system

Allow several processes to run on a single CPU hardware


Allow several people to use the computer at the same time

Question 8 Select the best description about operating systems for computers
Correct
Select one:
/
Mark 1.00 out of They are applications
1.00
They are libraries
Flag question
They are software that are between users and computer hardware
They are firmware

Question 9 Which is INCORRECT about an application?


Correct
Select one:
Mark 1.00 out of
1.00 A database management system is an example of an application

Flag question It can be organized into multiple files on disks.

It serves a certain task for users or programmers


It controls I/O (such as read/write operations on disks)

Question 10 Suppose a system uses FCFS CPU scheduling algorithm. The duration and order of the
Correct process are P1(20), P2(11), P3(6). Which is the average waiting time of the processes?

Mark 1.00 out of


Select one:
1.00
47
Flag question
17

27
37

Question 11 Suppose a system uses SJN (or SJF) scheduling algorithm. The processes information
Correct (arrival time, duration) is P1(0,7), P2(2,4), P3(4,1), P4(5,5). Calculate the turnaround time of
P1 ?
Mark 1.00 out of
1.00
Answer: 7
Flag question

Question 12 Which is NOT the purpose of virtual machine?


Correct
Select one:
Mark 1.00 out of
1.00 Increase the number of processes in memory

Remove flag Allow operating systems on the same hardware to use some resources (such as IP,
port, domain name,...) independently
Utilize RAM and CPU more effectively
Allow multiple operating system to run on the same hardware

/
Question 13 Which is INCORRECT about Shortest Remaining Time First (SRTF) scheduling algorithm?
Correct
Select one:
Mark 1.00 out of
1.00 It is also a priority scheduling algorithm

Flag question The shortest remaining time process will be selected to run
The shortest process will be run first
It is the preemptive Shortest Job First (SJF) algorithm

Question 14 What language a CPU can understand?


Correct
Select one:
Mark 1.00 out of
1.00 Assembly

Remove flag Binary code (0110010110)

C++
C

Question 15 Suppose a system uses RR scheduling algorithm. The processes information (arrival time,
Correct duration) is P1(0, 25), P3(20, 40), P2(30, 10), P4(35, 25), and the time quantum is 15.
Which is the response time of P1?
Mark 1.00 out of
1.00
Select one:
Flag question
10
0

20
15

Question 16 Which is NOT an operating system type?


Correct
Select one:
Mark 1.00 out of
1.00 Batch system

Flag question Uni-programming operating system

Embedded system
Sequential system,

Question 17 Which is INCORRECT about context switch?


Correct
Select one:
/
Mark 1.00 out of It is the steps of switching to run another process
1.00
The current process will be put into waiting queue
Flag question
The target process will be run
The context of the current process will be saved

Question 18 Which is non-preemptive CPU scheduling algorithm?


Correct
Select one:
Mark 1.00 out of
1.00 SRTF

Flag question FIFO

Round robin
None of the above

Question 19 Which is NOT an operating system structure?


Correct
Select one:
Mark 1.00 out of
1.00 Modularity

Flag question Object-oriented

Layered
Micro-kernel

Question 20 Suppose a system uses FCFS CPU scheduling algorithm, the processes information (arrival
Correct time, duration) is P1(0,21), P2(30,10),P3(20,40), P4(40,25). Calculate the average waiting
time of the processes?
Mark 1.00 out of
1.00
Answer: 15.75
Flag question

Finish review

QUIZ NAVIGATION

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
Show one page at a time
Finish review

/
You are logged in as Phan Anh (Log out)
S2INT2206_9_1920

/
UETOTS Nguyễn Thị Huệ

Operating systems INT2206 9 (2019-2020)


Home ► My courses ► Operating Systems ► S2INT2206_9_1920 ► 5 April - 11 April ►
Bài kiểm tra chương 1 + 2

Started on Sunday, 5 April 2020, 8:34 PM


State Finished
Completed on Sunday, 5 April 2020, 9:03 PM
Time taken 29 mins 52 secs
Marks 20.00/20.00
Grade 10.00 out of 10.00 (100%)

Question 1 Suppose a system uses Round Robin (RR) CPU scheduling algorithm, the processes
Correct information (arrival time, duration) is P1(0,21), P2(30,10), P3(20,40), P4(40,25), and the
time quantum is 15. Calculate the total waiting time of the processes?
Mark 1.00 out of
1.00

Remove flag
Answer: 63

Question 2 Which is INCORRECT about time-sharing system?


Correct
Select one:
Mark 1.00 out of
1.00 Only utilize CPU effectively

Flag question It is also applicable for multiple CPU hardware

Utilize resources more effectively

Allow several processes to run on a single CPU hardware

Question 3 Which is the correct type of Windows XP?


Correct
Select one:
Mark 1.00 out of
1.00 Uni-programming

Flag question Multi-programming


Special purpose

Embedded

/
Question 4 Suppose a system uses SJN (or SJF) scheduling algorithm. The processes information
Correct (arrival time, duration) is P1(0,7), P2(2,4), P3(4,1), P4(5,5). Calculate the response time of
P4 ?
Mark 1.00 out of
1.00

Remove flag
Answer: 7

Question 5 Suppose a system uses FCFS CPU scheduling algorithm. The duration and order of
Correct processes are P1(21), P2(10), P3(6). Which is the throughput of the system?

Mark 1.00 out of


Select one:
1.00
0.3
Remove flag
0.4
0.2

0.1

Question 6 Suppose a system uses SRTF scheduling algorithm. The processes information (arrival
Correct time, duration) is P1(0,21), P2(30,10),P3(20,40), P4(40,15). Show the order (e.g. P2, P1,
P3, P4) in which the processes are run?
Mark 1.00 out of
1.00
Answer: P1, P3, P2, P4, P3
Remove flag

Question 7 Which is INCORRECT about batch system?


Correct
Select one:
Mark 1.00 out of
1.00 Is not like time-sharing system

Flag question May use FIFO mechanism

Is a simple operating system


Allow many people to use a computer concurrently

Question 8 Suppose a system uses RR scheduling algorithm. The processes information (arrival time,
Correct duration) is P1(0, 25), P3(20, 40), P2(30, 10), P4(35, 25), and the time quantum is 15.
Which is the response time of P1?
Mark 1.00 out of
1.00
Select one:
Remove flag
0
10
15

20 /
Question 9 Suppose a system uses SJN (or SJF) CPU scheduling algorithm. The processes
Correct information (arrival time, duration) is P1(0,7), P2(2,4), P3(4,1), P4(5,5). Which is the total
waiting time of the processes?
Mark 1.00 out of
1.00
Select one:
Remove flag
17
16
18

15

Question 10 Suppose a system uses SJF scheduling algorithm, the processes information (arrival time,
Correct duration) is P1(0,21), P2(30,20),P3(20,40), P4(35,15). Show the order (e.g. P2 P1 P3 P4) in
which the processes are run?
Mark 1.00 out of
1.00
Answer: P1 P3 P4 P2
Remove flag

Question 11 Which is NOT one of the main tasks of operating systems?


Correct
Select one:
Mark 1.00 out of
1.00 Memory management

Flag question Storage management (such as CD, DVD, disks, ...)

Protection and security


Play audio files

Question 12 Suppose a system uses SJN (or SJF) scheduling algorithm. The processes information
Correct (arrival time, duration) is P1(0,7), P2(2,4), P3(4,1), P4(5,5). Calculate the response time of
process P3 ?
Mark 1.00 out of
1.00
Answer: 3
Remove flag

Question 13 Which is the BEST reason why we need process scheduling?


Correct
Select one:
Mark 1.00 out of
1.00 Because the system has many processes to run and they need to be treated equally

Flag question Many reasons: Many processes; Utilize system resources more effectively; Don’t let
users wait; ...
/
Because we need to utilize the memory more effectively

Because the system has many processes to run

Question 14 Suppose a system uses RR scheduling algorithm. The processes information (arrival time,
Correct duration) is P1(0, 25), P3(20, 40), P2(30, 10), P4(35, 25), and the time quantum is 15.
Which is the waiting time of P2?
Mark 1.00 out of
1.00
Select one:
Remove flag
5

20
0
10

Question 15 Suppose a system uses SJN (or SJF) scheduling algorithm. The processes information
Correct (arrival time, duration) is P1(0,7), P2(2,4), P3(4,1), P4(5,5). Calculate the turnaround time of
P1 ?
Mark 1.00 out of
1.00

Remove flag
Answer: 7

Question 16 Which is the CORRECT statement about a program?


Correct
Select one:
Mark 1.00 out of
1.00 Is a compiled (e.g binary code) application

Flag question Is a library


Is a process

Is a part of the operating system

Question 17 Suppose a system uses RR scheduling algorithm. The processes information (arrival time,
Correct duration) is P1(0, 25), P3(20, 40), P2(30, 10), P4(35, 25), and the time quantum is 15.
Which is the throughput of P1?
Mark 1.00 out of
1.00
Select one:
Remove flag
0.04

0.02
0.01

0.03

/
Question 18 Which is the CORRECT relationship among process, program and application concepts?
Correct
Select one:
Mark 1.00 out of
1.00 An application may have several programs, a program may have several processes

Flag question An application may have several processes, a process may have several programs
An application has only one program, a program has only one process
An application may have several programs, a program has only one process

Question 19 Which is CORRECT about the structure of a process?


Correct
Select one:
Mark 1.00 out of
1.00 Stack, heap, code (text)

Flag question Data, code (text)

Heap, data, code (text)


Stack, heap, data, code (text), program counter, and addtional information

Question 20 Which is NOT an operating system type?


Correct
Select one:
Mark 1.00 out of
1.00 Embedded system

Flag question Batch system

Sequential system,
Uni-programming operating system

Finish review

QUIZ NAVIGATION

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
Show one page at a time
Finish review

You are logged in as Nguyễn Thị Huệ (Log out)


S2INT2206_9_1920

/
UETOTS Phan Anh

Operating systems INT2206 9 (2019-2020)


Home ► My courses ► Operating Systems ► S2INT2206_9_1920 ► 14 June - 20 June ►
Bài kiểm tra chương 7 +8

Started on Sunday, 14 June 2020, 3:30 PM


State Finished
Completed on Sunday, 14 June 2020, 4:01 PM
Time taken 31 mins
Marks 19.00/20.00
Grade 9.50 out of 10.00 (95%)

Question 1 A UNIX file system has 12 direct pointers (named from 1 to 12), 1 single indirect pointer, 1
Correct double indirect pointer, 1 triple indirect pointer; the block size is 1KB, and the pointer is 4
byte. Given the logical address x=98364. Which is the correct information about the location
Mark 1.00 out of
of the above address?
1.00

Flag question Select one:


SINGLE INDIRECT POINTER (block,offset)=(82, 60)

SINGLE INDIRECT POINTER (block,offset)=(81, 60)


SINGLE INDIRECT POINTER (block,offset)=(80, 60)
SINGLE INDIRECT POINTER (block,offset)=(84, 60)

Question 2 Given the following RAID system in the following figure. Suppose each disk is 500GB,
Correct which is the maximum size of data can be stored on the system?

Mark 1.00 out of


1.00

Flag question

Select one:
approximate 1 TB

approximate 3 TB /
approximate 1.5 TB
approximate 2 TB

Question 3 Suppose a level-6 RAID system has 12 hard-disks of size 500 GB. How much is the
Correct performance of the system improved?

Mark 1.00 out of


Select one:
1.00
10 times
Flag question
12 times
9 times
11 times

Question 4 Suppose a disk has 200 cylinders (marked from 0 to 199); the head is currently at the
Correct cylinder 53; Disk request string is 98, 183, 37, 122, 14, 124, 65, 67. Suppose SSTF disk
scheduling algorithm is used, calculate the total cylinders the head has to move to serve the
Mark 1.00 out of
above requests (e.g. 432)?
1.00

Flag question
Answer: 236

Question 5 Suppose a disk has 200 cylinders (marked from 0 to 199); the head is currently at the
Correct cylinder 75 with the direction toward the cylinder 199; The disk request string is 98, 183, 37,
122, 14. Suppose LOOK disk scheduling algorithm is used, calculate the total number of
Mark 1.00 out of
cylinders the head has to move (e.g. 432)?
1.00

Flag question
Answer: 277

Question 6 A system uses linked list disk allocation with the block size of 2KB; the pointer size of 4
Correct bytes. Suppose a file has the size of 15.5MB. Calculate the offset in the block containing
data at file offset (from 0) 68 KB?
Mark 1.00 out of
1.00
Answer: 140
Remove flag

Question 7 Suppose a system uses (1-level) indexed allocation with the block size of 4KB; the pointer
Correct size of 4 bytes. A file has the size of 3MB. Which is the correct location at the file offset
(from 0) 27 KB?
Mark 1.00 out of
1.00
Select one:
Remove flag
(block index, offset)=(7, 3071) /
(block index, offset)=(8, 3071)
(block index, offset)=(7, 3072)
(block index, offset)=(8, 3072)

Question 8 Suppose a system uses contiguous disk allocation with the block size of 2KB. A file has the
Correct size of 12.3MB. Which is the correct location of the file offset (from 0) 415 KB?

Mark 1.00 out of


Select one:
1.00
(block index, offset)=(208, 1024)
Flag question
(block index, offset)=(208, 0)

(block index, offset)=(207, 0)


(block index, offset)=(207, 1024)

Question 9 Suppose a disk has 200 cylinders (marked from 0 to 199); the head is currently at the
Correct cylinder 161; the disk request string is 28, 83, 137, 12, 141. Suppose FCFS disk scheduling
algorithm is used, calculate the total cylinders the head has to move to serve the above
Mark 1.00 out of
requests (e.g. 432)?
1.00

Flag question
Answer: 496

Question 10 Given the following RAID system in the following figure. How much is the performance of
Correct the system improved?

Mark 1.00 out of


1.00

Flag question

Select one:
2 times

4 times
5 times
3 times
/
Question 11 A UNIX file system has 12 direct pointers (named from 1 to 12), 1 single indirect pointer, 1
Correct double indirect pointer, 1 triple indirect pointer; the block size is 2KB, and the pointer is 4
bytes. Given a valid logical address x=2493668. Which is the correct information about the
Mark 1.00 out of
location of the above address?
1.00

Remove flag Select one:


DOUPLE INDIRECT POINTER (index_block,block,offset)=(1, 180, 1252)

DOUPLE INDIRECT POINTER (index_block,block,offset)=(1, 178, 1252)


DOUPLE INDIRECT POINTER (index_block,block,offset)=(1, 179, 1252)
DOUPLE INDIRECT POINTER (index_block,block,offset)=(1, 181, 1252)

Question 12 Suppose a disk has 200 cylinders (marked from 0 to 199); the head is currently at the
Correct cylinder 53 with the direction toward the cylinder 199; The disk request string is 98, 183, 37,
122, 14, 124, 65, 67. Suppose C-LOOK disk scheduling algorithm is used (serving direction
Mark 1.00 out of
is from 0 to 199), calculate the total number of cylinders the head has to move (e.g. 432)?
1.00

Flag question
Answer: 322

Question 13 A system uses extent-based disk allocation with the block size of 2KB. An extent consists of
Correct 100 blocks; a file has the size of 25.3MB. Calculate the extent number (starting from 0) at
file offset (from 0) 14MB?
Mark 1.00 out of
1.00
Answer: 71
Flag question

Question 14 A system uses linked list disk allocation with the block size of 2KB; the pointer size of 4
Correct bytes. Suppose a file has the size of 15.5MB. Calculate the block number (starting from 0)
of the location at file offset (from 0) 68 KB?
Mark 1.00 out of
1.00
Answer: 34
Flag question

Question 15 Suppose a system uses (1-level) indexed allocation with the block size of 4KB; the pointer
Correct size of 4 bytes. A file has the size of 3MB. Which is the correct location at the file offset
(from 0) 35KB?
Mark 1.00 out of
1.00
Select one:
Flag question
(block index, offset)=(8, 3072)

(block index, offset)=(9, 3072)


(block index, offset)=(8, 3071)
/
(block index, offset)=(9, 3071)

Question 16 Suppose a disk has 200 cylinders (marked from 0 to 199); the head is currently at the
Correct cylinder 56 with the direction toward the cylinder 199; The disk request string is 98, 183, 37,
122, 14. Suppose LOOK disk scheduling algorithm is used, calculate the total number of
Mark 1.00 out of
cylinders the head has to move (e.g. 432)?
1.00

Flag question
Answer: 296

Question 17 A UNIX file system has 12 direct pointers (named from 1 to 12), 1 single indirect pointer, 1
Incorrect double indirect pointer, 1 triple indirect pointer; the block size is 2KB, and the pointer is 4
bytes. Given a valid logical address x=2493668. Which is the correct information about the
Mark 0.00 out of
location of the above address?
1.00

Remove flag Select one:


DOUPLE INDIRECT POINTER (index_block,block,offset)=(2, 181, 1252)

DOUPLE INDIRECT POINTER (index_block,block,offset)=(1, 181, 1252)


DOUPLE INDIRECT POINTER (index_block,block,offset)=(2, 180, 1252)
DOUPLE INDIRECT POINTER (index_block,block,offset)=(1, 180, 1252)

Question 18 Suppose a disk has 200 cylinders (marked from 0 to 199); the head is currently at the
Correct cylinder 17; the disk request string is 28, 83, 137, 12, 141. Suppose FCFS disk scheduling
algorithm is used, calculate the total cylinders the head has to move to serve the above
Mark 1.00 out of
requests (e.g. 432)?
1.00

Flag question
Answer: 374

Question 19 A UNIX file system has 12 direct pointers (named from 1 to 12), 1 single indirect pointer, 1
Correct double indirect pointer, 1 triple indirect pointer; the block size is 1KB, and the pointer is 4
byte. Given the logical address x=54984. Which is the correct information about the location
Mark 1.00 out of
of the above address?
1.00

Flag question Select one:


SINGLE INDIRECT POINTER (block,offset)=(39, 712)
SINGLE INDIRECT POINTER (block,offset)=(40, 712)
SINGLE INDIRECT POINTER (block,offset)=(42, 712)

SINGLE INDIRECT POINTER (block,offset)=(41, 712)

/
Question 20 Given the following RAID-2 system in the following figure. Suppose each disk is 120 GB,
Correct which is the maximum size of data can be stored on the system?

Mark 1.00 out of


1.00

Flag question

Select one:
approximate 720 GB
approximate 480 GB
approximate 240 GB

approximate 360 GB

Finish review

QUIZ NAVIGATION

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
Show one page at a time
Finish review

You are logged in as Phan Anh (Log out)


S2INT2206_9_1920

/
/
/
/
/
/
Bài kiểm tra chương 1 + 2 4/5/20, 21:01

UETOTS Lưu Lê Tuấn Đạt

Operating systems INT2206 9 (2019-2020)


Home ▶ My courses ▶ Operating Systems ▶ S2INT2206_9_1920 ▶ 5 April - 11 April ▶
Bài kiểm tra chương 1 + 2

Started on Sunday, 5 April 2020, 8:30 PM


QUIZ
NAVIGATION State Finished
Completed on Sunday, 5 April 2020, 9:00 PM
1 2 3 4
Time taken 30 mins 1 sec
5 6 7 8 Marks 20.00/20.00
Grade 10.00 out of 10.00 (100%)
9 10 11 12

13 14 15 16
Question 1 Suppose a system uses SJN (or SJF) scheduling
17 18 19 20 Correct algorithm. The processes information (arrival time,
Show one page at duration) is P1(0,7), P2(2,4), P3(4,1), P4(5,5).
Mark 1.00 out of
a time Calculate the response time of P4 ?
1.00

Finish review Flag question


Answer: 7

Question 2 Which is INCORRECT about an application?


Correct
Select one:
Mark 1.00 out of
1.00
It serves a certain task for users or
programmers
Flag question
It can be organized into multiple files on disks.

A database management system is an


example of an application

It controls I/O (such as read/write operations


on disks)

Question 3 Suppose a system uses RR scheduling algorithm.


Correct The processes information (arrival time, duration) is
P1(0, 25), P3(20, 40), P2(30, 10), P4(35, 25), and
Mark 1.00 out of
1.00

[Link] Page 1 of 7
Bài kiểm tra chương 1 + 2 4/5/20, 21:01

Flag question the time quantum is 15. Which is the running order
of the processes?

Select one:
P1, P3, P2, P4, P3, P4, P3

P1, P1, P2, P3, P4, P3, P4, P3

P1, P1, P3, P2, P3, P4, P3, P4

P1, P1, P3, P2, P4, P3, P4, P3

Question 4 Suppose a system uses RR scheduling algorithm.


Correct The processes information (arrival time, duration) is
P1(0, 25), P3(20, 40), P2(30, 10), P4(35, 25), and
Mark 1.00 out of
the time quantum is 15. Which is the response
1.00
time of P4?
Flag question

Select one:
10

20

15

Question 5 Which is INCORRECT about preemptive in CPU


Correct scheduling algorithms?

Mark 1.00 out of


Select one:
1.00
The current process will always be run until
Flag question
terminated

The current process can be switched into


ready state

The current process can be switched into


waiting state

The current process can be switched into


waiting terminated state

Question 6 Which is NOT one of the main tasks of operating


Correct systems?

[Link] Page 2 of 7
Bài kiểm tra chương 1 + 2 4/5/20, 21:01

Mark 1.00 out of Select one:


1.00 Memory management
Flag question Protection and security

Storage management (such as CD, DVD,


disks, ...)

Play audio files

Question 7 Suppose a system uses SRTF scheduling


Correct algorithm. The processes information (arrival time,
duration) is P1(0,21), P2(30,10),P3(20,40),
Mark 1.00 out of
P4(40,15). Show the order (e.g. P2, P1, P3, P4) in
1.00
which the processes are run?
Remove flag

Answer:
P1, P3, P2, P4, P3

Question 8 Select the best description about what a pure


Correct computer (a computer without an operating
system) can do
Mark 1.00 out of
1.00
Select one:
Flag question
Provide applications and network connection
for users

Provide applications for users

Provide graphical user interface

CPU can do arithmetic calculation, detect


available devices such as RAM, disks, ...

Question 9 Suppose a system uses RR scheduling algorithm.


Correct The processes information (arrival time, duration) is
P1(0, 25), P3(20, 40), P2(30, 10), P4(35, 25), and
Mark 1.00 out of
the time quantum is 15. Which is the waiting time
1.00
of P2?
Flag question

Select one:
20

[Link] Page 3 of 7
Bài kiểm tra chương 1 + 2 4/5/20, 21:01

10

Question 10 Suppose a system uses SJN (or SJF) scheduling


Correct algorithm. The processes information (arrival time,
duration) is P1(0,7), P2(2,4), P3(4,1), P4(5,5). Which
Mark 1.00 out of
is the turnaround time of process P2 ?
1.00

Flag question Select one:


10

12

Question 11 Which code a CPU can understand and execute?


Correct
Select one:
Mark 1.00 out of
1.00 0110010110

Flag question [Link]();

add AX, BX

a=a+b

Question 12 Suppose a system uses SJN (or SJF) scheduling


Correct algorithm. The processes information (arrival time,
duration) is P1(0,7), P2(2,4), P3(4,1), P4(5,5).
Mark 1.00 out of
Calculate the turnaround time of P1 ?
1.00

Flag question
Answer: 7

Question 13 Suppose a system uses SJN (or SJF) CPU


Correct scheduling algorithm. The processes information
(arrival time, duration) is P1(0,7), P2(2,4), P3(4,1),
Mark 1.00 out of
1.00

[Link] Page 4 of 7
Bài kiểm tra chương 1 + 2 4/5/20, 21:01

Flag question P4(5,5). Which is the total waiting time of the


processes?

Select one:
17

16

15

18

Question 14 Which is NOT a criterion to evaluate a CPU


Correct scheduling algorithm?

Mark 1.00 out of


Select one:
1.00
Response time
Flag question
Waiting time

CPU utilization

RAM utilization

Question 15 Suppose a system uses FCFS CPU scheduling


Correct algorithm. The duration and order of processes are
P1(21), P2(10), P3(6). Which is the throughput of
Mark 1.00 out of
the system?
1.00

Flag question Select one:


0.1

0.2
0.3

0.4

Question 16 Which is INCORRECT about Shortest Remaining


Correct Time First (SRTF) scheduling algorithm?

Mark 1.00 out of


Select one:
1.00
It is also a priority scheduling algorithm
Flag question
It is the preemptive Shortest Job First (SJF)

[Link] Page 5 of 7
Bài kiểm tra chương 1 + 2 4/5/20, 21:01

algorithm

The shortest remaining time process will be


selected to run

The shortest process will be run first

Question 17 Suppose a system uses SRTF (or preemtive SJF)


Correct scheduling algorithm. The processes information
(arrival time, duration) is P1(0,24), P2(20,40),
Mark 1.00 out of
P3(30,10), P4(50,15). Show the order (e.g. P1 P3
1.00
P1 P4 ...) in which the processes are run?
Flag question

Answer:
P1 P2 P3 P2 P4 P2

Question 18 Which is INCORRECT about context switch?


Correct
Select one:
Mark 1.00 out of
1.00 The current process will be put into waiting
queue
Flag question
It is the steps of switching to run another
process
The context of the current process will be
saved

The target process will be run

Question 19 Which is NOT the purpose of virtual machine?


Correct
Select one:
Mark 1.00 out of
1.00 Allow multiple operating system to run on the
same hardware
Remove flag
Allow operating systems on the same
hardware to use some resources (such as IP,
port, domain name,...) independently

Utilize RAM and CPU more effectively

Increase the number of processes in memory

[Link] Page 6 of 7
Bài kiểm tra chương 1 + 2 4/5/20, 21:01

Question 20 Suppose a system uses RR scheduling algorithm.


Correct The processes information (arrival time, duration) is
P1(0, 25), P3(20, 40), P2(30, 10), P4(35, 25), and
Mark 1.00 out of
the time quantum is 15. Which is the response
1.00
time of P3?
Flag question

Select one:
0

10

15

Finish review

You are logged in as Lưu Lê Tuấn Đạt (Log out)


S2INT2206_9_1920

[Link] Page 7 of 7
Bài kiểm tra chương 7 + 8 6/14/20, 15:36

UETOTS Đỗ Văn Bằng

Operating systems INT2206 20 (2019-2020)


Home ▶ My courses ▶ Operating Systems ▶ S2_NT220620_20_1920 ▶ 14 June - 20 June ▶
Bài kiểm tra chương 7 + 8

Started on Sunday, 14 June 2020, 3:04 PM


QUIZ
State Finished
NAVIGATION
Completed on Sunday, 14 June 2020, 3:35 PM
1 2 3 4 Time taken 30 mins 44 secs
5 6 7 8 Marks 17.00/20.00
Grade 8.50 out of 10.00 (85%)
9 10 11 12

13 14 15 16
Question 1 A UNIX file system with the block size of 4KB;
17 18 19 20 Correct pointer size of 4 bytes; 12 direct pointers; 1
Show one page at indirect pointer; 1 double indirect pointer; and 1
Mark 1.00 out of
a time triple indirect pointer. Which is the maximum
1.00
number of index blocks the system can use to
Finish review Flag question create a file?

Select one:
3+1024+1024*1024

1024*1024

3+1024*2+1024*1024

1024*2+1024*1024

Question 2 A system uses linked index block allocation with


Incorrect the block size of 2KB; pointer size of 4 bytes.
Suppose a file has the size of 70MB. Calculate the
Mark 0.00 out of
index block number (starting from 0) of the file
1.00
offset (from 0) 8 MB.
Flag question

Answer: 35840

[Link] Page 1 of 9
Bài kiểm tra chương 7 + 8 6/14/20, 15:36

Question 3 A UNIX file system has 12 direct pointers (named


Correct from 1 to 12), 1 single indirect pointer, 1 double
indirect pointer, 1 triple indirect pointer; the block
Mark 1.00 out of
size is 1KB, and the pointer is 4 byte. Given the
1.00
logical address x=49283072. Which is the correct
Flag question information about the location of the above
address?

Select one:
DOUPLE INDIRECT POINTER
(index_block,block,offset)=(186, 245,0)

DOUPLE INDIRECT POINTER


(index_block,block,offset)=(186, 244,1023)

DOUPLE INDIRECT POINTER


(index_block,block,offset)=(187, 244,0)

DOUPLE INDIRECT POINTER


(index_block,block,offset)=(186, 244,0)

Question 4 Suppose a disk has 200 cylinders (marked from 0


Incorrect to 199); the head is currently at the cylinder 172
with the direction toward the cylinder 199; The disk
Mark 0.00 out of
request string is 98, 183, 37, 122, 14. Suppose C-
1.00
SCAN disk scheduling algorithm is used (serving
Flag question direction is from 199-0), calculate the total
numbers of cylinders the head has to move (e.g.
432)?

Answer: 387

Question 5 The disk partition is 500GB (1GB=1024MB,


Correct 1MB=1024KB, ...); the block size is 1KB. Suppose
a system uses linked list disk allocation. Which is
Mark 1.00 out of
the suitable data type of the pointer (e.g. long)?
1.00

Flag question Answer:


int

[Link] Page 2 of 9
Bài kiểm tra chương 7 + 8 6/14/20, 15:36

Question 6 A system uses extent-based disk allocation with


Correct the block size of 2KB. An extent consists of 100
blocks; a file has the size of 25.3MB. Which is the
Mark 1.00 out of
position in the form of (extent number, block
1.00
number, offset) at file offset (from 0) 12MB?
Flag question

Select one:
(extent number, block number, offset)=(61, 43,
0)

(extent number, block number, offset)=(62, 44,


0)

(extent number, block number, offset)=(62, 43,


0)

(extent number, block number, offset)=(61, 44,


0)

Question 7 Suppose a disk has 200 cylinders (marked from 0


Correct to 199); the head is currently at the cylinder 16;
Disk request string is 98, 183, 37, 122, 14.
Mark 1.00 out of
Suppose FCFS disk scheduling algorithm is used,
1.00
calculate the total cylinders the head has to move
Flag question to serve the above requests (e.g. 432)?

Answer: 506

Question 8 Suppose a disk has 200 cylinders (marked from 0


Correct to 199); the head is currently at the cylinder 153
with the direction toward the cylinder 199; The disk
Mark 1.00 out of
request string is 98, 183, 37, 122, 14. Suppose C-
1.00
LOOK disk scheduling algorithm is used (serving
Flag question direction is from 0 to 199), calculate the total
number of cylinders the head has to move (e.g.
432)?

Answer: 307

[Link] Page 3 of 9
Bài kiểm tra chương 7 + 8 6/14/20, 15:36

Question 9 Suppose a disk has 200 cylinders (marked from 0


Correct to 199); the head is currently at the cylinder 56
with the direction toward the cylinder 199; The disk
Mark 1.00 out of
request string is 98, 183, 37, 122, 14. Suppose
1.00
LOOK disk scheduling algorithm is used, calculate
Flag question the total number of cylinders the head has to move
(e.g. 432)?

Answer: 296

Question 10 Given the following RAID system in the following


Correct figure. How many hard-disks can be broken (in
ideal case) without losing the data?
Mark 1.00 out of
1.00

Flag question

Select one:
3

2
4

Question 11 A UNIX file system has 12 direct pointers (named


Correct from 1 to 12), 1 single indirect pointer, 1 double
indirect pointer, 1 triple indirect pointer; the block
Mark 1.00 out of
size is 1KB, and the pointer is 4 byte. Given the
1.00
logical address x=125958. Which is the correct
Flag question information about the location of the above
address?

Select one:
SINGLE INDIRECT POINTER, (block,offset)=
(112, 16)

SINGLE INDIRECT POINTER, (block,offset)=


(111, 6)

[Link] Page 4 of 9
Bài kiểm tra chương 7 + 8 6/14/20, 15:36

SINGLE INDIRECT POINTER, (block,offset)=


(111, 16)

SINGLE INDIRECT POINTER, (block,offset)=


(112, 6)

Question 12 A UNIX file system has 12 direct pointers (named


Correct from 1 to 12), 1 single indirect pointer, 1 double
indirect pointer, 1 triple indirect pointer; the block
Mark 1.00 out of
size is 1KB, and the pointer is 4 bytes. Given a
1.00
valid logical address x=2723668. Which is the
Flag question correct information about the location of the above
address?

Select one:
DOUPLE INDIRECT POINTER
(index_block,block,offset)=(9, 88, 852)

DOUPLE INDIRECT POINTER


(index_block,block,offset)=(8, 87, 852)

DOUPLE INDIRECT POINTER


(index_block,block,offset)=(8, 87, 852)

DOUPLE INDIRECT POINTER


(index_block,block,offset)=(9, 87, 852)

Question 13 Suppose a level-5 RAID system has 12 hard-disks


Correct of size 500 GB. How much is the performance of
the system improved?
Mark 1.00 out of
1.00
Select one:
Flag question
11 times

9 times
10 times

12 times

Question 14 Given the following RAID system in the following


Correct figure. Suppose each disk has the size of 500GB,
which is the maximum size of data can be stored
Mark 1.00 out of
on the system?

[Link] Page 5 of 9
Bài kiểm tra chương 7 + 8 6/14/20, 15:36

1.00

Flag question

Select one:
approximate 1 TB

approximate 1.5 TB
approximate 2 TB

approximate 2.5 TB

Question 15 Given the following RAID-5 system in the following


Correct figure. Suppose each disk is 500GB, which is the
maximum size of data can be stored on the
Mark 1.00 out of
system?
1.00

Flag question

Select one:
approximate 0.5 TB
approximate 1.5 TB

approximate 1 TB
approximate 1.75 TB

[Link] Page 6 of 9
Bài kiểm tra chương 7 + 8 6/14/20, 15:36

Question 16 Suppose a system uses linked list disk allocation.


Correct Which is the reason why we cannot have random
access?
Mark 1.00 out of
1.00
Select one:
Flag question
Because the information about the data block
of a file is hidden

Because it is impossible to know the location


of nth block from the first block
Because of security reason

Because the data blocks of a file is non-


contiguous

Question 17 A system uses linked list disk allocation with the


Incorrect block size of 2KB; the pointer size of 4 bytes.
Suppose a file has the size of 15.5MB. Calculate
Mark 0.00 out of
the block number (starting from 0) of the location
1.00
at file offset (from 0) 1MB?
Flag question

Answer: 512

Question 18 Which is INCORRECT about hard disk?


Correct
Select one:
Mark 1.00 out of
1.00
Rotation latency is the time waiting for the
desire sector to be at the head
Flag question
Transfer rate is the most significant factor for
disk scheduling algorithms
Transfer rate is the data rate between the disk
drive and the computer

Seek time is the time to move the head to the


desire cylinder

Question 19 A UNIX file system has 12 direct pointers (named


Correct from 1 to 12), 1 single indirect pointer, 1 double
indirect pointer, 1 triple indirect pointer; the block
Mark 1.00 out of

[Link] Page 7 of 9
Bài kiểm tra chương 7 + 8 6/14/20, 15:36

1.00 size is 4KB, and the pointer is 4 bytes. Given a


valid logical address x=2493668. Which is the
Flag question
correct information about the location of the above
address?

Select one:
SINGLE INDIRECT POINTER (block,offset)=
(598, 3300)

SINGLE INDIRECT POINTER (block,offset)=


(590, 3300)
SINGLE INDIRECT POINTER (block,offset)=
(594, 3300)
SINGLE INDIRECT POINTER (block,offset)=
(596, 3300)

Question 20 Given the following RAID system in the following


Correct figure. Suppose each disk is 500GB, which is the
maximum size of data can be stored on the
Mark 1.00 out of
system?
1.00

Flag question

Select one:
approximate 1 TB
approximate 1.5 TB

approximate 2 TB
approximate 3 TB

Finish review

[Link] Page 8 of 9
Bài kiểm tra chương 7 + 8 6/14/20, 15:36

You are logged in as Đỗ Văn Bằng (Log out)


S2_NT220620_20_1920

[Link] Page 9 of 9
UETOTS Lưu Lê Tuấn Đạt

Operating systems INT2206 9 (2019-2020)


Home ▶ My courses ▶ Operating Systems ▶ S2INT2206_9_1920 ▶ 14 June - 20 June ▶ Bài kiểm tra chương 7 +8

Started on Sunday, 14 June 2020, 3:30 PM


QUIZ NAVIGATION
State Finished
1 2 3 4 5 6 7 8 9 10 11 12 Completed on Sunday, 14 June 2020, 4:01 PM
13 14 15 16 17 18 19 20 Time taken 31 mins
Show one page at a time Marks 19.00/20.00
Grade 9.50 out of 10.00 (95%)
Finish review

Question 1 Suppose a disk has 200 cylinders (marked from 0 to 199); the head is currently at the cylinder 175 with the direction toward the cylinder 0; The disk request string is
Correct 98, 183, 37, 122, 14. Suppose SCAN disk scheduling algorithm is used, calculate the total number of cylinders the head moved (e.g. 432)?

Mark 1.00 out of


1.00 Answer: 358

Flag question

Question 2 A UNIX file system with the block size of 4KB; pointer size of 4 bytes; 12 direct pointers; 1 indirect pointer; 1 double indirect pointer; and 1 triple indirect pointer.
Correct Which is the maximum number of index blocks the system can use to create a file?

Mark 1.00 out of


Select one:
1.00
1024*1024
Flag question
1024*2+1024*1024
3+1024*2+1024*1024
3+1024+1024*1024

Question 3 Suppose a system uses RAID 5 with 4 disks, given 4 blocks in the corresponding disks (1 0 1 0) (1 1 1 0) (1 0 0 0) (0 0 1 0), calculate the parity block of the four
Correct blocks (e.g. 1 0 1 0).

Mark 1.00 out of


1.00 Answer: 1 1 1 0

Remove flag

Question 4 Suppose a disk has 200 cylinders (marked from 0 to 199); the head is currently at the cylinder 161; the disk request string is 28, 83, 137, 12, 141. Suppose FCFS
Correct disk scheduling algorithm is used, calculate the total cylinders the head has to move to serve the above requests (e.g. 432)?

Mark 1.00 out of


1.00 Answer: 496

Flag question

Question 5 The disk partition is 500GB (1GB=1024MB, 1MB=1024KB, ...); the block size is 1KB. Suppose a system uses linked list disk allocation. Which is the suitable data
Correct type of the pointer (e.g. long)?

Mark 1.00 out of


1.00 Answer: int

Flag question

Question 6 Suppose a disk has 200 cylinders (marked from 0 to 199); the head is currently at the cylinder 16; Disk request string is 98, 183, 37, 122, 14. Suppose FCFS disk
Correct scheduling algorithm is used, calculate the total cylinders the head has to move to serve the above requests (e.g. 432)?

Mark 1.00 out of


1.00 Answer: 506

Flag question

Question 7 Suppose a system uses (1-level) indexed allocation with the block size of 16KB; the pointer size of 4 bytes. Calculate the maximum file size in MB (e.g. 5) the system
Correct can create?

Mark 1.00 out of


1.00 Answer: 64

Remove flag

Question 8 A system uses 2 level indexed allocation with block size of 4KB; pointer size of 4 bytes. Suppose a file has the size of 20MB. Which is the location of file offset (from
Correct 0) 156 KB?

Mark 1.00 out of


Select one:
1.00
(index block, block offset, offset)=(1,39,0)
Flag question
(index block, block offset, offset)=(0,38,0)
(index block, block offset, offset)=(1,38,0)
(index block, block offset, offset)=(0,39,0)

Question 9 Consider a stable storage system, suppose the crash occurs before writing the first copy. Which is correct about the read protocol to recover the data?
Correct
Select one:
Mark 1.00 out of
The new data is not written, so the two copies of the data are incorrect
1.00
The two copies of old data are intact, so no need to do anything
Remove flag
Replace the first copy with the second
Erase the two copies of the old data

Question 10 Given the following RAID system in the following figure. How much is the performance of the system improved?
Correct

Mark 1.00 out of


1.00

Flag question

Select one:
3 times
4 times
2 times
5 times

Question 11 A UNIX file system has 12 direct pointers (named from 1 to 12), 1 single indirect pointer, 1 double indirect pointer, 1 triple indirect pointer; the block size is 1KB, and
Correct the pointer is 4 bytes. Given a valid logical address x=123668. Which is the correct information about the location of the above address?

Mark 1.00 out of


Select one:
1.00
SINGLE INDIRECT POINTER (block,offset)=(107, 786)
Flag question
SINGLE INDIRECT POINTER (block,offset)=(108, 788)
SINGLE INDIRECT POINTER (block,offset)=(108, 786)
SINGLE INDIRECT POINTER (block,offset)=(107, 788)

Question 12 Suppose a system uses contiguous disk allocation with the block size of 2KB. A file has the size of 12.3MB. Which is the correct location of the file offset (from 0) 1
Correct MB?

Mark 1.00 out of


Select one:
1.00
(block index, offset)=(514, 0)
Flag question
(block index, offset)=(512, 0)
(block index, offset)=(513, 0)
(block index, offset)=(511, 0)

Question 13 Suppose a system uses contiguous disk allocation with the block size of 2KB. A file has the size of 12.3MB. Which is the correct location of the file offset (from 0)
Correct 415 KB?

Mark 1.00 out of


Select one:
1.00
(block index, offset)=(207, 0)
Flag question
(block index, offset)=(208, 0)
(block index, offset)=(207, 1024)
(block index, offset)=(208, 1024)

Question 14 A UNIX file system has 12 direct pointers (named from 1 to 12), 1 single indirect pointer, 1 double indirect pointer, 1 triple indirect pointer; the block size is 1KB, and
Correct the pointer is 4 byte. Given the logical address x=6874. Which is the correct information about the location of the above address?

Mark 1.00 out of


Select one:
1.00
6 (st/nd/rd/th) DIRECT POINTER, OFFSET=730
Flag question
7 (st/nd/rd/th) DIRECT POINTER, OFFSET=720
7 (st/nd/rd/th) DIRECT POINTER, OFFSET=730
6 (st/nd/rd/th) DIRECT POINTER, OFFSET=720

Question 15 Suppose a disk has 200 cylinders (marked from 0 to 199); the head is currently at the cylinder 163; Disk request string is 98, 183, 37, 122, 14. Suppose FCFS disk
Correct scheduling algorithm is used, calculate the total cylinders the head has to move to serve the above requests (e.g. 432)?

Mark 1.00 out of


1.00 Answer: 489

Flag question

Question 16 Consider a stable storage system, suppose the crash occurs during writing the second copy. Which is correct about the read protocol to recover the data?
Correct
Select one:
Mark 1.00 out of
Second copy is bad, while the first copy is good, thus, replace the second with the first
1.00
It is impossible to recover the data
Remove flag
The first copy is good, just use this one
The second is bad, so the two copies are useless

Question 17 A UNIX file system with the block size of 4KB; pointer size of 4 bytes; 12 direct pointers; 1 indirect pointer; 1 double indirect pointer; and 1 triple indirect pointer.
Correct Which is the maximum file size when the (single) indirect pointer is used?

Mark 1.00 out of


Select one:
1.00
(12+1024)*4 KB
Remove flag
(12+1024*1024) KB
(12+1024) KB
1024 KB

Question 18 Which is INCORRECT about hard disk?


Correct
Select one:
Mark 1.00 out of
Transfer rate is the data rate between the disk drive and the computer
1.00
Rotation latency is the time waiting for the desire sector to be at the head
Remove flag
Seek time is the time to move the head to the desire cylinder
Transfer rate is the most significant factor for disk scheduling algorithms

Question 19 Suppose a system uses contiguous disk allocation with the block size of 2KB. A file has the size of 12.3MB. Which is the correct location of the file offset (from 0)
Correct 511KB?

Mark 1.00 out of


Select one:
1.00
(block index, offset)=(256, 1024)
Flag question
(block index, offset)=(255, 1024)
(block index, offset)=(255, 0)
(block index, offset)=(256, 0)

Question 20 Suppose a disk has 200 cylinders (marked from 0 to 199); the head is currently at the cylinder 53 with the direction toward the cylinder 0; The disk request string is
Incorrect 98, 183, 37, 122, 14, 124, 65, 67. Suppose SCAN disk scheduling algorithm is used, calculate the total number of cylinders the head has to move to serve the above
requests (e.g. 432)?
Mark 0.00 out of
1.00
Answer: 236
Flag question

Finish review

You are logged in as Lưu Lê Tuấn Đạt (Log out)


S2INT2206_9_1920
17/3/2019 Bài kiểm tra số 1 (lần 2)
UETOTS Lê Nam Khánh

Operating systems INT2206-5 Summer 2018-


2019
Home ► My courses ► Operating Systems ► INT2206-5 Summer 2018-2019 ► 14 March - 20 March ►
Bài kiểm tra số 1 (lần 2)

Started on Sunday, 17 March 2019, 9:03 PM


State Finished
Completed on Sunday, 17 March 2019, 9:33 PM
Time taken 29 mins 59 secs
Marks 16.00/20.00
Grade 8.00 out of 10.00 (80%)

Question 1 Suppose a system uses SJN (or SJF) scheduling algorithm. The processes information
Correct (arrival time, duration) is P1(0,7), P2(2,4), P3(4,1), P4(5,5). Calculate the response time of
process P3 ?
Mark 1.00 out of
1.00

Flag question
Answer: 3

Question 2 Suppose a system uses SJN (or SJF) scheduling algorithm. The processes information
Correct (arrival time, duration) is P1(0,7), P2(2,4), P3(4,1), P4(5,5). Calculate the turnaround time of
process P4 ?
Mark 1.00 out of
1.00
Answer: 12
Flag question

Question 3 Select the best description about the resources a computer may have
Correct
Select one:
Mark 1.00 out of
1.00 CPU, RAM, Disks

Flag question CPU, RAM and anything that can connect to the computer, such as CD, network card,
...

CPU, RAM, Disk, printer, monitor


CPU, RAM, Disk, printer

[Link] 1/5
17/3/2019 Bài kiểm tra số 1 (lần 2)
Question 4 Suppose a system uses Round Robin (RR) scheduling algorithm. The processes
Incorrect information (arrival time, duration) is P1(0,21), P2(30,10), P3(20,40), P4(40,25), and the
time quantum is 15. Show the order (e.g. P2, P1, P3, P4) in which the processes are run?
Mark 0.00 out of
1.00

Flag question
Answer: P1, P3, P2, P4

Question 5 Which is NOT a criterion to evaluate a CPU scheduling algorithm?


Correct
Select one:
Mark 1.00 out of
1.00 CPU utilization

Flag question RAM utilization


Response time

Waiting time

Question 6 Suppose a system uses SJN (or SJF) scheduling algorithm. The processes information
Correct (arrival time, duration) is P1(0,7), P2(2,4), P3(4,1), P4(5,5). Calculate the turnaround time of
P1 ?
Mark 1.00 out of
1.00
Answer: 7
Flag question

Question 7 Which is preemptive CPU scheduling algorithm?


Correct
Select one:
Mark 1.00 out of
1.00 SRTF

Flag question SJN (or SJF)

None of the above


FIFO

Question 8 Which is non-preemptive CPU scheduling algorithm?


Correct
Select one:
Mark 1.00 out of
1.00 None of the above

Flag question Round robin


FIFO

SRTF

[Link] 2/5
17/3/2019 Bài kiểm tra số 1 (lần 2)
Question 9 Which is INCORRECT about the criteria to evaluate a good CPU scheduling algorithm?
Incorrect
Select one:
Mark 0.00 out of
1.00 Maximize turnaround time

Flag question Maximize throughput


Minimize waiting time
Minimize response time

Question 10 Suppose a system uses FCFS CPU scheduling algorithm, the processes information (arrival
Correct time, duration) is P1(0,21), P2(30,10),P3(20,40), P4(40,25). Calculate the average waiting
time of the processes?
Mark 1.00 out of
1.00

Flag question
Answer: 15.75

Question 11 Which is non-preemptive CPU scheduling algorithm?


Correct
Select one:
Mark 1.00 out of
1.00 Round robin

Flag question None of the above


SRTF

FIFO

Question 12 Which is INCORRECT about Shortest Remaining Time First (SRTF) scheduling algorithm?
Incorrect
Select one:
Mark 0.00 out of
1.00 It is also a priority scheduling algorithm

Flag question The shortest remaining time process will be selected to run
The shortest process will be run first
It is the preemptive Shortest Job First (SJF) algorithm

Question 13 Which is the INCORRECT process scheduling type?


Correct
Select one:
Mark 1.00 out of
1.00 Quick-term scheduler

Flag question Short-term scheduler


Medium-term scheduler
Long-term scheduler
[Link] 3/5
17/3/2019 Bài kiểm tra số 1 (lần 2)

Question 14 Suppose a system uses Round Robin (RR) CPU scheduling algorithm, the processes
Incorrect information (arrival time, duration) is P1(0,21), P2(30,10), P3(20,40), P4(40,25), and the
time quantum is 15. Calculate the total waiting time of the processes?
Mark 0.00 out of
1.00

Flag question
Answer: 62

Question 15 Suppose a system uses SJN (or SJF) scheduling algorithm. The processes information
Correct (arrival time, duration) is P1(0,7), P2(2,4), P3(4,1), P4(5,5). Which is the turnaround time of
process P2 ?
Mark 1.00 out of
1.00
Select one:
Flag question
10

8
12

Question 16 Which is INCORRECT about batch system?


Correct
Select one:
Mark 1.00 out of
1.00 Is a simple operating system

Flag question May use FIFO mechanism


Is not like time-sharing system
Allow many people to use a computer concurrently

Question 17 Which is INCORRECT about process control block (PCB)?


Correct
Select one:
Mark 1.00 out of
1.00 It contains the state of the process

Flag question It is a data structure containing information of a process


It contains memory management information
PCBs in all operating systems are the same

Question 18 Which is INCORRECT about time-sharing system?


Correct
Select one:
Mark 1.00 out of
1.00 Only utilize CPU effectively
[Link] 4/5
UETOTS Nguyễn Tùng Lâm

Operating systems INT2206 9 (2019-2020)


Home ► My courses ► Operating Systems ► S2INT2206_9_1920 ► 26 April - 2 May ►
Kiểm tra chương 3+4

Started on Sunday, 26 April 2020, 3:03 PM


QUIZ
NAVIGATION State Finished
Completed on Sunday, 26 April 2020, 3:38 PM
1 2 3 4
Time taken 35 mins
5 6 7 8 Marks 20.00/20.00
Grade 10.00 out of 10.00 (100%)
9 10 11 12

13 14 15 16
Question 1 Given the following system information, and process P1
17 18 19 20 Correct requests (1, 0, 2) more resources:

Show one page at a Mark 1.00 out of


ALLOCATION
time 1.00
MAX AVBALABLE
Finish review Remove flag

PROCESS A B C
A B C A B
C

P0 0 1 0
7 5 3 3
3 2

P1 2 0 0
3 2 2

P2 3 0 1
9 0 2

P3 2 1 1
2 2 2
P4 0 0 2
4 3 3

Which is the correct value of FINISH and WORK vectors


during the running of Banker's algorithm which is called in
the Resource-Request algorithm (to avoid deadlock)?

Select one:
FINISH=(F, F, T, T, T), WORK=(7, 5, 2)

FINISH=(T, F, T, T, F), WORK=(5, 4, 3)

FINISH=(T, T, F, T, F), WORK=(7, 5, 3)

FINISH=(F, T, T, T, F), WORK=(7, 4, 3)

Question 2 Given the following system information:


Correct
ALLOCATION
Mark 1.00 out of
REQUEST AVBALABLE
1.00

Flag question

PROCESS A B C
A B C A B
C

P0 0 1 0
0 0 0 0
0 0

P1 2 0 0
2 0 2

P2 3 0 3
0 0 0

P3 2 1 1
1 0 0
P4 0 0 2
0 0 2

Which is correct for the deadlock detection algorithm?

Select one:
The algorithm results in FINISH=(T, T, T, T, T),
WORK=(7, 2, 6), thus there is no deadlock.

The algorithm results in FINISH=(F, T, T, T, T),


WORK=(5, 1, 2), thus there is a deadlock.

The algorithm results in FINISH=(T, T, T, T, T),


WORK=(7, 2, 4), thus there is no deadlock.

The algorithm results in FINISH=(F, T, T, T, T),


WORK=(7, 2, 5), thus there is a deadlock.

Question 3 Given the following resource allocation graph. What is the


Correct correct name of the edge from R1 to P2?

Mark 1.00 out of


1.00

Flag question

Select one:
Claim edge.
Assignment edge.

Request edge.

Question 4 Given the two bellow processes sharing three


Correct semaphores full, empty, mutex, and a buffer buff having
initial N empty slots:
Mark 1.00 out of
1.00
semaphore mutex=1, full=0, empty=
Flag question N;

int buff[N];

Write_Process:

do {

wait(empty);

wait(mutex);

Write(buff);

signal(mutex);

signal(full);

} while (TRUE);

Read_Process:

do {
wait(full);

wait(mutex);

Read(buff);

signal(mutex);

signal(empty);

} while (TRUE);

Which is correct about the method to satisfy the


constraint: the buff can be accessed (read or write) at
most by 1 process at a time?

Select one:
The semaphore mutex is used to ensure this
constraint.

The semaphore full to ensure this constraint.

The semaphore empty is used to ensure this


constraint.

Both semaphore mutex and full are used to ensure


this constraint.

Question 5 Which is the BEST description about safe state?


Correct
Select one:
Mark 1.00 out of
1.00 It is an order in which processes finish to ensure
there is no deadlock
Flag question
It is the state to make a process terminate normally

It is the state of the processes in the system

It is the state of a process

Question 6 Given the code for bounded-buffer problem:


Correct Write process P:

Mark 1.00 out of


1.00
do {
Flag question

wait(empty);

wait(mutex);

Write (item);

signal(mutex);

signal(full);

} while (TRUE);

Read process Q:

do {

wait(full);

wait(mutex);

Read(item);

signal(mutex);

signal(empty);

} while (TRUE);

What will be the problem if the initialized value of the full


variable is 1?
Select one:
the writer process can not run

the reader can read an invalid value

no problem at all

the reader process can not run

Question 7 Which is not Interprocess Communication?


Correct
Select one:
Mark 1.00 out of
1.00
A process connects to a Database Management
System (such as Microsoft SQL Server)
Flag question
A process shares a semaphore with another
process.

A process writes data to a file.

A web browser views a webpage from a web server.

Question 8 Given the code for bounded-buffer problem:


Correct Write process P:

Mark 1.00 out of


do {
1.00

Flag question

wait(empty);

wait(mutex);

Write (item);

signal(mutex);

signal(full);

} while (TRUE);

Read process Q:

do {
wait(full);

wait(mutex);

Read(item);

signal(mutex);

signal(empty);

} while (TRUE);

Which is the correct initialized value of the semaphore


variable full?

Select one:
NULL

-1

Question 9 Given the code of producer-consumer problem, where buf


Correct is the shared resource; mutex, full and empty semaphores
are initialized by 1, 0 and N, correspondingly. Suppose
Mark 1.00 out of
process P calls wait(mutex), then Q calls wait(mutex)
1.00
before P calling signal(mutex). Suppose semaphores are
Remove flag implemented using queue instead of while loop. Which of
the following is incorrect?

//Write process P:

do {

wait(empty);
wait(mutex);

Write(item,buf);

signal(mutex);

signal(full);

} while (TRUE);

//Read process Q:

do {

wait(full);

wait(mutex);

Read(item,buf);

signal(mutex);

signal(empty);

} while (TRUE);

Select one:
P will be put into the waiting list of mutex

Q will be put into the waiting list of mutex

mutex->value is -1 when wait(mutex) (called by Q)


finished
mutex->value is 0 when wait(mutex) (called by P)
finished

Question 10 Which is a CORRECT method for recovering from a


Correct deadlock?

Mark 1.00 out of


Select one:
1.00
Reboot the system
Flag question
Abort each process in the deadlock until the
deadlock disappears

Abort one of the processes in the deadlock

Provide more resources for the system

Question 11 Given the following system information:


Correct
ALLOCATION MA
Mark 1.00 out of
X AVAILABLE
1.00

Flag question

PROCESS TAPES TAPES


TAPES

P0 5
10 3

P1 2
4

P2 2
9

Which is the correct value of FINISH and W


ORK vectors during the running of Banker's
algorithm?

Select one:
FINISH=(T, F, T) WORK=(12)

FINISH=(T, F, F) WORK=(12)
FINISH=(F, T, F) WORK=(12)

FINISH=(T, T, T) WORK=(12)

Question 12 Given the code of Readers-Writers problem:


Correct Process writer P:

Mark 1.00 out of


do {
1.00

Flag question

wait(wrt);

write(data_set);

signal(wrt);

}while (TRUE);

Process reader Q:

do {

wait(mutex);

readcount++;

if (readcount ==1) wait(wr


t);

signal(mutex);

read(data_set);

wait(mutex);
readcount--;

if (readcount ==0) signal


(wrt);

signal(mutex);

} while (TRUE);

Which is the initialized value of the mutex variable in the


above algorithm?

Select one:
1

NULL

-1

Question 13 Which is CORRECT goal of progress condition of critical


Correct section?

Mark 1.00 out of


Select one:
1.00
It supports the priority of processes
Flag question
It ensures the correct use of the shared resource

It reduces the waiting time of requested processes

It makes the implementation of OS simpler

Question 14

Correct

Mark 1.00 out of


1.00

Flag question
Which is incorrect about Semaphore?

Select one:
One important statement in signal (or V) operator is
to increase the integer by 1.

Semaphore includes an integer and two atomic


operators.

wait (or P) operator is corresponding to ENTRY in


the protocol of a critical section.

wait() operator must be called before signal() in all


cases

Question 15 Given the following system information, and process P1


Correct requests (1, 0, 2) more resources:

Mark 1.00 out of


ALLOCATION
1.00
MAX AVBALABLE
Flag question

PROCESS A B C
A B C A B
C

P0 0 1 0
7 5 3 3
3 2

P1 2 0 0
3 2 2

P2 3 0 2
9 0 2

P3 2 1 1
2 2 2
P4 0 0 2
4 3 3

Which is the correct value of FINISH and WORK vectors


during the running of Banker's algorithm which is called in
the Resource-Request algorithm (to avoid deadlock)?

Select one:
FINISH=(F, F, F, T, F), WORK=(3, 3, 2)

FINISH=(F, F, F, F, F), WORK=(2, 3, 0)

FINISH=(F, F, F, F, T), WORK=(3, 3, 2)

FINISH=(F, T, F, F, F), WORK=(5, 3, 2)

Question 16 Given the following system information, and process P0


Correct requests 1 more tape:

Mark 1.00 out of


ALLOCATION MA
1.00
X AVAILABLE
Flag question

PROCESS TAPES TAPES TA


PES

P0 5
10 3

P1 2
4

P2 2
9

Which is the correct value of FINISH and WORK vectors


during the running of Banker's algorithm which is called in
the Resource-Request algorithm (to avoid deadlock)?

Select one:
FINISH=(F, F, F), WORK=(4)

FINISH=(F, T, F), WORK=(4)

FINISH=(F, F, T), WORK=(5)


FINISH=(F, T, F), WORK=(5)

Question 17 Which is not Interprocess Communication?


Correct
Select one:
Mark 1.00 out of
1.00
A web browser views a webpage from a web server.

Flag question A process reads data from a file.

A process shares a semaphore with another


process.

A process writes data to a named pipe for another


process to read (in a UNIX like platform)

Question 18 Given the following system information, and process P2


Correct requests 1 more tape:

Mark 1.00 out of


ALLOCATION MA
1.00
X AVAILABLE
Flag question

PROCESS TAPES TAPES TA


PES

P0 5
10 3

P1 2
4

P2 2
9

Which is the filnal value of FINISH vector of Banker's


algorithm which is called in the Resource-Request
algorithm (to avoid deadlock)?

Select one:
FINISH=(F, F, F), WORK=(4)

FINISH=(F, T, F), WORK=(5)

FINISH=(F, T, F), WORK=(4)

FINISH=(F, F, T), WORK=(5)


Question 19 Given the following system information, and process P1
Correct requests (1, 0, 2) more resources:

Mark 1.00 out of


ALLOCATION
1.00
MAX AVBALABLE
Flag question

PROCESS A B C
A B C A B
C

P0 0 1 0
7 5 3 3
3 2

P1 2 0 0
3 2 2

P2 3 0 2
9 0 2

P3 2 1 1
2 2 2

P4 0 0 2
4 3 3

Which is the correct value of FINISH and WORK vectors


during the running of Banker's algorithm which is called in
the Resource-Request algorithm (to avoid deadlock)?

Select one:
FINISH=(T, T, T, T, T), WORK=(10, 5, 7)

FINISH=(T, T, F, T, T), WORK=(10, 5, 7)

FINISH=(F, T, F, T, T), WORK=(10, 5, 7)

FINISH=(F, T, T, T, T), WORK=(10, 4, 7)


Question 20 Given the code of two semaphore atomic operation,
Correct where S is initialized by 3. Suppose process P1 calls
wait(S), and P2 calls wait(S) before P1 calling signal(S).
Mark 1.00 out of
Which of the following is incorrect?
1.00

Flag question void wait(semaphore *S)

S->value--;

if (S->value<0) {

Add the requested


process P into S->L;

block(P);

void signal(semaphore *S)

S->value++;

if (S->value<=0) {

remove a process P
from S->L;
wakeup(P);

Select one:
S can not be initialized by 3

P1 can continue with its next instructions

S is now a counting semaphore

P2 can continue with its next instructions

Finish review

You are logged in as Nguyễn Tùng Lâm (Log out)


S2INT2206_9_1920
UETOTS Nguyễn Thị Huệ

Operating systems INT2206 9 (2019-2020)


Home ► My courses ► Operating Systems ► S2INT2206_9_1920 ► 26 April - 2 May ►
Kiểm tra chương 3+4

Started on Sunday, 26 April 2020, 3:00 PM


State Finished
Completed on Sunday, 26 April 2020, 3:35 PM
Time taken 35 mins
Marks 20.00/20.00
Grade 10.00 out of 10.00 (100%)

Question 1 Given the following system information:


Correct
ALLOCATION MAX AVAILABLE
Mark 1.00 out of
1.00

Flag question
PROCESS TAPES TAPES TAPES

P0 5 10 3

P1 2 4

P2 2 9

Which is the correct value of FINISH and WORK vectors during the running of
Banker's algorithm?

Select one:
FINISH=(T, T, T) WORK=(12)

FINISH=(T, F, T) WORK=(12)
FINISH=(F, T, F) WORK=(12)
FINISH=(T, F, F) WORK=(12)

/
Question 2 Given the two bellow processes sharing three semaphores full, empty, mutex, and a buffer
Correct buff having initial N empty slots:

Mark 1.00 out of


semaphore mutex=1, full=0, empty=N;
1.00

Flag question

int buff[N];

Write_Process:

do {

wait(empty);

wait(mutex);

Write(buff);

signal(mutex);

signal(full);

} while (TRUE);

Read_Process:

do {

wait(full);

wait(mutex);
/
Read(buff);

signal(mutex);

signal(empty);

} while (TRUE);

Which is incorrect about semaphore full?

Select one:
The minimum value of full is -1.

The minimum value of full is 0.


The maximum value of full is N.
It is a counting semaphore.

Question 3 Which is INCORRECT about Resource Allocation Graph (RAG)?


Correct
Select one:
Mark 1.00 out of
1.00 A circle represents a process

Flag question A request edge is from a process vertex to a resource vertex

An edge from a resource vertex to a process vertex represents an instance of the


resources is allocated to the process

A rectangle represents a process

Question 4 Given the following resource allocation graph, provide the name of the edge from R2 to P2
Correct (Assignment, Claim,or Request)?

Mark 1.00 out of


1.00

Flag question

/
Answer: Assignment

Question 5 Given the following information of the system.


Correct
Pro Allocation Max
Mark 1.00 out of
Available
1.00

Remove flag

A B C A B
C A B C

/
P0 0 0 1 0 0
1 1 5 2

P1 1 0 0 1 7
5

P2 1 3 5 2 3
5

P3 0 6 3 0 6
5

P4 0 0 1 0 6
5

If P4 requests resource A B C (0 5 2), the resource request algorithm will produce:

Select one:
P0 P2 P1 P3 P4 is a safe sequence, the request can be granted immediately

P0 P1 P2 P3 P4 is a safe sequence, the request can be granted immediately


P0 P2 P3 P1 P4 is a safe sequence, the request can be granted immediately
The system is not in the safe state, the request is not granted

Question 6 Which is CORRECT about the goal of mutual exclusion condition of critical section?
Correct
Select one:
Mark 1.00 out of
1.00 It tries to utilize the shared resource more effectively

Flag question It ensures the correct use of the shared resource

It makes the implementation of operating system simpler


It supports the priority of processes

Question 7 Given the following resource allocation graph, which is correct?


Correct

Mark 1.00 out of


1.00

Remove flag /
Select one:
There is no deadlock in a multiple instance resource type system.

There is a cycle in the graph: P1-R1-P3-R2-P1, thus there is a deadlock in the system.
There is no deadlock in the system, since there is a safe sequence for processes to
run.

Question 8 Given the following resource allocation graph, provide the name of the edge from R2 to P2
Correct (Assignment, Claim,or Request)?

Mark 1.00 out of


1.00

Flag question
/
Answer: Assignment

Question 9 Given the code of two semaphore atomic operation, where S is initialized by 3. Suppose
Correct process P1 calls wait(S), and P2 calls wait(S) before P1 calling signal(S). Which of the
following is incorrect?
Mark 1.00 out of
1.00
void wait(semaphore *S)
Remove flag

S->value--;

if (S->value<0) {

/
Add the requested process P into S->L;

block(P);

void signal(semaphore *S)

S->value++;

if (S->value<=0) {

remove a process P from S->L;

wakeup(P);

Select one:
S can not be initialized by 3

S is now a counting semaphore


P2 can continue with its next instructions
/
P1 can continue with its next instructions

Question 10 Given the following information of the system.


Correct
Pro Allocation Request
Mark 1.00 out of
Available
1.00

Remove flag

A B C A B
C A B C

P0 0 1 0 0 0
0 0 0 0

P1 2 0 0 2 0
2

P2 3 0 3 0 0
0

P3 2 1 1 1 0
0

P4 0 0 2 0 0
2

The deadlock detection algorithm will indicate:

Select one:
The system is in a safe state since P0 P2 P1 P3 P4 is a safe sequence
The system is in a safe state since P0 P2 P3 P1 P4 is a safe sequence

The system is in a deadlock


The system is in a safe state since P0 P2 P1 P4 P3 is a safe sequence

Question 11 Which is incorrect about Semaphore?


Correct
/
Mark 1.00 out of Select one:
1.00 wait (or P) operator is corresponding to ENTRY in the protocol of a critical section
Flag question
Semaphore includes an integer and two atomic operators.
signal (or V) operator is corresponding to EXIT in the protocol of a critical section
We can manipulate the semaphore's integer directly.

Question 12 Which is incorrect with the disk of a computer?


Correct
Select one:
Mark 1.00 out of
1.00 This is a shared resource of the system

Remove flag There is a critical section with the disk

The disk has the ability to read/write the processes' requests concurrently, thus there is
no race condition
The operating system is responsible for managing disk - the shared resource

Question 13 Which is incorrect about the following code?


Correct
int S;
Mark 1.00 out of
1.00

Remove flag
void wait(int &S)

while (S<=0);

S--;

void signal(int &S)

/
S++;

Select one:
When the resource is in use, and another process call wait(), the CPU is waste to run
the while loop.

The while loop can be removed.


The while loop in the wait() procedure will cause the calling process to wait if the
resource is in use.
This is an implementation of semaphore.

Question 14 Which is INCORRECT about deadlock recovery handling method?


Correct
Select one:
Mark 1.00 out of
1.00 Recover the system from a deadlock

Remove flag Allow the system to enter a deadlock state

Use a deadlock detection algorithm


Never allow the system to enter a deadlock state

Question 15 Given the following resource allocation graph, provide the name of the edge from R2 to P1
Correct (Assignment, Claim,or Request)?

Mark 1.00 out of


1.00

Flag question

/
Answer: Assignment

Question 16 Which is incorrect with the main memory of a computer?


Correct
Select one:
Mark 1.00 out of
1.00 It is not possible to divide the main memory into small parts and handle the race
condition for each part instead of the whole memory
Remove flag
This is a shared resource of the system, even in the case the system has multiple
RAMs
Memory management is responsible for handling critical section with main memory

/
The operating system is responsible for handling critical section on main memory
among running processes

Question 17 Given the code of two semaphore atomic operation, where S is initialized by 1. Suppose
Correct process P1 calls wait(S), and P2 calls wait(S) before P1 calling signal(S). Which of the
following is incorrect?
Mark 1.00 out of
1.00
void wait(semaphore *S)
Flag question

S->value--;

if (S->value<0) {

Add the requested process P into S->L;

block(P);

void signal(semaphore *S)

S->value++;

if (S->value<=0) {

/
remove a process P from S->L;

wakeup(P);

Select one:
P2 is put into the waiting queue L of S

The value of S->value is -1


P1 is put into the waiting queue L of S
wakeup(P) means to resume process P

Question 18 Given the following resource allocation graph. What is the correct name of the edge from
Correct R3 to P3?

Mark 1.00 out of


1.00

Flag question

/
Select one:
Assignment edge.

Claim edge.
Request edge.

Question 19 Which is not Interprocess Communication?


Correct
Select one:
Mark 1.00 out of
1.00 A process shares a semaphore with another process.

Flag question A php page in a webserver connects to a Database Management System (such as
Microsoft SQL Server)
A web browser views a webpage from a web server.

A process writes data to a file.


/
Question 8 Suppose a system uses RR scheduling algorithm. The
Correct processes information (arrival time, duration) is P1(0, 25),
P3(20, 40), P2(30, 10), P4(35, 25), and the time quantum
Mark 1.00 out of
is 15. Which is the waiting time of P1?
1.00

Flag question Select one:


20

15

10

Question 9 Suppose a system uses RR scheduling algorithm. The


Correct processes information (arrival time, duration) is P1(0, 25),
P3(20, 40), P2(30, 10), P4(35, 25), and the time quantum
Mark 1.00 out of
is 15. Which is the total waiting time of the processes?
1.00

Flag question Select one:


50

60

80

70

Question 10 Select the best description about the resources a


Correct computer may have

Mark 1.00 out of


Select one:
1.00
CPU, RAM, Disk, printer, monitor
Flag question
CPU, RAM, Disks

CPU, RAM and anything that can connect to the


computer, such as CD, network card, ...

CPU, RAM, Disk, printer

Question 11

Correct

Mark 1.00 out of


1.00

Flag question
Suppose a system uses SJN (or SJF) CPU scheduling
algorithm. The processes information (arrival time,
duration) is P1(0,7), P2(2,4), P3(4,1), P4(5,5). Which is
the average waiting time of the processes?

Select one:
2

Question 12 Suppose a system uses SRTF scheduling algorithm. The


Correct processes information (arrival time, duration) is P1(0,21),
P2(30,10),P3(20,40), P4(40,15). Show the order (e.g. P2,
Mark 1.00 out of
P1, P3, P4) in which the processes are run?
1.00

Flag question
Answer: P1, P3, P2, P4, P3

Question 13 Which is INCORRECT about Shortest Remaining Time


Correct First (SRTF) scheduling algorithm?

Mark 1.00 out of


Select one:
1.00
The shortest remaining time process will be selected
Flag question
to run

It is the preemptive Shortest Job First (SJF)


algorithm

It is also a priority scheduling algorithm

The shortest process will be run first

Question 14 Suppose a system uses SJF scheduling algorithm, the


Correct processes information (arrival time, duration) is P1(0,21),
P2(30,20),P3(20,40), P4(35,15). Show the order (e.g. P2
Mark 1.00 out of
P1 P3 P4) in which the processes are run?
1.00

Flag question
Answer: P1 P3 P4 P2

Question 15 Which is non-preemptive CPU scheduling algorithm?


Correct
Select one:
Mark 1.00 out of
1.00 Round robin
Flag question
SRTF

FIFO

None of the above

Question 16 Which code a CPU can understand and execute?


Correct
Select one:
Mark 1.00 out of
1.00
[Link]();

Flag question 0110010110

a=a+b

add AX, BX

Question 17 Suppose a system uses FCFS CPU scheduling algorithm.


Correct The duration and order of the process are P1(20), P2(11),
P3(6). Which is the average waiting time of the
Mark 1.00 out of
processes?
1.00

Flag question Select one:


47

37

17

27

Question 18 Select INCORRECT description about the main tasks of


Correct operating systems

Mark 1.00 out of


Select one:
1.00
Resource allocation (for processes)
Flag question
Provide Application Programming Interface (API) for
application developers

Process management

Provide database management systems (e.g. MS


SQL Server)

Question 19 Suppose a system uses FCFS CPU scheduling algorithm,


Correct the processes information (arrival time, duration) is
P1(0,21), P2(30,10),P3(20,40), P4(40,25). Calculate the
Mark 1.00 out of
average waiting time of the processes?
1.00

Flag question
Answer: 15.75

Question 20 What language a CPU can understand?


Correct
Select one:
Mark 1.00 out of
1.00 Assembly

Flag question C++

Binary code (0110010110)

Finish review

You are logged in as Nguyễn Tùng Lâm (Log out)


S2INT2206_9_1920
UETOTS Phan Anh

Operating systems INT2206 9 (2019-2020)


Home ► My courses ► Operating Systems ► S2INT2206_9_1920 ► 31 May - 6 June ►
Bài kiểm tra chương 5 -6

Started on Monday, 1 June 2020, 9:00 PM


State Finished
Completed on Monday, 1 June 2020, 9:31 PM
Time taken 31 mins
Marks 20.00/20.00
Grade 10.00 out of 10.00 (100%)

Question 1 Suppose a paging system has the page fault rate=0.3%; the memory access time is: 250
Correct nano seconds; and the page fault handling time is: 7 milli seconds. How many times the
performance is slowdown? (eg. 87).
Mark 1.00 out of
1.00

Flag question
Answer: 85

Question 2 A system does NOT use Translation Look-aside Buffer (TLB) for address translation in
Correct paging (1 level page table). Suppose the access time of the memory is 200ms; Which is the
Effective Access Time (EAT) of the system?
Mark 1.00 out of
1.00
Select one:
Flag question
160 ms

200 ms
180 ms

400 ms

Question 3 Suppose a system uses segmentation memory allocation. The content of the segment table
Correct (limit, base) of a process is [(1000, 1400), (400, 6300), (400, 4300), (1100, 3200), (1000,
4700)]. Calculate the physical address of the reference (3, 106) (e.g. a number or invalid)?
Mark 1.00 out of
1.00
Answer: 3306
Flag question

Question 4 Given the reference string: 1, 2, 3, 4, 1, 2, 5, 1, 2, 3, 4, 5. Suppose a system uses FIFO


Correct page replacement algorithm with 3 frames. Calculate the total page faults?
/
Mark 1.00 out of
Answer: 9
1.00

Flag question

Question 5 Suppose a system uses second chance page replacement algorithm with 6 frames. The
Correct values of the reference bits of the frames are 1 1 0 1 1 0. The current position of the pointer
is at 2nd frame. When the page replacement is called, show the values of the reference bits
Mark 1.00 out of
(e.g. 1 1 0 1 1 0)?
1.00

Flag question
Answer: 1 0 0 1 1 0

Question 6 Given the 1-level page table of a process as bellow, with the frame size=1KB.
Correct
FRAME VALID
Mark 1.00 out of
1.00

Flag question
0 1291 1

1 12 0

2 5 1

3 23 1

4 132 0

Calculate the physical address of the logical address 986? (e.g. 18932
or error)

Answer: 1322970

Question 7 Suppose a system uses paging (1 level page table), and the access time of memory is 200
Correct ms. Calculate the time to access the memory from a reference (p,d)?

/
Mark 1.00 out of
Answer: 400
1.00

Flag question

Question 8 Given the 1-level page table of a process as bellow, with the frame size=1KB.
Correct
FRAME VALID
Mark 1.00 out of
1.00

Flag question
0 1291 1

1 12 0

2 5 1

3 23 1

4 132 0

Calculate the physical address of the logical address 3782? (e.g. 1893
2 or error)

Answer: 24262

Question 9 Suppose a paging system has the page fault rate=0.08%; the memory access time is: 150
Correct nano seconds; and the page fault handling time is: 7 milli seconds. How many times the
performance is slowdown? (eg. 87).
Mark 1.00 out of
1.00
Answer: 38
Flag question

Question 10 Suppose a system uses paging (1 level page table) with Translation Look-aside Buffer
Correct (TLB) for address translation. Which statement is INCORRECT?

Select one:
/
Mark 1.00 out of The physical address is f*frame_size+d, where f is the corresponding frame of p
1.00
It always takes at least a TLB access and a 2 memory accesses for a reference (p, d)
Remove flag

A reference has the form of (p,d)


It takes at least a TLB access and a memory access for a reference (p, d)

Question 11 Suppose a system uses paging on demand without a Translation Look-aside Table (TLB).
Correct The memory access time is 200 nano seconds; page-fault service time is 7 miliseconds;
page-fault rate is 1/1000. Which is the Effective Access Time (EAT) of the system?
Mark 1.00 out of
1.00
Select one:
Flag question
9.2 micro seconds
6.2 micro seconds

8.2 micro seconds


7.2 micro seconds

Question 12 Suppose a system uses paging (1-level page table) with the frame size of 4KB; the address
Correct register is 32bits. Which is the CORRECT split of the address register?

Mark 1.00 out of


Select one:
1.00
(page-offset)=(22:10)
Flag question
(page-offset)=(20:12)

(page-offset)=(19:13)
(page-offset)=(21:11)

Question 13 Suppose a paging system has the page fault rate=0.3%; the memory access time is: 200
Correct nano seconds; and the page fault handling time is: 7 milli seconds. How many times the
performance is slowdown? (eg. 87).
Mark 1.00 out of
1.00
Answer: 106
Flag question

Question 14 A system uses proportional memory allocation method. There are 3 processes in the
Correct system: P1, P2, P3 with the size of 138KB, 96KB, and 164KB, correspondingly. Suppose
the memory size is 180KB, and the frame size is 2KB, calculate the number of frames
Mark 1.00 out of
allocated for processes P1, P2, P3 (e.g. 23:34:12)?
1.00

Flag question
Answer: 31:22:37

/
Question 15 Suppose a system uses segmentation memory allocation. The content of the segment table
Correct (limit, base) of a process is [(1000, 1400), (400, 6300), (400, 4300), (1100, 3200), (1000,
4700)]. Calculate the physical address of the reference (4, 106) (e.g. a number or invalid)?
Mark 1.00 out of
1.00

Flag question
Answer: 4806

Question 16 Which is INCORRECT about thrashing?


Correct
Select one:
Mark 1.00 out of
1.00 LRU page replacement algorithm can prevent thrashing from occurring

Remove flag It is the situation where page fault rate is high, the time for serving page faults is high
CPU utilization is low when thrashing occurs

Working set model can prevent thrashing from occurring

Question 17 Suppose a system uses segmentation memory allocation. The content of the segment table
Correct (limit, base) of a process is [(1000, 1400), (400, 6300), (400, 4300), (1100, 3200), (1000,
4700)]. Calculate the physical address of the reference (1, 402) (e.g. a number or invalid)?
Mark 1.00 out of
1.00
Answer: invalid
Flag question

Question 18 Suppose a paging system has the page fault rate=0.08%; the memory access time is: 320
Correct nano seconds; and the page fault handling time is: 7 milli seconds. How many times the
performance is slowdown? (eg. 87).
Mark 1.00 out of
1.00
Answer: 18
Flag question

Question 19 Given the reference string: 7 0 1 2 0 3 0 4 2 3 0 3 2 1 2 0 1 7 0 1. Suppose the system uses


Correct Least Recently Used (LRU) page replacement algorithm with 3 frames. Calculate the total
page faults?
Mark 1.00 out of
1.00

Flag question
Answer: 12

Question 20 Given the 1-level page table of a process as bellow, with the frame size=1KB.
Correct
FRAME VALID
Mark 1.00 out of
1.00

You might also like