Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

Sample Exam 1

Download as pdf or txt
Download as pdf or txt
You are on page 1of 8

1

SECTION A

Attempt all multiple choice questions on the mark sense sheet provided. Each question is worth 1
mark. Each of the questions has four alternative answers. Choose only one (1) that best answers
the question. No penalty is given to wrong attempts.

QUESTION 1

In a distributed system, a usually indicates the location of a machine.

(a) node
(b) host
(c) site
(d) resource

QUESTION 2

Which of the following routing schemes cannot adapt to link failures or load changes?

(a) virtual routing


(b) fixed routing
(c) dynamic loading
(d) all of the above

QUESTION 3

Which of the following connection strategies involves breaking up a message into a number of
packets that must be reassembled upon arrival?

(a) message switching


(b) packet switching
(c) circuit switching
(d) process switching

QUESTION 4

Which one of the following explains the sequential file access method?

(a) random access according to the given byte number


(b) read bytes one at a time, in order
(c) read/write sequentially by record
(d) read/write randomly by record

cont/...
2

QUESTION 5

Which file is a sequence of bytes organized into blocks understandable by the system’s linker?

(a) object file


(b) source file
(c) executable file
(d) text file

QUESTION 6

What is the mounting of file system?

(a) crating of a filesystem


(b) deleting a filesystem
(c) attaching portion of the file system into a directory structure
(d) removing portion of the file system into a directory structure

QUESTION 7

By using specific system calls, we can .

(a) open the file


(b) read the file
(c) write into the file
(d) all of the above

QUESTION 8

File type can be represented by .

(a) file name


(b) file extension
(c) file identifier
(d) none of the above

cont/...
3

QUESTION 9

A(n) file is a series of code sections that the loader can bring into memory and execute.

(a) text
(b) source
(c) object
(d) executable

QUESTION 10

In an environment where several processes may open the same file at the same time, .

(a) the operating system typically uses only one internal table to keep track of open files
(b) the operating system typically uses two internal tables called the system-wide and per-
disk tables to keep track of open files
(c) the operating system typically uses three internal tables called the system-wide, per-disk,
and per-partition tables to keep track of open files
(d) the operating system typically uses two internal tables called the system-wide and per-
process tables to keep track of open files

QUESTION 11

A shared lock .

(a) behaves like a writer lock


(b) ensures that a file can have only a single concurrent shared lock
(c) behaves like a reader lock
(d) will prevent all other processes from accessing the locked file

QUESTION 12

An exclusive lock .

(a) behaves like a writer lock


(b) ensures that a file can have only a single concurrent shared lock
(c) behaves like a reader lock
(d) will prevent all other processes from accessing the locked file

cont/...
4

QUESTION 13

Which of the following is true for the direct-access method?

(a) It only allows programs to read or write records sequentially.


(b) It allows programs to read and write records in no particular order.
(c) Files are made up of variable-length records.
(d) It is not a good method for accessing large amounts of data quickly.

QUESTION 14

Which of the following is true for the tree-structured directory structure?

(a) Users cannot create their own subdirectories.


(b) Users cannot acquire permission to access the files of other users.
(c) Directories can share subdirectories and files.
(d) It is the most common directory structure.

QUESTION 15

An acyclic-graph directory structure .

(a) does not allow the sharing of files.


(b) allows the sharing of subdirectories and files.
(c) is less complicated than a simple tree-structured directory structure.
(d) is less flexible than a simple tree-structured directory structure.

QUESTION 16

The main problem with access control lists is .

(a) their maintenance


(b) their length
(c) their permissions
(d) all of the above mentioned

cont/...
5

QUESTION 17

Which of the following is not considered a file attribute?

(a) Name
(b) Size
(c) Resolution
(d) Protection

QUESTION 18

Transfers between memory and disk are performed a .

(a) byte at a time


(b) file at a time
(c) block at a time
(d) sector at a time

QUESTION 19

A volume control block .

(a) can contain information needed by the system to boot an operating system from that
partition
(b) is a directory structure used to organize the files
(c) contains many of the file’s details, including file permissions, ownership, size, and loca-
tion of the data blocks
(d) contains information such as the number of blocks in a partition, size of the blocks, and
free-block and FCB count and pointers

QUESTION 20

Which of the following permission values indicates the public access is “-/-/Execute”?

(a) 0761
(b) 0777
(c) 0555
(d) 0007

cont/...
6

SECTION B

Attempt all questions in the examination booklets.

QUESTION 21

Consider the following set of processes, with the length of the CPU burst given in milliseconds:

P rocess BurstT ime P riority


P1 9 3
P2 2 1
P3 2 3
P4 1 4
P5 4 2

The processes are assumed to have arrived in the order P1 , P2 , P3 , P4 , P5 , all at time 0.

(a) Draw a Gantt chart to illustrate the execution of these processes using each of the following
CPU scheduling algorithms:

(i) FCFS (First Come, First Served)


(ii) SJF (Shortest Job First)
(iii) Nonpreemptive Priority (a smaller priority number implies a higher priority)
(iv) RR (Round-Robin) (quantum = 1)
(v) RR (Round-Robin) (quantum = 2)
(5 marks)

(b) What is the turnaround time for each process in FCFS in Part (a)?
(1 mark)

(c) What is the waiting time for each process in SJF in Part (a)?
(1 mark)

(d) What is the response time for each process in RR (quantum = 2) in Part (a)?
(1 mark)

cont/...
7

QUESTION 22

(a) Given five memory partitions of 200 KB, 500 KB, 100 KB, 300 KB, and 600 KB (in
order), how would each of the first-fit, best-fit, and worst-fit algorithms place processes
of 190 KB, 110 KB, 450 KB, and 400 KB (in order)?
(3 marks)
(b) Consider the following segment table:

Segment Base Length


0 219 600
1 2300 14
2 90 100
3 1327 580
4 1952 96

What are the physical addresses for the following logical addresses?

(i) 0, 200
(ii) 1, 10
(iii) 2, 50
(iv) 3, 400
(2 marks)

cont/...
8

QUESTION 23

Considering the following snapshot of a system, where there are five(5) processes p0 , p1 , · · ·, p4 ,
which share four(4) types of resources A, B, C, and D. Allocation is a 5 × 4 matrix defining
the number of resources of each type currently allocated to each process, M ax is a 5 × 4 matrix
defining the maximum demand of each process, and Available is vector indicating the number
of resources of each type.

P rocess Allocation M ax Available


ABCD ABCD ABCD
p0 2001 4212 3321
p1 3121 5252
p2 2103 2316
p3 1312 1424
p4 1432 3665

Answer the following questions using the banker’s algorithm:

(a) What is the content of the matrix Need? (1 mark)


(b) If a request from process P1 arrives for (1, 1, 0, 0), can the request be granted immediately?
Why?
(3 marks)

(c) If a request from process P4 arrives for (0, 0, 2, 0), can the request be granted immediately?
Why? (3 marks)

END OF PAPER

You might also like