You are on page 1of 11

Question 1: MULTIPLE CHOICE QUESTIONS (20 marks)

1. Which of the following operating systems is not open source?


a.Windows
b.BSD UNIX
c. Linux
d. PCLinuxOS

2. Which of the following statements is incorrect?


a. An operating system provides an environment for the execution of programs.
b. An operating system manages system resources.
c. Operating systems provide both command line as well as graphical user interfaces.
d. Operating systems must provide both protection and security.

3. A process control block ___________.


a. includes information on the process's state
b. stores the address of the next instruction to be processed by a different process
c. determines which process is to be executed next
d. is an example of a process queue

4. The _____ model multiplexes many user-level threads to a smaller or equal number of kernel
threads.
a. many-to-many
b. two-level
c. one-to-one
d. many-to-one

5. When two or more processes need a resource that it will never gets, this situation is called
a. Bounded-Buffer
b. Deadlock
c. Bankers Algorithm
d. Semaphore

6. The _____________ process scheduling algorithm is designed especially for time-sharing


systems.
a. SJF
b. FCFS
c. RR
d. SRTF

7. Operating System maintains the page table for


a. each thread
b. each instruction
c. each address
d. each process

8. _____ is the dynamic storage-allocation algorithm which results in the smallest leftover hole in
memory.
a. First fit
b. Best fit
c. Worst fit
d. None of the above

9. Least Recently Used (LRU) Algorithm ____.


a. is the page-replacement algorithm most often implemented
b. Replace page that will not be used for longest period of time
c. can suffer from Belady's anomaly
d. Replace page that has not been used in the most amount of time

10. _____ occurs when a process spends more time paging than executing.
a. Thrashing
b. Memory-mapping
c. Demand paging
d. Swapping

Page 2 of 11
11. “app.exe” is an example of a(n) _____.
a. batch file
b. object file
c. executable file
d. text file

12. 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

13. When the head damages the magnetic surface, it is known as _________.
a. disk crash
b. head crash
c. magnetic damage
d. All of these

14. In the _______ algorithm, the disk head moves from one end to the other, servicing requests
along the way. When the head reaches the other end, it immediately returns to the beginning of
the disk without servicing any requests on the return trip.
a. LOOK
b. SCAN
c. C-SCAN
d. C-LOOK

15. In the ______ algorithm, the disk arm starts at one end of the disk and moves toward the other
end, servicing requests till the other end of the disk. At the other end, the direction is reversed
and servicing continues.
a. LOOK
b. SCAN
c. C-SCAN
d. C-LOOK

16. A ________ is a region of fast memory that holds copies of data.


a. Spool
b. Cache.

Page 3 of 11
c. Device reservation
d. None of above

17. The _____________ right allows a process to transfer from one domain to another.
a. Copy.
b. Owner.
c. Control.
d. Switch.

18. The ____________ right allows a process to add and remove access rights in a row (domain).
a. Copy.
b. Owner.
c. Control.
d. Switch.

19. A _________ is a public key digitally signed by a trusted party.


a. key ring
b. digital certificate
c. message digest
d. digital key

20. A denial of service attack is _________.


a. aimed at gaining information
b. aimed at stealing resources
c. aimed at disrupting legitimate use of a system
d. generally not network based

Page 4 of 11
Question 2: TRUE OR FALSE QUESTIONS (10 marks)

1. The file-allocation table (FAT) used in MS-DOS is an example of linked allocation

Answer: True.

2. Resolution is not considered a file attribute?


Answer: True.

3. Metadata includes all of the file-system structure, including the actual data (or contents of the
file).
Answer: False.

4. I/O request includes input or output mode, disk address, memory address, number of sectors to
transfer.
Answer: True.

5. A block device transfers a block of bytes as a unit.


Answer: True.

6. Domain can be user, process, or procedure.


Answer: True.

7. The copy right in the access matrix allows the access right to be copied both in the column and
the row.
Answer: False.

8. In asymmetric encryption, public key and private key are used.


Answer: True

9. Encrypting messages is a way to prevent them from being deleted or lost.


Answer: False

Page 5 of 11
10. The process has a physical memory address space, information (such as a base priority), and an
affinity for one or more processors.
Answer: False

Page 6 of 11
Question 3: FILL IN THE BLANKS : 5 sentences with the provided words and 5 sentences
with your own words (5 marks)

Masquerading / Context Switch / Fiber / Page Cashing / Capability list


1. The __________________________ is responsible for managing file systems, device drivers,
and network drivers.
Answer: I/O manager

2. A ____________________________ saves the state of the currently running process and


restores the state of the next process to run.
Answer: Context Switch.

3. ________________________never swaps a page into memory unless page will be needed


Answer: Lazy swapper.

4. ______________________ uses virtual memory techniques to cache file data as pages as


opposed to system-oriented blocks.
Answer: Page Cashing.

5. The surface of a magnetic disk platter is divided into _________________.


Answer: Tracks/Sectors.

6. _____________________ sometimes called the elevator algorithm.


Answer: SCAN algorithm

7. Each row in the access matrix can be implemented as a___________ for one domain.
Answer: Capability list.

8. Protection can be viewed as a matrix, called __________________.


Answer: Access Matrix.

9. The most common method used by attackers to breach security is ____________________.


Answer: masquerading

10. The ___________ mechanism is used to support legacy applications written for a fiber-
execution model.
Answer: Fiber.

Page 7 of 11
Question 4: (4 marks)

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

Process Burst Time


P1 6
P2 5
P3 2
P4 3
P5 7

The processes are assumed to have arrived in the order P1, P2, P3, P4, P5 all at time 0.
Question:
a. Draw the Gantt chart that illustrate the execution of these processes using the Round Robin
scheduling algorithms with quantum time = 2.
b. What is the waiting time of each process for this scheduling algorithms?

Answer:

Process Waiting Time


P1 0 + (10-2) + (17-12) = 13
P2 2+ (12-4) + (19-14) = 15
P3 4
P4 6 + (14-8) = 12
P5 8+ (15-10) + (20-17) =16

Page 8 of 11
Question 5: (5 marks)

Consider the following page reference string: 7,0,1,2,0,3,0,4,2,3,0,3,2,1,2,0,1,7,0,1. Show how


pages will be allocated using the Optimal Page Replacement algorithm. Also calculate the total
number of page faults when allocated page blocks are 3.

Answer:
Page reference string is: 7,0,1,2,0,3,0,4,2,3,0,3,2,1,2,0,1,7,0,1 for allocated page blocks 3, we have
following Optimal Page Replacement allocation. Page reference marked with the highlighted gray
color.

7 0 1 2 0 3 0 4 2 3 0 3 2 1 2 0 1 7 0 1

7 7 7 2 2 2 2 2 2 2 2 2 2 2 2 2 2 7 7 7
0 0 0 0 0 0 4 4 4 0 0 0 0 0 0 0 0 0 0
1 1 1 3 3 3 3 3 3 3 3 1 1 1 1 1 1 1

Total number of page faults = 9.

Page 9 of 11
Question 6: (3 marks)

List 4 program threats and explain at least two of them.


Answer: (any four, any explained two)
• Trojan horse: Many systems have mechanisms for allowing programs written by users to be
executed by other users. If these programs are executed in a domain that provides the access
rights of the executing user, the other users may misuse these rights. A text-editor program, for
example, may include code to search the file to be edited for certain keywords. If any are found,
the entire file may be copied to a special area accessible to the creator of the text editor. A code
segment that misuses its environment is called a Trojan horse.

• Trap Door: The designer of a program or system might leave a hole in the software that only she
is capable of using.

• Logic Bomb: Consider a program that initiates a security incident only under certain
circumstances. It would be hard to detect because under normal operations, there would be no
security hole. However, when a predefined set of parameters was met, the security hole would
be created. This scenario is known as a logic bomb.

• Stack and Buffer Overflow: The stack- or buffer-overflow attack is the most common way for
an attacker outside the system, on a network or dial-up connection, to gain unauthorized access
to the target system. An authorized user of the system may also use this exploit for privilege
escalation.

• Viruses: A virus is a fragment of code embedded in a legitimate program. Viruses are self-
replicating and are designed to “infect” other programs. They can wreak havoc in a system by
modifying or destroying files and causing system crashes and program malfunctions.

Page 10 of 11
Question 7: (3 marks)

Cite 4 file attributes (with brief description for each).


Answer: (any four)
- Name – only information kept in human-readable form
- Identifier – unique tag (number) identifies file within file system
- Type – needed for systems that support different types
- Location – pointer to file location on device
- Size – current file size
- Protection – controls who can do reading, writing, executing
- Time, date, and user identification – data for protection, security, and usage monitoring

Page 11 of 11

You might also like