Algorithm: Enhanced Second Chance Best Combination: Dirty Bit Is 0 and R Bit Is 0
Algorithm: Enhanced Second Chance Best Combination: Dirty Bit Is 0 and R Bit Is 0
Algorithm: Enhanced Second Chance Best Combination: Dirty Bit Is 0 and R Bit Is 0
1.modify/dirty bit
2.pooling device
It indicates whether or not the page has been called (referenced) recently
Which page replacement algorithm uses both dirty and reference bit combination to select
a victim page and what is the best combination?
If number of frame allocated for a given process falls below minimum , the process
will forever faults
differentiate between external and internal fragmentation?
1. Memory saving.
2. A process may lie in a none contiquous address space.
3. Pure Demand paging : can execute a prosses with zero pages loaded in RAM.
4. Demand paging : never load a page unless it needed.
5. Process may be loaded partially in RAM.
6. Paging system + lazy swapper.
Consider a paging system with a page table stored in memory that does not use virtual
memory.
if a memory reference takes 200 NS,
1. How long does a paged memory reference take?(answer in NS)
Paging system =200+200 =400 ns
2. What device O.S uses to speed up paged memory references?
TLB : Translation Look aside Buffer
If we increase the number of allocated frame this may increase page faults rate.
Preemptive : a process will give up CPU willingly wherever it’s be asked for.
non-preemptive : a process would never gives up the CPU unless it does an I/O
request or terminated.
A computer has 4096 byte of memory and a page size of 16 bytes.
1. How many frames are there in main memory?
4096 byte = 212
16 = 24
#frames = 212/24 = 28
2. On the average, how much memory is lost to internal fragmentation per process?
Using paging system at least one
3. What is the maximum number of entries in a process page table?
28 of entries
4. How many bits are used to represent the page number?
4 bit
5. How many bits are used to represent the offset number?
8 bit
2. FIFO
0623 get : 5
6235 get : 1
2351 get : 0
3510
3. Optimal/Max
0623 get : 5
5623 get : 1
5123 get : 0
1230
Regarding RR scheduling algorithm, In What way a process gets affected if it has two
entries inside the ready Queue?
Select the process twin , such that the process finished it’s job fast.
What is meant when a process is in a spin lock state? How can it be solved?
1. Compaction.
2. Paging system.
For what reason(s) we attach a dirty bit to process page table entries?
1. Critical section
2. Critical region
3. Semaphore
4. Monitors
computer has 245 byte of physical memory and a page size of 256 bytes that uses a paging system
with
a page table stored in memory with a TLB hardware support. If a memory reference takes 200
NS with
a TLB hit ratio of 80% and an TLB access time of 15 NS.
4. On the average, this many ____0___ frames are lost due to external fragmentation per
process.
5. On the average, this many ____At less than one page___ frames are lost due to internal
fragmentation per process.
10. It takes ___200+200 =400____ NS to access main memory without TLB support.
11. It takes ___200____ NS to access main memory without using page system support.
14. ___SJF_____ Scheduling algorithm produces the smallest average wait time.
17. An address binding of ____load______ and ____run______ have both logical and
physical address the same
18. According to 50% rule, if 140 blocks of memory have been allocated for
processes, a total number of blocks lost to external is _140/2 = 70_ blocks.
Consider the following 4 processes that need 25, 50, 100, 75 frames to run on a system that
has 200 free
frames. How many frames initially would be allocated for each process under
List three reasons why compaction is not a good solution to external fragmentation problem?
1. Allows a program to constraint and not to worry about how large it gets
2. All process that I want to lunch must be copied to paging device
3. If a process in not loaded in RAM → page it in
4. Program larger than physical memory can be loaded in RAM
A computer has four page frames. The time of loading, time of last access, and the R and M
bits for each
page are shown below (the times are in clock ticks)
2. Best Fit.
select a hole that is larger than the process size but the difference between
two size is the smallest.
3. Worst Fit.
select a hole that is the largest.
List three reasons why compaction is not a good solution to external fragmentation
problem?
1. Some process can’t be moved if their address binding is compile or load time.
2. This operation is CPU expensive.
3. Do not know which direction to move.
What is the main reason(s) for attatching the following bits to a give page table?
What Data structure used by O.S to keep track of multiple I/O requests to multiple devices
concurrently?
Table.
1. Compaction.
2. Paging System.
1. Compile time
2. Load time
3. Run-time
According to 50% rule, if 38 blocks of memory have been allocated, how many blocks are
to external fragmentation?
N/2 = 38/2 = 19