Recent questions tagged memory-management

1
If there are $32$ segments, each of size $1$ K byte, then the logical address should have $13 \text{ bits}$ $14 \text{ bits}$ $15 \text{ bits}$ $16 \text{ bits}$
2
Which of the following is not a form of main memory? Instruction cache Instruction register Instruction opcode Translation look-aside buffer
3
Which of the following is not a form of main memory? Instruction cache Instruction register Instruction opcode Translation look-aside buffer
1 vote
4
If a processor has $32$-bit virtual address, $28$-bit physical address, $2$ kb pages. How many bits are required for the virtual, physical page number? $17,21$ $21,17$ $6,10$ None
1 vote
5
Copying a process from memory to disk to allow space for other processes is called: Swapping Demand Paging Deadlock Page Fault
6
A CPU generates $32$-bit virtual addresses. The page size is $4$ KB. The processor has a Translation Look-aside Buffer (TLB) which can hold a total of $128$ page table entries and is $4$-way set associative. The minimum size of the TLB tag is $\text{11 bits}$ $\text{13 bits}$ $\text{15 bits}$ $\text{20 bits}$
7
Which of the following is added to the page table in order to track whether a page of cache has been modified since it was read from the memory? Reference bit Dirty bit Tag bit Valid bit
1 vote
8
A memory management system has $64$ pages with $512$ bytes page size. Physical memory consists of $32$ page frames Number of bits required in logical and physical address are respectively: $14$ and $15$ $14$ and $29$ $15$ and $14$ $16$ and $32$
9
What is compaction refers to a technique for overcoming internal fragmentation a paging technique a technique for overcoming external fragmentation a technique for compressing the data
10
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\$ What are the minimum number of frames required to get a single page fault for the above sequence assuming LRU replacement strategy? $7$ $4$ $6$ $5$
11
What would happen if the bitmap or free list containing the information about free disk blocks was completely lost due to a crash? Is there any way to recover from this disaster, or is it bye-bye disk? Discuss your answers for $UNIX$ and the $FAT -16$ file system separately.
12
The beginning of a free-space bitmap looks like this after the disk partition is first formatted$:\: 1000\: 0000\: 0000\: 0000$ (the first block is used by the root directory). The system always searches for free blocks starting at the lowest-numbered block, so after writing ... $A$ is deleted. File $C$ is written, using eight blocks. File $B$ is deleted.
13
Free disk space can be kept track of using a free list or a bitmap. Disk addresses require $D$ bits. For a disk with $B$ blocks, $F$ of which are free, state the condition under which the free list uses less space than the bitmap. For $D$ having the value $16$ bits, express your answer as a percentage of the disk space that must be free.
14
Consider a $4-TB$ disk that uses $4-KB$ blocks and the free-list method. How many block addresses can be stored in one block?
15
Explain how hard links and soft links differ with respective to i-node allocations.
16
Consider a file whose size varies between $4\: KB$ and $4\: MB$ during its lifetime. Which of the three allocation schemes (contiguous, linked and table/indexed) will be most appropriate?
17
For a given class, the student records are stored in a file. The records are randomly accessed and updated. Assume that each student’s record is of fixed size. Which of the three allocation schemes (contiguous, linked and table/indexed) will be most appropriate?
18
Some digital consumer devices need to store data, for example as files. Name a modern device that requires file storage and for which contiguous allocation would be a fine idea.
19
One way to use contiguous allocation of the disk and not suffer from holes is to compact the disk every time a file is removed. Since all files are contiguous, copying a file requires a seek and rotational delay to read the file, followed by the transfer at full speed. Writing ... back to the disk at a new location? Using these numbers, how long would it take to compact half of a $16-GB$ disk?
20
Write a program that can be used to compare the effectiveness of adding a tag field to $TLB$ entries when control is toggled between two programs. The tag field is used to effectively label each entry with the process id. Note that a nontagged $TLB$ can be ... your simulation behaves as expected for a simple (but nontrivial) input example. Plot the number of $TLB$ updates per $1000$ references.
21
Write a program that will demonstrate the difference between using a local page replacement policy and a global one for the simple case of two processes. You will need a routine that can generate a page reference string based on a statistical model. This model has $N$ ... a global policy instead of a local one. Also, contrast the per-process page fault rate with that of the local policy approach.
22
Write a program that demonstrates the effect of $TLB$ misses on the effective memory access time by measuring the per-access time it takes to stride through a large array. Explain the main concepts behind the program, and describe what you expect the output to ... . Repeat part $(b)$ but for an older computer with a different architecture and explain any major differences in the output.
23
Write a program that simulates a toy paging system that uses the $\text{WSClock}$ algorithm. The system is a toy in that we will assume there are no write references (not very realistic), and process termination and creation are ignored (eternal life). The ... per $1000$ memory references. Explain what is needed to extend the program to handle a page reference stream that also includes writes.
24
Write a program that simulates a paging system using the aging algorithm. The number of page frames is a parameter. The sequence of page references should be read from a file. For a given input file, plot the number of page faults per $1000$ memory references as a function of the number of page frames available.
25
Plot a histogram and calculate the mean and median of the sizes of executable binary files on a computer to which you have access. On a Windows system, look at all .exe and .dll files; on a UNIX system look at all executable files in /bin, /usr/bin, ... assumption about the size of a page table entry. Assume that all programs are equally likely to be run and thus should be weighted equally.
26
Virtual memory provides a mechanism for isolating one process from another. What memory management difficulties would be involved in allowing two operating systems to run concurrently? How might these difficulties be addressed?
27
Can you think of any situations where supporting virtual memory would be a bad idea, and what would be gained by not having to support virtual memory? Explain.
We consider a program which has the two segments shown below consisting of instructions in segment $0,$ and read/write data in segment $1.$ Segment $0$ has read/execute protection, and segment $1$ has just read/write protection. The memory system is a demand- paged virtual memory system ... $16$ Fetch from segment $1,$ page $4,$ offset $28$ Jump to location in segment $1,$ page $3,$ offset $32$
When segmentation and paging are both being used, as in $MULTICS,$ first the segment descriptor must be looked up, then the page descriptor. Does the $TLB$ also work this way, with two levels of lookup?