首页 » cs代考 » 操作系统代考 | CMPSC473 MidTerm 1

操作系统代考 | CMPSC473 MidTerm 1

本次美国代考主要为操作系统相关的限时测试

Question 22:

Consider a virtual memory system using a 3-level page table where the parameters n and p are 48 and 17, respectively. The size of the DRAM is 4GB. The number of bits of virtual address used for indexing into the first- and the second-level page tables are 10 and 10, respectively. Suppose each page table entry in the outermost level is 8 bytes long. How much memory is required for the page tables translating the user portion of the address space when the process address space looks as follows:

  • The code+data segment grows upwards starting from address 0x000000000000 and is of size 2 MB.
  • The heap grows upwards from address 0x000005000000 and is of size 10 MB.

The stack grows downwards from address 0xCFFFFFFFFFFF and is of size 15 MB

 

Question23:

You go to Best Buy and find two computers on sale both for $499. You would like to purchase the one that will be faster for your processes (collectively “workload”). 10% of the instructions in your workload are memory instructions. You choose to apply ideas from CMPSC 473 to compare their cycles per instruction (CPI).

Computer A has an older CPU (slower and no hardware cache) but uses a faster Flash-based swap disk.

  • CPU speed is 1 GHz
  • non-memory instructions take 1 cycle each due to pipelining
  • TLB hit rate is 0.99
  • The page fault rate is 0.01
  • The roundtrip latencies between relevant elements are as follows:
    • CPU to TLB: 1 ns
    • CPU to DRAM: 100 ns
    • CPU/DRAM to swap disk: 5,000,000 ns

Computer B has a faster CPU with an L1 cache but a S.L.O.W. magnetic disk:

  • CPU speed is 2 GHz
  • non-memory instructions take 1 cycle each due to pipelining
  • TLB hit rate is 0.99
  • There is an L1 cache offering a hit rate of 0.95.  The L1 cache is physically addressed. There are no other hardware caches.
  • The page fault rate is 0.01
  • The roundtrip latencies between relevant elements are as follows:
    • CPU to TLB: 1 ns
    • CPU to L1: 2 ns
    • CPU to DRAM: 100 ns
    • CPU/DRAM to swap disk: 10,000,000 ns

What average CPIs do you estimate these computers might offer you? Which one will you buy?


程序辅导定制C/C++/JAVA/安卓/PYTHON/留学生/PHP/APP开发/MATLAB


本网站支持 Alipay WeChatPay PayPal等支付方式

E-mail: vipdue@outlook.com  微信号:vipnxx


如果您使用手机请先保存二维码,微信识别。如果用电脑,直接掏出手机果断扫描。

blank