1 a) Page hit is the event when the page that CPU wants to execute is found in the main memory while execution and does not require any transfer from secondary to main memory. In the given scenario in question when page 0,1,2 and 3 are in main memory. When CPU will look for page 0,1,2 or 3 that will result in page hit.
b) Page miss is the event when the page that CPU wants to execute is not found in the main memory while execution. Those pages are in secondary memory and needs to be brought in main memory by using the page replacement algorithms. In the given scenario in question where 0,1,2 and 3 are in main memory and 4,5 are in secondary memory. When CPU will look for pages 4 or 5 in main memory, it will result in page miss.
c) Page fault is another name for page miss. One can say, Page fault is a result of page miss and vice versa.
d) The cause of page fault is when the CPU tries to access a page which is currently not in the physical memory and is present in the secondary memory. Page fault will occur when CPU will try access page 4 or 5 which is not in the main memory.
1. We have learnt that CPU can run a process only when it is in main...
Operating Systems Questions (Please help if you can) 1. A computer has cache, main memory, and a disk used for virtual memory. If a referenced word is in the cache, 20ns are required to access it. If it is in main memory but not in the cache, 60ns are required to load it into the cache (this includes the time to originally check the cache), and then, the reference is started again. If the word is not in main memory,...
Which of the following about virtual memory is not true? A) Virtual memory needs paging hardware B)Virtual Memory uses storage device to extend the physical main memory C)The optimal replacement strategy is the most practical strategy D)Multiple process can share pages What should we do when having a page fault (Multiple answers)? A)Skip the machine instruction causing the page fault. B)Update the page table after loading the missing page C) Switch to a process that does not have page faults...
Implement the frame replacement algorithm for virtual memory Assume a computer system have 10 memory frames available inside the physical memory and is required to execute a process containing 20 pages. Assume a process P has been executed in the system and produced a sequence of 40 page demands as follows: Page demands trace of process P Demand 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 cont. Page...
1. 2-way Set Associative Cache Memory Consider a hypothetical machine with 1K words of cache memory. They are in two-way set associative organization, with cache block size of 128 words, using LRU replacement algorithm. Suppose the cache hit time is 9ns, the time to transfer the first word from main memory to cache is 50ns, while subsequent words require 10ns/word. Consider the following read pattern (in blocks of 128 words, and block id starts from 0): 1 2 3 5...
1. Given that main memory is composed of only three page frames for public use and that a seven-page program (with pages a, b, c, d, e, f, g) that requests pages in the following order: a, c, a, b, a, d, a, c, b, d, e, f a. Using the FIFO page removal algorithm, indicate the movement of the pages into and out of the available page frames (called a page trace analysis) indicating each page fault with an...
4. A multi-programmed operating system running on a single CPU assigns time slices of CPU time to the virtual machines that run the individual programs. Each virtual machine is given access to the CPU for a certain time (the time slice), during which it will continue to execute its program. The next time slice then goes to another virtual machine, and so on. Assume that each time slice is one millisecond (1/1000 of a second) long and the computer on...
Choose the correct answer 1. A virtual machine executes on a host operating system and a hypervisor provides an API to the actual hardware 2. The guest OS knows that it is not accessing the actual hardware so that it can perform better 3. The VM may supply an environment that is different than the actual host hardware 4. Applications running within the VM have an illusion that they are executing on a real machine Select one: a. All the...
Part 1: A pipelined computer completes instructions more quickly by having more than one instruction at a time "in the pipeline." Explain what problem branch instructions cause with instruction pipelining. Describe one approach to overcoming this problem. Part 2: RISC computers generally execute more instructions per second than CISC computers. Describe the penalty or trade-off paid when adopting the RISC architecture. Part 3: When a cache hit to a cache on the CPU chip occurs on a memory write the...
1.Explain why computers have both main memory and secondary storage. 2.Explain the operations carried out by the preprocessor, compiler, and linker. 3.Explain what is stored in a source file, an object file, and an executable file. 4.What is an algorithm? 5.Describe difference between program line and a statement. 6.Is a syntax error found by the compiler or when the program is running? 7.What two units does the CPU consist of? 8.What happens to a variable’s current contents when a new...
Let’s say that we have a 4-way set associative cache. The cache has 16 sets in total. Main memory consists of 16K blocks of 16 words each, and word addressing is used. a. Show the address format that is used to map main memory address to the cache. Include the appropriate fields and their sizes. For the remaining questions, assume that we have the following situation: We have a program that loops 6 times from location 1209810 in memory to...