CSC207 JULY 2024
CSC207 JULY 2024
\si^
INSTRUCTIONS TO CANDIDATES
1. This question paper consists of two (2) parts: PART A (20 Questions)
PART B (7 Questions)
i. Answer PART A and PART B in the Answer Booklet. Start each answer on a new page.
3. Do not bring any material into the examination room unless permission is given by the invigilator.
4. Please check to make sure that this examination pack consists of:
PART A
Answer all questions.
QUESTION 1 CP7
The deadlock in a computer system will NOT happen when one of the following conditions
failed to hold simultaneously
A Mutual exclusion
B Circular wait
C Preemption
D Hold and wait
(2 marks)
QUESTION 2
CP7
Which of the method can be used in a computer system that will never enter a deadlock state?
A Deadlock detection
B Deadlock recovery
C Deadlock avoidance
D Deadlock algorithm
(2 marks)
QUESTION 3
QUESTION 4
When memory is divided into several fixed size partitions, each partition may contain:
A exactly one process.
B at least one process.
C multiple processes at once.
D different processes at once.
(2 marks)
QUESTION 5
QUESTION 6
QUESTION 7
QUESTION 8
QUESTION 9
In paged memory systems, if the page size is increased, then the internal fragmentation
generally .
A become less
B become more
C not affected
D remain constant
(2 marks)
QUESTION 10
QUESTION 11
Which of the following is the CORRECT sequence for file allocation process in file systems?
QUESTION 12
In a tree-structured directory, the series of directory names that arranges in a file name is
referred to as the .
A working directory
B pathname
C symbolic name
D file systems
(2 marks)
QUESTION 13
QUESTION 14
QUESTION 15
The technique of free disk space management that employs a pointer from the current free
block to the next free block is the .
A linked list of free blocks
B bit map
C free blocking
D swapping
(2 marks)
QUESTION 16
QUESTION 17
The following are problems for contiguous allocation EXCEPT:
A finding space for file
B knowing file size
C need for compaction
D no fragmentation
(2 marks)
QUESTION 18
^N directory
file start end
jeep 25
oD i D 2D 3D
4Q !£] 6 p ?D
12p^3Dl4JUl5Q
i6Qi7Di8Di«D
2C>r]2lLfc2D23Q
24 025LJ26027[j
>l 12
280290300310
QUESTION 19
QUESTION 20
Code fragment that is embedded in legitimate program to infect our systems is called a
A Worm
B Trap door
C Virus
D Trojan horse
(2 marks)
PARTB
Answer all questions.
CP7
QUESTION 1
You are given the following set of edges that consists of request and assignment edges.
Answer the following questions.
E • {Pi ->Ri, R2 -> Pi, P2 -> Rs, Ri-> P2, R2 -> P2, P3 ->R2, R3 -> P3)
a) Draw the complete Resource-Allocation Graph (RAG). Label all components clearly
including the symbol' • ' to represent an instance.
(5 marks)
b) Supposed that P, --> R, are claim edges. Convert the RAG to a corresponding wait-for
graph, and define the existence of deadlock state.
(3 marks)
QUESTION 2 CP 8
Tables 1 lists the jobs arriving in order (Job A, B, C, and D), while Table 2 shows the block of
memory from low order memory to high order memory:
Table 1 Table 2
Job list: Main memory:
Job Size Block Size
A 256k Block 1 910K
B 900k Block 2 900K
C 50K Block 3 200K
D 350K Block 4 300K
a) Determine which partition each request will be allocated if the following strategy is used:
i. Best-fit algorithm
(3 marks)
b) Which type of fragmentation occurs? Calculate the total amount of fragmentation for best-
fit algorithm.
(3 marks)
QUESTION 3
Consider a logical address space of 28 pages with a 4 KB page size, mapped onto a physical
memory of 4096 frames. Its page table is given in Table 3.
Table 3
50
30
400
100
a) What is the size of logical and physical addresses (in 2" bytes)?
(4 marks)
(3 marks)
c) What is the page number and offset for the logical address of 51152? (2 marks)
(3 marks)
QUESTION 4
Consider the following page reference string: 7,2,3,1,2, 5, 3,4,6,7,1,3. Assuming demand
paging with four frames, how many page faults would occur for the following replacement
algorithms? Please circle which references cause page faults.
(10 marks)
b) LRU replacement
QUESTION 5
Answer the following questions: In the Unix system, directory listing is shown as below:
(3 marks)
(3 marks)
c) How to let all the users use the file without restriction? Hint: chmod
(2 marks)
QUESTION 6
a) Linked list
(5 marks)
b) Grouping
(5 marks)
QUESTION 7
(5 marks)