0% found this document useful (0 votes)
28 views4 pages

OS Midterm

The document is a midterm examination for an Operating Systems course, consisting of multiple-choice questions, true/false statements, fill-in-the-blank questions, and logical reasoning problems. It covers various topics related to operating systems, including file management, memory management, process scheduling, and system calls. An answer key is provided at the end of the document for grading purposes.

Uploaded by

JE DI
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
28 views4 pages

OS Midterm

The document is a midterm examination for an Operating Systems course, consisting of multiple-choice questions, true/false statements, fill-in-the-blank questions, and logical reasoning problems. It covers various topics related to operating systems, including file management, memory management, process scheduling, and system calls. An answer key is provided at the end of the document for grading purposes.

Uploaded by

JE DI
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 4

NAME: DATE:

YEAR AND SECTION: INSTRUCTOR:

OPERATING SYSTEM
MIDTERM

I. Multiple Questions. Encircle the correct answer.


1) Which of the following is not an operating system?
a. Windows
b. Linux
c. Oracle
d. DOS
2) What is the maximum length of the filename in DOS?
a. 4
b. 5
c. 8
d. 12
3) When was the first operating system developed?
a. 1948
b. 1949
c. 1950
d. 1951
4.) When were MS windows operating systems proposed?
a. 1994
b. 1990
c. 1992
d. 1985
5) Which of the following is the extension of Notepad?
a. .txt
b. .xls
c. .ppt
d. .bmp
6) What else is a command interpreter called?
a. prompt
b. kernel
c. shell
d. Command
7) What is the full name of FAT?
a. File attribute table
b. File allocation table
c. Font attribute table
d. Format allocation table
8) BIOS is used?
a. By operating system
b. By compiler
c. By interpreter
d. By application software
9) What is the mean of the Booting in the operating system?
a. Restarting computer
b. Install the program
c. To scan
d. To turn off
10. When does page fault occur?
a. The page is present in memory.
b. The deadlock occurs.
c. The page does not present in memory.
d. The buffering occurs.

11) Banker's algorithm is used?


a. To prevent deadlock
b. To deadlock recovery
c. To solve the deadlock
d. None of these
12) When you delete a file in your computer, where does it go?
a. Recycle bin
b. Hard disk
c. Taskbar
d. None of these
13) Which is the Linux operating system?
a. Private operating system
b. Windows operating system
c. Open-source operating system
d. None of these
14) What is the full name of the DSM?
a. Direct system module
b. Direct system memory
c. Demoralized system memory
d. Distributed shared memory
15) What is the full name of the IDL?
a. Interface definition language
b. Interface direct language
c. Interface data library
d. None of these
16) What is bootstrapping called?
a. Cold boot
b. Cold hot boot
c. Cold hot strap
d. Hot boot
17.)What is the fence register used for?
a. To disk protection
b. To CPU protection
c. To memory protection
d. None of these
18) If the page size increases, the internal fragmentation is also?..?
a. Decreases
b. Increases
c. Remains constant
d. None of these
19) Which of the following is a single-user operating system?
a. Windows
b. MAC
c. Ms-Dos
d. None of these
20)The size of virtual memory is based on which of the following?
a. CPU
b. RAM
c. Address bus
d. Data bus
II. True or False: Write 'T' if the statement is true, and 'F' if it is false. (10 points)

1. A segmented memory model is good for separating code from data.


2. One of the four conditions necessary for deadlock is that a process acquires a resource and
holds onto it while it acquires other resources.
3. Since an inverted page table must be searched on each page reference, it is useful to organize
it as a hash table.
4. A paging scheme does not suffer from external fragmentation.

5. In a base-and-bounds model, the base tells where a segment (module) is loaded in memory.
6. Virtual memory space is always bigger than physical memory space.
7. In dual-mode processing, a user process does I/O by accessing the I/O device directly.
8. Kernel level threads, when blocking doing a system call, block all the threads associated with
that process.
9. In multicore systems, systematic multiprocessing uses one core to handle the scheduling for
all the other cores.
10. The kernel uses the Process Control Block to keep track of bookkeeping information about
processes, such as the program counter.
III. Instruction: fill in the correct answer in the space provided. (10 points)
_________________1. is a sequence of read-write operations to memory that are performed atomically.

_________________2. Messages are directed and received from mailboxes (also referred to as ________)
_________________3. In many to many model it allows the ____________ to create a sufficient number
of kernel threads.
_________________4. provides programmer with API for creating and managing threads

_________________5. ______ operation remove one of processes in the waiting queue and place it in the
ready queue.

_________________6. A high-level abstraction that provides a convenient and effective mechanism for
process synchronization.

_________________7. Creation and management of threads done by compilers and run-time libraries
rather than programmers.

_________________8. Solaris synchronization uses _________ for efficiency when protecting data from
short code segments.

_________________9. is considered asynchronous.


_________________10.__________ places no practical limit on the size of the buffer.

IV.Logical Reasoning and Calculation: Carefully read and understand each question. Show your complete
solution, including all calculations and steps, to support your answer. Finally, encircle the correct answer
and provide a justification for your choice. (5 points each)

1. Consider three processes (process id 0, 1, 2 respectively) with compute time bursts 2, 4 and 8 time
units. All processes arrive at time zero. Consider the longest remaining time first (LRTF) scheduling
algorithm. In LRTF ties are broken by giving priority to the process with the lowest process id. The average
turn around time is: show you solution: (a) 13 units (b) 14 units (c)15 units (d) 16 units
2. Consider three processes, all arriving at time zero, with total execution time of 10, 20 and 30 units,
respectively. Each process spends the first 20% of execution time doing I/O, the next 70% of time doing
computation, and the last 10% of time doing I/O again. The operating system uses a shortest remaining
compute time first scheduling algorithm and schedules a new process either when the running process
gets blocked on I/O or when the running process finishes its compute burst. Assume that all I/O
operations can be overlapped as much as possible. For what percentage of time does the CPU remain
idle? Show you solution. (a) 0% (b)10.6% (c)30.0% (d)89.4%

Operating System Answer key: I


1. c 11. a
2. c 12. a
3. c 13. c
4. d 14. d
5. a 15. a
6. c 16. a
7. b 17. c
8. a 18. b
9. a 19. c
10. c 20. C
II.
1. T
2. T
3. T
4. T
5. T
6. F
7. F
8. F
9. F
10 T

III
1. memory transaction
2. ports
3. operating system
4. Thread library
5. wakeup
6. monitors
7. implicit threading
8. adaptive mutexes
9. Non-blocking
10. unbounded-buffer

IV.1. Question 1 ‒ Explanation

Let the processes be p0, p1 and p2. These processes will be executed in following order.

p2 p1 p2 p1 p2 p0 p1 p2 p0 p1 p2

0 4 5 6 7 8 9 10 11 12 13 14

Turn around time of a process is total time between submission of the process and its completion.
Turn around time of p0 = 12 (12-0) Turn around time of p1 = 13 (13-0) Turn around time of p2 =
14 (14-0) Average turn around time is (12+13+14)/3 = 13.

2.Question 2 ‒ Explanation

Let three processes be p0, p1 and p2. Their execution time is 10, 20 and 30 respectively. p0
spends first 2 time units in I/O, 7 units of CPU time and finally 1 unit in I/O. p1 spends first 4 units
in I/O, 14 units of CPU time and finally 2 units in I/O. p2 spends first 6 units in I/O, 21 units of
CPU time and finally 3 units in I/O.

idle p0 p1 p2 idle

0 2 9 23 44 47

Total time spent = 47 Idle time = 2 + 3 = 5 Percentage of idle time = (5/47)*100 = 10.6 %

You might also like