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

SULIT

First Semester Examination


2021/2022 Academic Session

February/March 2022

CST232 – Operating Systems


(Sistem Pengendalian)

Duration : 2 hours
(Masa : 2 jam)

Please ensure that this examination paper consists of FOURTEEN (14) pages of
printed material before you begin the examination.

[Sila pastikan bahawa kertas peperiksaan ini mengandungi EMPAT BELAS (14) muka
surat yang bercetak sebelum anda memulakan peperiksaan ini.]

Instructions : Answer ALL questions in SECTION A (Section A need to be answered first


within one (1) hour after examination starts). Answer ALL questions in SECTION B. You
may answer the questions either in Bahasa Malaysia or in English.

[Arahan : Jawab SEMUA soalan di BAHAGIAN A (Bahagian A perlu dijawab terlebih


dahulu di dalam tempoh satu (1) jam selepas peperiksaan bermula). Jawab SEMUA soalan
di BAHAGIAN B. Anda dibenarkan menjawab soalan sama ada dalam Bahasa Malaysia
atau Bahasa Inggeris].

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

[Sekiranya terdapat sebarang percanggahan pada soalan peperiksaan, versi Bahasa


Inggeris hendaklah digunapakai].

…2/-

SULIT
SULIT CST232
SECTION A: There are 40 questions in this section.

Answer all questions 1 – 40. Each correct answer is awarded one (1) mark.

1. Multiprogramming in operating system refers to _____.

A. total processes in memory


B. total processes executed per unit time
C. total processes in the ready queue
D. total processes in the I/O queue

2. In a system without virtual memory, the size of a process is restricted to the


size of _____.
A. primary memory
B. cache memory
C. secondary storage
D. read-only memory

3. Which type of operating system has the slowest average response time?
A. Batch
B. Interactive
C. Embedded
D. Real time

4. Memory compaction is mainly used to overcome _____.


A. external fragmentation
B. internal fragmentation
C. memory error
D. page fault
E. segment error

…3/-

SULIT
SULIT CST232
5. Assume a system is managing its memory using dynamic partitions, with the
current state as shown below.

Operating Process Unused Process Process Unused Process Unused


System A space E Q space X space

What is the maximum degree of multiprogramming possible?


A. 3
B. 4
C. 7
D. 8
E. Unlimited

6. External fragmentation can be avoided using _____ memory allocation


scheme.
A. first fit
B. best fit
C. worst fit
D. none of the above

7. Generally, it is more complicated for operating system to manage a process’


segments than pages because _____.
A. segments are of various sizes
B. segment boundaries are decided by the programmer
C. some segments may not be in memory
D. most segments are bigger than pages

8. Assume an operating system uses First In First Out (FIFO) page replacement
policy. A process is given a fixed number of frames. Consider the following
statements X and Y.
X: When more page frames are given to a process, it leads to increase in
page fault rate in most cases.
Y: Locality of reference is not shown by some programs.

…4/-

SULIT
SULIT CST232
Which of the following is true?
A. Both X and Y are true, and Y is the reason for X.
B. Both X and Y are true, but Y is not the reason for X.
C. X is false but Y is true.
D. Both X and Y are false.

9. An operating system using paging mechanism will increase a process’ _____


time the most.
A. context switching
B. waiting
C. execution
D. response

10. Short term and the long term schedulers are differentiated by their _____.
A. frequency of execution
B. queue lengths
C. type of processes scheduled
D. usage of resources

11. A process will not suffer indefinitely postponement if _____ scheduling


algorithm is used.
A. First Come First Served (FCFS)
B. Shortest Job Next (SJN)
C. priority
D. Shortest Remaining Time (SRT)
E. Earliest Deadline First (EDF)

…5/-

SULIT
SULIT CST232

12. Which scheduling algorithm has the fastest average response time?
A. First Come First Served (FCFS)
B. Shortest Job Next (SJN)
C. Priority
D. Shortest Remaining Time (SRT)
E. Round robin (RR)
F. Multiple level queues
G. Earliest Deadline First (EDF)

13. If a process, currently not holding any resources, requests for some
resources but it is not fulfilled, it will lead to _____.
A. starvation
B. deadlock
C. aging
D. preemption

14. If P is the number of resources requested by a process and S is the total


number of resources available in the system, then it follows that _____ must
always be true.
A. P<S
B. P <= S
C. P=S
D. P>S
E. P >= S

15. Mutual exclusion condition can happen in a system if it _____.


A. contains resources that cannot be shared
B. contains resources that can be shared
C. runs on uniprocessor rather than multiprocessor
D. runs applications from multiple users

…6/-

SULIT
SULIT CST232

16. Which of the following is true about Banker’s algorithm?


A. It assumes total resources available in a system does not change.
B. It ensures all processes will get their requested resources at the same
time.
C. It accepts continuous flow of new processes into the system.
D. It allows processes to make additional resource requests as and when
needed.

17. If every process is given all its resources before it starts executing, it will lead
to _____ for the entire system.
A. low resource utilization
B. high resource utilization
C. low CPU utilization
D. high CPU utilization
E. low memory utilization
F. high memory utilization

18. For a process that is requesting additional resources, the operating system
needs to check _____ to prevent deadlock from happening.
A. resources currently available in the system
B. resources currently allocated to that process
C. resources currently allocated to all processes
D. total resources in the system

…7/-

SULIT
SULIT CST232

19. 1. Assume a system has 12 printers which are used by 3 processes – P0,
P1, P2. Table below shows current state of printer allocation and
maximum required by each process.
Process Printers currently Maximum number
allocated of printers needed
P0 5 10
P1 2 4
P2 2 9
Which of the following sequence ensures the system remains in safe state?
A. P0, P1, P2
B. P0, P2, P1
C. P1, P0, P2
D. P1, P2, P0
E. P2, P0, P1
F. P2, P1, P0

20. Assume 4 processes are currently running on a system, with a total of 5 non-
shareable devices available for usage. If each process requires a maximum of
2 devices, then deadlock _____.
A. can never occur
B. may occur
C. has to occur
D. is unpredictable

21. Asymmetric multiprocessing system is ______


A. A single-processor system with additional slave processors
B. A decentralized processor scheduling.
C. Features several complete computers systems.
D. Also known as loosely coupled configuration.

…8/-

SULIT
SULIT CST232

22. Tightly coupled is the most difficult configuration to implement because ______
A It is more reliable.
B It uses resources effectively.
C It must be well synchronized to avoid deadlock.
D It can balance loads well.

23. ______ law is often used in parallel computing to predict the theoretical
speedup when using multiple processors.
A Newton’s
B Dijkstra’s
C Amdahl’s
D Flynn’s

24. Critical region is ______


A A method by which processes, waiting for an event to occur, continuously
test to see if the condition has changed and remain in unproductive,
resource consuming wait loops.
B A part of a program that must complete execution before other processes
can begin.
C A condition that specifies that only one process may update a shared
resource at a time to ensure correct operation and results.
D A type of shared data item that may contain either binary or nonnegative
integer values and is used to provide mutual exclusion.

25. ______ is quite popular and intuitively appealing. It works well with moderate
loads, but it has the problem of localization under heavy loads.
A SCAN
B LOOK
C FCFS
D SSTF

…9/-

SULIT
SULIT CST232
26. ______ uses a directional bit to indicate whether the arm is moving toward the
innermost disk track or away from it. The algorithm moves the arm methodically
from the outer to the inner track, servicing every request in its path.
A FCFS
B SCAN
C LOOK
D SSTF

27. In Sequential Access Storage Media, distinct advantage of blocking is


A Overhead and software routines are needed for blocking, deblocking, and
recordkeeping.
B Buffer space may be wasted if you need only one logical record but must
read an entire block to get it.
C More storage space is wasted because the size of the physical record
exceeds the size of the gap.
D Fewer I/O operations are needed because a single READ command can
move an entire block, the physical record that includes several logical
records, into main memory.

28. Every scheduling algorithm in device handler seek strategies should do the
following EXCEPT
A Minimize arm movement.
B Minimize transfer time.
C Minimize mean response time.
D Minimize the variance in response time.

29. A[n] ______ file is the one you create when working with an application.
A executive
B data
C system
D application

…10/-

SULIT
SULIT CST232

30. A _____ is a notation indicating where a file is located on your computer.


A file extension
B file path
C file system
D file attribute

31. Each hardware device must have its own ______ so that the operating system
can detect it.
A name
B process
C driver
D daemon

32. A[n] ______ provides a quick way to perform an action such as opening a
folder or a file.
A pin
B tile
C arrow icon
D shortcut

33. Different versions of Linux OS are called ______


A kernel
B shell
C wildcard
D distributions

…11/-

SULIT
SULIT CST232

34. The highest point in the Linux file structure is the ______.
A base
B system
C root
D admin

35. The highest point in the Linux files structure is indicated with the ______
symbol.
A dollar sign ($)
B asterisk (*)
C backward slash (\)
D forward slash (/)

36. What does it mean by su command


A Switch to admin account
B Switch to root account
C Switch user
D Switch to lock account

37. Which of the following Android access security provide the highest level of
security
A Password Matching.
B PIN Matching.
C Pattern Recognition.
D Face Recognition.

…12/-

SULIT
SULIT CST232

38. The following are the design goals for Android EXCEPT
A Enchant Me
B Simplify My Life
C Portability
D Make Me Amazing

39. What language used in Android Studio?


A Java
B C#
C HTML
D C++

40 What does a launcher in Android do?


A Helps you achieve root status
B Let you install custom firmware
C Makes launching apps quicker
D Let you change your home screen

…13/-

SULIT
SULIT CST232

SECTION B: Answer BOTH questions.

1. (a) A fresh installation of Windows 10 operating system takes up about 20GB


of disk space. Yet, it can run on 4GB of RAM. Demonstrate how this
works, by using appropriate examples.
(10/100)

(b) Assume an operating system implements the process state model shown in
Figure 1. Table 1 shows the description of each state.
Discuss two (2) disadvantages of this model.

New Ready Running Finished

Figure 1
Table 1
State Description
New Process just created by user.
Ready Process ready to be executed by CPU.
Running Process currently being executed by CPU.
Finished Process completes execution.
(10/100)

(c) Show the complete sequence of steps taken by an operating system from
the time a currently running process’ time quantum expires until a new
process starts executing.
(10/100)

2 (a) 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 requires 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.

…14/-

SULIT
SULIT CST232
(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.
(8/100)

(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.
(12/100)

(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) SCAN
(ii) C-LOOK
(10/100)

- oooOooo -

SULIT

You might also like