
Unit 1 + Unit 2 + Unit 3
Authored by Viswathika K
Computers
University
Used 3+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
35 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
The method of mapping the consecutive memory blocks to consecutive cache blocks is called ______
Set associative
Associative
Direct
Indirect
Answer explanation
In Direct Mapping, each block of main memory maps to exactly one block in the cache. This is done using the formula:
Cache Block = (Main Memory Block Number) % (Number of Cache Blocks)
It is simple and fast but can lead to conflicts if multiple memory blocks map to the same cache location.
Other types:
Associative Mapping allows a memory block to go to any cache block.
Set-Associative Mapping divides the cache into sets, offering a balance between direct and associative mapping.
Indirect is not a standard cache mapping technique.
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Consider the following page reference string. 1 2 3 4 2 1 5 6 2 1 2 3 7 6 3 2 1 2 3 6 For FIFO page replacement algorithms with 3 frames, the number of page faults is?
16
15
14
11
Answer explanation
The FIFO algorithm replaces the oldest page in memory when a new page is referenced and not found in the frames.
Every time a new page is loaded (not already in memory), it counts as a page fault.
The total number of page faults in this case is 16.
The FIFO algorithm replaces the oldest page in memory when a new page is referenced and not found in the frames.
Every time a new page is loaded (not already in memory), it counts as a page fault.
The total number of page faults in this case is 16.
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
In which of the below phenomenon, memory is wasted?
Campaction
Fragmentation
Multiplexing
Paging
Thrashing
Answer explanation
Fragmentation: When memory is allocated to a huge number of non-contiguous memory chunks and leaves a high amount of unallocated memory but still, that unallocated chunk of memory is unusable then this phenomenon is called fragmentation.
There are two types of fragmentation:
· Internal Fragmentation: This fragmentation occurs when the allocated partition s occupied by the program of size lesser than the partition. It occurs in fixed-size memory allocation.
· External Fragmentation: This fragmentation occurs when enough contiguous space cannot be found as the empty partitions are dispersed non-contiguously. It occurs in dynamic memory allocation.
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
To avoid the race condition, the number of processes that may be simultaneously inside their critical section is
8
1
16
0
Answer explanation
To avoid race conditions, only one process should be allowed inside its critical section at a time. This ensures mutual exclusion, a key requirement in solving the critical section problem in concurrent programming.
Allowing more than one process in the critical section can lead to inconsistent or incorrect results due to simultaneous access to shared resources.
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
For a deadlock to arise, which of the following conditions must hold simultaneously?
Mutual exclusion
No preemption
Hold and wait
All of the mentioned
Answer explanation
A deadlock can occur only if all the following four conditions hold simultaneously:
Mutual Exclusion – Only one process can use a resource at a time.
Hold and Wait – A process holding at least one resource is waiting to acquire additional resources.
No Preemption – A resource can be released only voluntarily by the process holding it.
Circular Wait – A set of processes are waiting for each other in a circular chain.
These are known as the Coffman conditions. If even one of these is prevented, deadlock can be avoided.
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
All unsafe states are ____________
deadlocks
not deadlocks
fatal
none of the mentioned
Answer explanation
All unsafe states are not necessarily deadlocks. An unsafe state means the system might enter a deadlock if the processes proceed in a certain way. However, it's still possible for the system to avoid deadlock by careful resource allocation.
Safe state: The system can allocate resources to each process in some order and still avoid deadlock.
Unsafe state: There is a risk of deadlock, but it has not occurred yet.
Deadlock: A definite condition where processes are stuck waiting for resources forever.
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
A system has 12 magnetic tape drives and 3 processes : P0, P1, and P2. Process P0 requires 10 tape drives, P1 requires 4 and P2 requires 9 tape drives.
Which of the following sequence is a safe sequence?
P0, P1, P2
P1, P2, P0
P2, P0, P1
P1, P0, P2
Answer explanation
Can P1 run?
Yes, P1 needs 2, and we have 3.
→ Run P1, release 2 → Available = 5
Can P0 run now?
Yes, P0 needs 5, and we now have 5.
→ Run P0, release 5 → Available = 10
Can P2 run now?
Yes, P2 needs 7, and we have 10.
→ Run P2, release 2 → Available = 12
✅ Safe Sequence: P1 → P0 → P2
Access all questions and much more by creating a free account
Create resources
Host any resource
Get auto-graded reports

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple
Others
Already have an account?