(Solved) : Text 14411fb9162914e31f7b1a2c141a20bd194514b91fcb184414ed2068186f1673202a183812e420ec196a1 Q42775904 . . .

Create a Java program which translates a virtual address to a physical address for a hypothetical computer. The input is a teVirtual Memory - pageTable: FrameEntry[] - Fifo Queue: Queue + Virtual Memory + physicalAddress(virtualAddress: int): int QueUpload: Your Java source file (java) Sample Output Last few lines of console output for provided virtual.txt Page Fault: Page

text

14411fb9162914e31f7b1a2c141a20bd194514b91fcb184414ed2068186f1673202a183812e420ec196a109c1d4b127215051e61189b10381ee01594131821ee158c10941f5b177715d71f031843127c225411f712ff1dec16a116212187171d134e212f168216a91f2613fa14c3220b154413511fd915731727201516ca1120219016c3134c20de144b137c216a1617156b209c17a014361d21178210fb21da159a12b22096188016422001143b1381203e1711136f1f56176d12461f54156c1202220f1861128723ef153e11c61f451672143621161861112620c61a45118b1f711679122921081698117c2121182013381fac1894150e1ff6171412ef212c180210ce1a761785dc2200718f414332048148e11251fd4196110801dc61825149d1f16192e13a31f5c10b717aa1e4f1ab1100a200b151a13ea1f1512af12591e9318a318e21efb17de17181fa116cd10bd215618e0156422491ac518491dce173e116e1f9a170013201ff01594152e1f96181511971ecd1456117f21ed1469ecb1d5515031155203a18a812471faa176f14cc2157174e15eb202f1796138d21cb181fCreate a Java program which translates a virtual address to a physical address for a hypothetical computer. The input is a text file with a list of 16-bit virtual addresses in Hexadecimal. The output is a text file with the corresponding physical addresses. Each page fault will also result in a message to the console. This computer is byte-addressable with 16-bit virtual addresses, 2KB of physical memory, and a 256 byte page size. It uses a FIFO page replacement policy. Requirements 1. The program must be written in Java. 2. It reads Hexidecimal address from the virtual.txt file and writes physical addresses to the physical.txt file. 3. When a page is not in physical memory. A page fault occurs. The program must display a message to the console indicating which page (if any) was swapped out of physical memory and which physical memory frame the new page was loaded into. 4. To implement the FIFO page replacement policy a queue is required. You may implement the queue yourself or use the one provided by the Java API. Hint: The UML Class diagram below describes one way to organize the program. Extra Credit (up to 10 points) In addition to using the FIFO replacement policy, run the same data using an LRU policy. Calculate and display the hit ration for that. Virtual Memory – pageTable: FrameEntry[] – Fifo Queue: Queue + Virtual Memory + physicalAddress(virtualAddress: int): int Queue FrameEntry – FrameNumber: int – ValidBit: boolean -pages: int[] – nextIn: int – nextOut: int – size: int – count: int + Frame Entry + setFrame(frame:int):void + getFrame(): int + setValid(valid: boolean): void + getValido): boolean + Queue queue Size:int) + addPage(pageNumber: int) : void + removePage(): int + isEmpty(): boolean + isFullo: boolean + getCount(): int Upload: Your Java source file (java) Sample Output Last few lines of console output for provided virtual.txt Page Fault: Page if loaded in frame 4 replaces page le Page Fault: Page 17 loaded in frame 5 replaces page 14 Page Fault: Page 14 loaded in frame 6 replaces page 21 Page Fault: Page 21 loaded in frame 7 replaces page e Page Fault: Page 15 loaded in frame 0 replaces page id Page Fault: Page 13 loaded in frame 1 replaces page 11 Page Fault: Page 18 loaded in frame 2 replaces page 20 File physical.txt closed Hit ratio: 0.49047619047619045 Show transcribed image text Create a Java program which translates a virtual address to a physical address for a hypothetical computer. The input is a text file with a list of 16-bit virtual addresses in Hexadecimal. The output is a text file with the corresponding physical addresses. Each page fault will also result in a message to the console. This computer is byte-addressable with 16-bit virtual addresses, 2KB of physical memory, and a 256 byte page size. It uses a FIFO page replacement policy. Requirements 1. The program must be written in Java. 2. It reads Hexidecimal address from the virtual.txt file and writes physical addresses to the physical.txt file. 3. When a page is not in physical memory. A page fault occurs. The program must display a message to the console indicating which page (if any) was swapped out of physical memory and which physical memory frame the new page was loaded into. 4. To implement the FIFO page replacement policy a queue is required. You may implement the queue yourself or use the one provided by the Java API. Hint: The UML Class diagram below describes one way to organize the program. Extra Credit (up to 10 points) In addition to using the FIFO replacement policy, run the same data using an LRU policy. Calculate and display the hit ration for that.
Virtual Memory – pageTable: FrameEntry[] – Fifo Queue: Queue + Virtual Memory + physicalAddress(virtualAddress: int): int Queue FrameEntry – FrameNumber: int – ValidBit: boolean -pages: int[] – nextIn: int – nextOut: int – size: int – count: int + Frame Entry + setFrame(frame:int):void + getFrame(): int + setValid(valid: boolean): void + getValido): boolean + Queue queue Size:int) + addPage(pageNumber: int) : void + removePage(): int + isEmpty(): boolean + isFullo: boolean + getCount(): int
Upload: Your Java source file (java) Sample Output Last few lines of console output for provided virtual.txt Page Fault: Page if loaded in frame 4 replaces page le Page Fault: Page 17 loaded in frame 5 replaces page 14 Page Fault: Page 14 loaded in frame 6 replaces page 21 Page Fault: Page 21 loaded in frame 7 replaces page e Page Fault: Page 15 loaded in frame 0 replaces page id Page Fault: Page 13 loaded in frame 1 replaces page 11 Page Fault: Page 18 loaded in frame 2 replaces page 20 File physical.txt closed Hit ratio: 0.49047619047619045

Expert Answer


Answer to text 1441 1fb9 1629 14e3 1f7b 1a2c 141a 20bd 1945 14b9 1fcb 1844 14ed 2068 186f 1673 202a 1838 12e4 20ec 196a 109c 1d4b…

Leave a Comment

About

We are the best freelance writing portal. Looking for online writing, editing or proofreading jobs? We have plenty of writing assignments to handle.

Quick Links

Browse Solutions

Place Order

About Us