0% found this document useful (0 votes)
26 views6 pages

2021 Feb

1) The document is an exam paper for an Operating Systems course consisting of 6 pages with 4 questions. 2) Question 1 covers segmented memory allocation and page replacement algorithms. Question 2 covers dynamic partitions and process scheduling algorithms. 3) Question 3 discusses multiprocessor configurations and storage device seek strategies. Question 4 examines semaphore usage, tape storage calculations, and disk arm movement.

Uploaded by

jeelalala
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)
26 views6 pages

2021 Feb

1) The document is an exam paper for an Operating Systems course consisting of 6 pages with 4 questions. 2) Question 1 covers segmented memory allocation and page replacement algorithms. Question 2 covers dynamic partitions and process scheduling algorithms. 3) Question 3 discusses multiprocessor configurations and storage device seek strategies. Question 4 examines semaphore usage, tape storage calculations, and disk arm movement.

Uploaded by

jeelalala
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
You are on page 1/ 6

SULIT

First Semester Examination


2020/2021 Academic Session

February 2021

CST232 – Operating Systems


(Sistem Pengendalian)

Duration : 2 hours
(Masa : 2 jam)

Please ensure that this examination paper contains SIX (6) printed pages before you begin
the examination.

[Sila pastikan bahawa kertas peperiksaan ini mengandungi ENAM (6) muka surat yang
bercetak sebelum anda memulakan peperiksaan ini.]

Instructions: Answer all FOUR (4) questions.

[Arahan: Jawab kesemua EMPAT (4) soalan.]

You may answer the questions either in English or in Bahasa Malaysia.

[Anda dibenarkan menjawab soalan sama ada dalam bahasa Inggeris atau bahasa
Malaysia.]

In the event of any discrepancies, the English version shall be used.

[Sekiranya terdapat sebarang percanggahan pada soalan peperiksaan, versi bahasa


Inggeris hendaklah diguna pakai.]

…2/-

SULIT
SULIT CST232
-2-

1. (a). The following questions are based on segmented memory allocation:

(i). Explain the concept that prompted the development of segmented


memory allocation scheme.

(ii). Explain how segmented memory allocation is implemented.

(iii). Describe the disadvantage of segmented memory allocation.

(40 marks)

(b). A process references five pages, A, B, C, D, and E, in the following order:

A, B, E, B, A, C, B, A, B, C, D, C, D, E, D, A

Assume the process is allocated with three page frames in the main memory
and the frames are initially empty.

(i). Perform a page trace analysis indicating page faults with asterisk (*)
using First In First Out (FIFO) page removal algorithm. Then compute
the success and failure ratios.

(ii). Repeat 1(a)(i) by using the Least Recently Used (LRU) page removal
algorithm.

(iii). Compare the two success ratios and comment on the effectiveness of
page removal algorithms.

(60 marks)

…3/-

SULIT
SULIT CST232

-3-

2. (a). The following questions are based on dynamic partitions:

(i). Describe one advantage of dynamic partition over fixed partition.

(ii). Describe one disadvantage of dynamic partition.

(iii). Is it possible to reduce the effect of the disadvantage stated in 2(a)(ii)?


If yes, explain how to reduce it. What additional hardware component
is needed to make it work? Explain.
(28 marks)

(b). Given the following information:

Job Arrival time CPU cycle


A 0 8
B 2 5
C 3 1
D 5 3
E 8 3
F 10 1
G 11 4

Draw a timeline for each of the process scheduling algorithms showing the
time that each job arrives and the order that each is processed. Calculate the
turnaround time for each job.

(i). First Come First Serve

(ii). Shortest Job First

(iii). Shortest Remaining Time

(iv). Round Robin (using a time quantum of 3, ignore context switching)

(72 marks)

…4/-

SULIT
SULIT CST232

-4-

3. (a). Master-slave is one of the configurations for a multiprocessor system.

(i). Using illustrated diagram, describe how the master-slave configuration


works.

(ii). Explain TWO (2) problems with this configuration.

(iii). Using illustrated diagram, explain an alternative configuration which


overcomes the problems mentioned in 3(a)(ii).

(50 marks)

(b). Describe ONE (1) advantage and ONE (1) disadvantage for each of the
following storage device seek strategies:

(i). First-Come, First-Served (FCFS).

(ii). LOOK.

(iii). C-SCAN.

(30 marks)

(c). Based on the RAID technology in the following scenarios, identify the best
RAID level (0 to 6) that should be used:

(i). Network File System which require high reliability but with moderate
complexity, by distributing the data and parity strips evenly across all
disks in the array.

(ii). Media streaming for High Definition Video, where extremely high
throughput is required.

(iii). E-Commerce Transaction database requiring very high reliability where


data recovery is possible even with two disk failures.

(iv). Real Time Medical Diagnostics system requiring high reliability and
high throughput.

(20 marks)

…5/-

SULIT
SULIT CST232

-5-

4. (a). A student has produced the code below for Consumer process only.

semaphore full = 0;
semaphore empty = n;
semaphore mutex = 1;

void Consumer() {

While (true) {
P(full);
P(mutex);
Read_from_buffer();
V(mutex);
V(empty);
Consume();
}
}//end consumer()

(i). Examine the uses of semaphore variables mutex, full and empty.

(ii). What will happen if the student runs the above code? Explain your
answer.

(30 marks)

(b). Given a magnetic tape data storage system with Inter Record Gap (IRG)
length of 1 cm, where each data record requires a tape length of 0.2 cm. Each
file starts and ends with a data block and there exits gaps between these
blocks.

(i). Calculate the length of the tape required to keep 200 records using 10
records per block.

(ii). Calculate the length of the tape required to keep 200 records using 25
records per block.

(iii). Calculate the length of the tape required to keep 200 records using 50
records per block.

…6/-

SULIT
SULIT CST232

-6-

(iv). Distinguish the effect of the 4(b)(i), 4(b)(ii) and 4(b)(iii), towards small-
sized files (with 15 records average for each file).

(25 marks)

(c). Consider the disk arm is moving on a disk with 200 tracks. While retrieving
data from Track 100, the following requests has arrived:
Track 120, 55, 58, 39, 18, 90, 160, 150, 38, 184.
Determine the seek order and the total seek time travelled by the arm when
the following algorithms are used:

(i). Shortest Seek Time First (SSTF)

(ii). SCAN

(iii). C-LOOK

(45 marks)

- oooOooo -

…7/-

SULIT

You might also like