0% found this document useful (0 votes)
20 views20 pages

Pre Test 3

The document contains a series of multiple-choice questions related to operating systems, memory management, deadlock conditions, and resource allocation. It covers topics such as page tables, segmentation, deadlock avoidance, and memory allocation strategies. Each question is designed to test knowledge on fundamental concepts in computer science and operating system design.

Uploaded by

ninhhanh20112005
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)
20 views20 pages

Pre Test 3

The document contains a series of multiple-choice questions related to operating systems, memory management, deadlock conditions, and resource allocation. It covers topics such as page tables, segmentation, deadlock avoidance, and memory allocation strategies. Each question is designed to test knowledge on fundamental concepts in computer science and operating system design.

Uploaded by

ninhhanh20112005
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/ 20

For larger page tables, they are kept in main memory and a

________________________ points to the page table.


Câu hỏi 1Select one:
page table base register
page table register pointer
page table base pointer
page table base
If the offset is legal ____________
Câu hỏi 2Select one:
none of the mentioned
it is used as a physical memory address itself
it is subtracted from the segment base to produce the physical memory address
it is added to the segment base to produce the physical memory address
A state is safe, if ____________
Câu hỏi 3Select one:
all of the mentioned
the system does not crash due to deadlock occurrence
the system can allocate resources to each process in some order and still avoid a deadlock
the state keeps the system protected and safe
The offset ‘d’ of the logical address must be ____________
Câu hỏi 4Select one:
between 0 and segment limit
greater than the segment number
between 0 and the segment number
greater than segment limit
If there are 32 segments, each of size 1Kb, then the logical address should have
____________
Câu hỏi 5Select one:
15 bits
16 bits
13 bits
14 bits
32 segment = 25 bits
1kb = 210 bits => 10 + 5 = 15bits
The wait-for graph is a deadlock detection algorithm that is applicable when
____________
Câu hỏi 6Select one:
all resources have multiple instances
all of the mentioned
all resources have a single instance
all resources have a single 7 multiple instances
In paging the user provides only ________ which is partitioned by the hardware into
________ and ______
Câu hỏi 7Select one:
one address, page number, offset
one offset, page number, address
page number, offset, address
none of the mentioned
Transient operating system code is code that ____________
Câu hỏi 8Select one:
stays in the memory always
never enters the memory space
is not easily accessible
comes and goes as needed
The process to be aborted is chosen on the basis of the following factors?
Câu hỏi 9Select one:
how long the process has computed
process is interactive or batch
priority of the process
all of the mentioned
Those processes should be aborted on occurrence of a deadlock, the termination of
which?
Câu hỏi 10Select one:
incurs minimum cost
safety is not hampered
is more time consuming
all of the mentioned
Which of the following is TRUE?
Câu hỏi 11Select one:
Overlays are used to increase the logical address space
When overlays are used, the size of a process is not limited to the size of the physical
memory
Overlays are used whenever the physical address space is smaller than the logical address
space
Overlays are used to increase the size of physical memory

Starvation is an issue that is mentioned when considering concurrent processes, closely


related to deadlock.
If the size of logical address space is 2 to the power of m, and a page size is 2 to the
power of n addressing units, then the high order _____ bits of a logical address
designate the page number, and the ____ low order bits designate the page offset.
Câu hỏi 13Select one:
m – n, m
m, n
n, m
m – n, n
For every process there is a ________________
Câu hỏi 14Select one:
page table
copy of page table
pointer to page table
all of the mentioned
If binding is done at assembly or load time, then the process _____ be moved to
different locations after being swapped out and in again.
Câu hỏi 15Select one:
must
may
can
can never
The two ways of aborting processes and eliminating deadlocks are ____________
Câu hỏi 1Select one:
Abort one process at a time until the deadlock cycle is eliminated
Abort all processes
All of the mentioned
Abort all deadlocked processes
The ___________ swaps processes in and out of the memory.
Câu hỏi 2Select one:
CPU
User
Memory manager
CPU manager

An edge from process Pi to Pj in a wait for graph indicates that ____________


Câu hỏi 3Select one:
Pi is waiting for Pj to release a resource that Pi needs
Pi is waiting for Pj to leave the system
Pj is waiting for Pi to release a resource that Pj needs
Pj is waiting for Pi to leave the system
If the process can be moved during its execution from one memory segment to another,
then binding must be ____________
Câu hỏi 4Select one:
delayed until run time
preponed to load time
preponed to compile time
none of the mentioned
A multilevel page table is preferred in comparison to a single level page table for
translating virtual address to physical address because ____________
Câu hỏi 5Select one:
it is required by the translation lookaside buffer
it helps to reduce the number of page faults in page replacement algorithms
it helps to reduce the size of page table needed to implement the virtual address space of
a process
it reduces the memory access time to read or write a memory location
In segmentation, each address is specified by ____________
Câu hỏi 6Select one:
a key & value
an offset & value
a value & segment number
a segment number & offset
A deadlock avoidance algorithm dynamically examines the __________ to ensure that
a circular wait condition can never exist.
Câu hỏi 7Select one:
resources
system storage state
resource allocation state
operating system
The size of a page is typically ____________
Câu hỏi 8Select one:
power of 2
power of 4
varied
none of the mentioned
The number of resources requested by a process ____________
Câu hỏi 9Select one:
must always be less than the total number of resources available in the system
must not exceed the total number of resources available in the system
must always be equal to the total number of resources available in the system
must exceed the total number of resources available in the system
Each entry in a segment table has a ____________
Câu hỏi 10Select one:
segment peak
none of the mentioned
segment base
segment value
When memory is divided into several fixed sized partitions, each partition may contain
________
Câu hỏi 11Select one:
multiple processes at once
exactly one process
none of the mentioned
at least one process

The segment limit contains the ____________


Câu hỏi 13Select one:
none of the mentioned
starting physical address of the segment in memory
segment length
starting logical address of the process
In a system that does not support swapping ____________
Câu hỏi 14Select one:
binding of symbolic addresses to physical addresses normally takes place during
execution
the compiler normally binds symbolic addresses (variables) to relocatable addresses
the loader binds relocatable addresses to physical addresses
the compiler normally binds symbolic addresses to physical addresses

When the entries in the segment tables of two different processes point to the same
physical location ____________
Câu hỏi 15Select one:
the segments are invalid
the processes get blocked
segments are shared
all of the mentioned
The __________ is used as an index into the page table.
Câu hỏi 1Select one:
page number
frame offset
frame bit
page offset
Smaller page tables are implemented as a set of _______
Câu hỏi 2Select one:
stacks
counters
registers
queues
What is Address Binding?
Câu hỏi 3Select one:
a mapping from one address space to another
binding two addresses together to form a new address in a different memory space
locating an address with the help of another address
going to an address in memory
Each request requires that the system consider the _____________ to decide whether
the current request can be satisfied or must wait to avoid a future possible deadlock.
Câu hỏi 4Select one:
future requests and releases of each process
resources currently allocated to each process
processes that have previously been in the system
resources currently available
In fixed size partition, the degree of multiprogramming is bounded by ___________
Câu hỏi 6Select one:
all of the mentioned
the memory size
the number of partitions
the CPU utilization
The protection bit is 0/1 based on ____________
Câu hỏi 7Select one:
read – write
read only
none of the mentioned
write only
The _____ table contains the base address of each page in physical memory.
Câu hỏi 8Select one:
frame
page
process
memory
The operating system maintains a ______ table that keeps track of how many frames
have been allocated, how many are there, and how many are available.
Câu hỏi 9Select one:
mapping
page
frame
memory
Logical memory is broken into blocks of the same size called _________
Câu hỏi 10Select one:
pages
backing store
none of the mentioned
frames
What is the method for handling deadlock?
A. Use methods to ensure the system never falls into a deadlock state
B. Allow the system to enter a deadlock state and then recover
C. Pretend that deadlock never occurs in the system
Câu hỏi 11Select one:
A and C
A and B
A
A, B and C
The circular wait condition can be prevented by ____________
Câu hỏi 12Select one:
defining a linear ordering of resource types
using thread
all of the mentioned
using pipes
For a deadlock to arise, which of the following conditions must hold simultaneously?
Câu hỏi 13Select one:
All of the mentioned
Mutual exclusion
No preemption
Hold and wait
What location is the operating system?

Câu hỏi 14Select one:


in the high memory
none of the mentioned
either low or high memory (depending on the location of interrupt vector)
in the low memory
Every address generated by the CPU is divided into two parts. They are ____________
Câu hỏi 15Select one:
page offset & frame bit
frame bit & page number
page number & page offset
frame offset & page offset

A system has 3 processes sharing 4 resources of the same type. If each process needs a
maximum of 2 resources, then deadlock
Blank 1 Câu hỏi 1
Điều kiện để xảy ra deadlock:
Theo định lý của điều kiện an toàn (Banker's Algorithm), deadlock có thể được
tránh nếu:
Tổng số tài nguyên ≥ tổng số tiến trình × (số tài nguyên mỗi tiến trình cần - 1) + 1
Áp dụng công thức:
Needed ≥ P × (R - 1) + 1
Where:
- P = number of processes = 3
- R = max resource need per process = 2
=>
Needed ≥ 3 × (2 - 1) + 1
Needed ≥ 3 + 1 = 4

With relocation and limit registers, each logical address must be _______ the limit
register.
Câu hỏi 2Select one:
greater than
less than
none of the mentioned
equal to
The operating system and the other processes are protected from being modified by an
already running process because ____________
Câu hỏi 3Select one:
they are in different logical addresses
they have a protection algorithm
every address generated by the CPU is being checked against the relocation and limit
registers
they are in different memory spaces
The first fit, best fit and worst fit are strategies to select a ______
Câu hỏi 4Select one:
processor to run the next process
free hole from a set of available holes
process from a queue to put in memory
all of the mentioned

Which of the following condition is required for a deadlock to be possible?


Câu hỏi 5Select one:
all of the mentioned
a process may hold allocated resources while awaiting assignment of other resources
no resource can be forcibly removed from a process holding it
mutual exclusion
In contiguous memory allocation ____________
Câu hỏi 6Select one:
each process is contained in a single contiguous section of memory
all processes are contained in a single contiguous section of memory
none of the mentioned
the memory space is contiguous
If a higher priority process arrives and wants service, the memory manager can swap
out the lower priority process to execute the higher priority process. When the higher
priority process finishes, the lower priority process is swapped back in and continues
execution. This variant of swapping is sometimes called?
Câu hỏi 7Select one:
roll out, roll in
pull out, push in
priority swapping
none of the mentioned

The relocation register helps in ____________


Câu hỏi 8Select one:
to protect the address spaces of processes
none of the mentioned
a different address space to processes
providing more address space to processes
If deadlocks occur frequently, the detection algorithm must be invoked ________
Câu hỏi 9Select one:
none of the mentioned
rarely
rarely & frequently
frequently
Using transient code, _______ the size of the operating system during program
execution.
Câu hỏi 10Select one:
maintains
changes
decreases
increases
The primary memory can hold ____________ (khả năng sai câu này)
Câu hỏi 11Select one:
cpu
operating system
all of the mentioned
user processes
Given a priori information about the ________ number of resources of each type that
maybe requested for each process, it is possible to construct an algorithm that ensures
that the system will never enter a deadlock state.
Câu hỏi 12Select one:
approximate
average
maximum
minimum
If the wait for graph contains a cycle ____________
Câu hỏi 13Select one:
then a deadlock does not exist
either deadlock exists or system is in a safe state
then a deadlock exists
then the system is in a safe state
The segment base contains the ____________
Câu hỏi 14Select one:
starting physical address of the segment in memory
starting logical address of the process
segment length
none of the mentioned
Paging increases the ______ time.
Câu hỏi 15Select one:
waiting
execution
context – switch
all of the mentioned
What is the advantage of dynamic loading?
Câu hỏi 1Select one:
A used routine is used multiple times
CPU utilization increases
An unused routine is never loaded
All of the mentioned
With paging there is no ________ fragmentation.
Câu hỏi 2Select one:
internal
external
none of the mentioned
either type of
Consider a computer with 8 Mbytes of main memory and a 128K cache. The cache block
size is 4 K. It uses a direct mapping scheme for cache management. How many different
main memory blocks can map onto a given physical cache block?
Câu hỏi 3Select one:
64
256
8
2048
A deadlock can be broken by ____________
Câu hỏi 4Select one:
none of the mentioned
preempt all resources from all processes
abort one or more processes to break the circular wait
abort all the process in the system
What is Dynamic loading?
Câu hỏi 5Select one:
none of the mentioned
loading multiple routines dynamically
loading a routine only when it is called
loading multiple routines randomly
Binding of instructions and data to memory addresses can be done at ____________
Câu hỏi 6Select one:
Load time
All of the mentioned
Execution time
Compile time
The idea of overlays is to ____________
Câu hỏi 7Select one:
data that are needed at any given time
all of the mentioned
enable a process to be larger than the amount of memory allocated to it
keep in memory only those instructions
What is a reusable resource?
Câu hỏi 8Select one:
that can be used by more than one process at a time
none of the mentioned
that can be used by one process at a time and is not depleted by that use
that can be shared between various threads

Time taken in memory access through PTBR is ____________


Câu hỏi 9Select one:
slowed by a factor of 3
slowed by a factor of 2
extended by a factor of 3
extended by a factor of 2
The page table registers should be built with _______
Câu hỏi 10Select one:
none of the mentioned
very high speed logic
very low speed logic
a large memory space
The ___________ must design and program the overlay structure.
Câu hỏi 11Select one:
none of the mentioned
system designer
programmer
system architect
What are Multithreaded programs?
Câu hỏi 12Select one:
lesser prone to deadlocks
none of the mentioned
more prone to deadlocks
not at all prone to deadlocks

The initial value of the semaphore allows only one of many processes to enter its
critical section.
Câu hỏi 13Select one:
0
8
1
4
Physical memory is broken into fixed-sized blocks called ________
Câu hỏi 14Select one:
backing store
frames
pages
none of the mentioned
The request and release of resources are ___________
Câu hỏi 15Select one:
special programs
system callsSma
command line statements
interrupts

You might also like