亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? homework #3 solution.htm

?? operating system concepts sixth edition windows XP updat 操作系統課后答案
?? HTM
字號:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<!-- saved from url=(0059)http://www.cse.ucsd.edu/classes/fa04/cse120/hw/hw3-sol.html -->
<HTML><HEAD><TITLE>CSE 120 (Fall 2004) -- Homework #3 Solution</TITLE>
<META http-equiv=Content-Type content="text/html; charset=gb2312">
<META content="MSHTML 6.00.2900.2627" name=GENERATOR></HEAD>
<BODY>
<H2>CSE 120 (Fall 2004) -- Homework #3 Solution</H2><FONT color=blue 
size=+1><B>Out: 11/4</B></FONT><BR><FONT color=red size=+1><B>Due: 
11/16</B></FONT> 
<OL>
  <P>
  <LI><A 
  href="http://www.cse.ucsd.edu/classes/fa04/cse120/hw/vm-work-sol.html">Nachos 
  VM Worksheet Solution</A> 
  <P></P>
  <LI>Chapter 9: 9.10, 9.14 
  <P>9.10&nbsp; Consider a paging system with the page table stored in memory. 
  <P>&nbsp;&nbsp; a. If a memory reference takes 200 nanoseconds, how long does 
  a paged memory reference take?
  <P><FONT color=#0000ff>&nbsp;&nbsp; One memory reference for page table, 
  another one for actual content: 2 * 200 = 400</FONT>
  <P><BR>&nbsp;&nbsp; b. If we add TLBs, and 75 percent of all page-table 
  references are found in the TLBs, what is the effective memory reference time? 
  (Assume that finding a page-table entry in the TLBs takes zero time, if the 
  entry is there.) 
  <P><FONT color=#0000ff>&nbsp;&nbsp; (1 - 75%) * 200 + 200 = 250</FONT>
  <P>9.14&nbsp; Explain why it is easier to share a reentrant module using 
  segmentation than it is to do so when pure paging is used. 
  <H3><SPAN style="FONT-WEIGHT: 400"><FONT color=#0000ff size=3>1. A segment is 
  a logical entity in modular programming, and programs tend to share code at 
  segment granularities (e.g., libraries). There is less overhead to set up a 
  shared segment (one entry per segment) than to share multiple fixed-size pages 
  (one entry per page).</FONT></SPAN></H3>
  <H3><SPAN style="FONT-WEIGHT: 400"><FONT color=#0000ff size=3>2. Pointers 
  within segments are relative to the segment base. It does not matter where in 
  the segment table a segment gets loaded, the pointers will remain valid. In 
  paging, all shared pages have to be loaded at the same virtual addresses in 
  all processes for pointers within the shared region to remain valid. 
  </FONT></SPAN></H3>
  <P></P>
  <LI>Chapter 10: 10.2, 10.9, 10.19 
  <P>10.2&nbsp; Assume that you have a page-reference string for a process with 
  <I>m</I> frames (initially all empty). The page-reference string has length 
  <I>p</I>; <I>n</I> distinct page numbers occur in it. Answer these questions 
  for any page-replacement algorithms: 
  <P>&nbsp; &nbsp; a. What is a lower bound on the number of page faults? 
  <BR><FONT color=#0000ff>&nbsp;&nbsp; &nbsp;n -- distinct page numbers always 
  generate a page fault, even if two difference pages refer to the same physical 
  page frame.<BR></FONT>&nbsp; &nbsp; b. What is an upper bound on the number of 
  page faults? <BR><FONT color=#0000ff>&nbsp;&nbsp;&nbsp; p -- if we reference p 
  pages, we will generate at most p page faults..</FONT>
  <P>10.9&nbsp; Consider a demand-paging system with the following time-measured 
  utilizations: 
  <P>&nbsp; &nbsp; CPU utilization: 20% <BR>&nbsp; &nbsp; Paging disk: 97.7% 
  (demand, not storage)<BR>&nbsp; &nbsp; Other I/O devices: 5% <BR>
  <P>For each of the following, say whether it will (or is likely to) improve 
  CPU utilization. Briefly explain your answers. 
  <P>&nbsp;&nbsp; a. Install a faster CPU<BR><FONT 
  color=#0000ff>&nbsp;&nbsp;&nbsp; No. Installing a faster CPU might make the 
  page fault handler run faster. However, processes will also access data more 
  frequently and the situation becomes worse.</FONT>
  <P>&nbsp;&nbsp; b. Install a bigger paging disk <BR><FONT 
  color=#0000ff>&nbsp;&nbsp;&nbsp; No. We need more memory to relieve our 
  situation, not more capacity to store pages. <!-- (or Yes, if you claim bigger disk spins faster, which is somewhat true) --></FONT>
  <P>&nbsp;&nbsp; c. Increase the degree of multiprogramming <BR><FONT 
  color=#0000ff>&nbsp;&nbsp;&nbsp; No. Adding more processes will just make the 
  system thrash more.</FONT>
  <P>&nbsp;&nbsp; d. Decrease the degree of multiprogramming<BR><FONT 
  color=#0000ff>&nbsp;&nbsp;&nbsp; Yes. When thrashing happens, a quick solution 
  is to swap out some applications.</FONT>
  <P>&nbsp;&nbsp; e. Install more main memory<BR><FONT 
  color=#0000ff>&nbsp;&nbsp;&nbsp; Yes. More memory will reduce page faults, 
  reduce disk utilization, and thereby improve CPU utilization. </FONT>
  <P>&nbsp;&nbsp; f. Install a faster hard disk, or multiple controllers with 
  multiple hard disks <BR><FONT color=#0000ff>&nbsp;&nbsp;&nbsp; Yes, but not 
  too much. A faster disk makes page faults faster, but the disk is still 
  relatively very slow compared to the CPU and memory. </FONT>
  <P>&nbsp;&nbsp; g. Add prepaging to the page-fetch algorithms<BR>&nbsp;&nbsp; 
  <FONT color=#0000ff>&nbsp;No. Although pre-paging might save some page faults, 
  other processes are penalized for this. When memory is a scarce resource, 
  pre-paging does not help because the pre-fetched pages will be re-claimed by 
  some other process after the next context switch. And the situation is worse 
  if pre-paging loads unnecessary pages (e.g., is not 100% accurate). </FONT>
  <P>&nbsp;&nbsp; h. Increase the page size<BR><FONT 
  color=#0000ff>&nbsp;&nbsp;&nbsp; No. A larger page size will reduce the number 
  of page faults and relative overhead of performing I/Os. However, a larger 
  page size increases internal fragmentation, lowering effective memory 
  utilization. This situation aggravates thrashing. 
  <P>In general, when resources are scarce, improving a contention algorithm 
  will not help much. The primary recourse is to increase resources. Swapping 
  effectively increases memory resources by reducing the number of processes 
  competing for it. </FONT>
  <P>10.19&nbsp; We have an operating system for a machine that uses base and 
  limit registers, but we have modified the machine to provide a page table. Can 
  we set up the page tables to simulate base and limit registers? How can we do 
  so, or why can we not do so? 
  <P><FONT color=#0000ff>We can do that by storing base/limit in PTEs and 
  limiting the segment to be size of multiple pages. For example, suppose we 
  have a segment S of segment number X and offset Y contains P pages. We use X 
  to lookup the PTE of the first page and get the base. The PTE also tells us 
  where is the next page of S so we keep going until we reach the last PTE, 
  which tells us the limit of S.</FONT>
  <P>&nbsp;
  <P></P>
  <LI>[Crowley] Suppose we have an average of one page fault every 20,000,000 
  instructions, a normal instruction takes 2 nanoseconds, and a page fault 
  causes the instruction to take an additional 10 milliseconds. What is the 
  average instruction time, taking page faults into account? Redo the 
  calculation assuming that a normal instruction takes 1 nanoseconds instead of 
  2 nanoseconds. 
  <P><FONT color=#0000ff>a) Time of 1 instruction = 2 ns <BR>&nbsp;&nbsp;&nbsp; 
  Time to handle 1 page fault = 10 msec = 10,000 ns<BR>&nbsp;&nbsp;&nbsp; 
  Frequency of page fault = 1 in 20,000,000 instructions. <BR>&nbsp;&nbsp;&nbsp; 
  Hence, average time wasted on page fault = 10,000ns/20,000,000 inst. = 0.5 
  ns/inst. <BR>&nbsp;&nbsp;&nbsp; Thus, average time of an instruction execution 
  = 2 ns + 0.5 ns = 2.5 ns </FONT></P>
  <P><FONT color=#0000ff>b) Time of 1 instruction = 1 ns <BR>&nbsp;&nbsp;&nbsp; 
  Time to handle 1 page fault = 10 msec = 10,000 ns<BR>&nbsp;&nbsp;&nbsp; 
  Frequency of page fault = 1 in 20,000,000 instructions. <BR>&nbsp;&nbsp;&nbsp; 
  Hence, average time wasted on page fault = 10,000ns/20,000,000 inst. = 0.5 
  ns/inst. <BR>&nbsp;&nbsp;&nbsp; Thus, average time of an instruction execution 
  = 1 ns + 0.5 ns = 1.5 ns</FONT></P>
  <P>&nbsp;</P>
  <P></P>
  <LI>[Crowley] Suppose we have a computer system with a 44-bit virtual address, 
  page size of 64K, and 4 bytes per page table entry. 
  <OL>
    <LI>How many pages are in the virtual address space?<BR><FONT 
    color=#0000ff>2^44 / 64K = 2^28</FONT>
    <LI>Suppose we use two-level paging and arrange for all page tables to fit 
    into a single page frame. How will the bits of the address be divided 
    up?<BR><FONT color=#0000ff>The first level page table has 64K/4 = 16K = 2^14 
    entries, so the length of first level paging is 14<BR>The second level page 
    table has 64K/4 = 16K = 2^14 entries, so the length of second level paging 
    is 14<BR>The offset field has 44 - 14 - 14 = 16 bits length</FONT>
    <LI>Suppose we have a 4 GB program such that the entire program and all 
    necessary page tables (using two-level pages from above) are in memory. 
    (Note: It will be a <I>lot</I> of memory.) How much memory, in <B>page 
    frames</B>, is used by the program, including its page tables? </LI></OL>
  <P><FONT color=#0000ff>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Pages used 
  by the program are 4G/64K = 2^(32-16) = 2^16 page 
  frames<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Pages used by the second 
  level page table are <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (# pages 
  used by the program) / (# pages indexed per page table) * (# page frames used 
  per page table) = 2^16 / 2^14 * 1 = 
  4<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Pages used by the first level 
  page table are <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (#number of the 
  second level page table)&nbsp; / (# pages indexed per page table) * (# page 
  frames used per page table) = 4 / 2^16 * 
  1<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; The total page frames used = 
  2^16 + 4 + 1</FONT></P>
  <P>&nbsp;</P>
  <P></P>
  <LI>[Tanenbaum] If FIFO page replacement is used with four page frames and 
  eight pages, how many page faults will occur with the reference string 
  0172327103 if the four frames are initially empty? Now repeat this problem for 
  LRU. </LI></OL>
<P><FONT color=#0000ff>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 6 
page faults for FIFO and 7 for LRU, which include 4 cold start page faults in 
each case.</FONT></P><PRE></PRE><PRE></PRE>
<HR>
</BODY></HTML>

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
日韩三级免费观看| 韩国v欧美v日本v亚洲v| 日日摸夜夜添夜夜添国产精品| 丝袜美腿成人在线| 激情综合色播激情啊| 欧美国产1区2区| 亚洲欧美国产77777| 日韩中文字幕1| 国产精品99久久久久久久女警| 91视频国产观看| 日韩丝袜情趣美女图片| 国产精品美女久久久久高潮| 亚洲自拍偷拍图区| 狠狠色伊人亚洲综合成人| 成人小视频在线观看| 欧美日本在线播放| 国产精品色眯眯| 免费看欧美美女黄的网站| 成人激情动漫在线观看| 欧美人成免费网站| 中文字幕va一区二区三区| 天堂一区二区在线| 不卡的av在线播放| 欧美成人一区二区三区片免费| 最近日韩中文字幕| 欧美一二三四区在线| 中文字幕日韩av资源站| 免费成人在线影院| 色吊一区二区三区| 国产日韩v精品一区二区| 天堂av在线一区| jlzzjlzz欧美大全| 久久综合久久99| 亚洲v中文字幕| 成人av一区二区三区| 日韩精品在线看片z| 亚洲成人动漫在线免费观看| 成人国产精品视频| 精品福利一区二区三区免费视频| 亚洲国产成人高清精品| 成人av网址在线| 久久久久久**毛片大全| 日本午夜精品视频在线观看| 色老综合老女人久久久| 国产精品影音先锋| 在线播放91灌醉迷j高跟美女| 国产精品久久777777| 国产一区二区女| 欧美一区二区三区的| 亚洲成人中文在线| 色网综合在线观看| 国产精品久久网站| 国产成人免费9x9x人网站视频| 日韩欧美色综合网站| 天天综合网天天综合色| 在线看一区二区| 亚洲乱码国产乱码精品精小说| 成人一级片在线观看| 久久综合给合久久狠狠狠97色69| 强制捆绑调教一区二区| 欧美日韩国产精品自在自线| 亚洲一区二区三区中文字幕在线| 成人国产精品免费观看| 国产色婷婷亚洲99精品小说| 国产麻豆精品久久一二三| 欧美成人艳星乳罩| 精品成人一区二区三区四区| 秋霞影院一区二区| 欧美日韩高清一区二区不卡 | 日韩中文字幕一区二区三区| 日本道在线观看一区二区| 亚洲精品中文在线| 色一情一乱一乱一91av| 一区二区三区国产精华| 日本大香伊一区二区三区| 亚洲伦理在线精品| 欧美午夜精品久久久久久超碰| 亚洲激情一二三区| 欧美日韩一区精品| 日产欧产美韩系列久久99| 欧美一区二区视频在线观看2020| 日本不卡不码高清免费观看| 日韩一区二区不卡| 国产一区二区视频在线播放| 久久精品亚洲麻豆av一区二区| 国产高清久久久| 波多野结衣精品在线| 1024成人网| 欧美视频中文一区二区三区在线观看| 一区二区三区在线观看国产| 欧美日韩午夜精品| 久久精品国产亚洲a| 26uuu久久综合| 国产精品一区二区久久精品爱涩| 国产精品嫩草影院com| 色欧美88888久久久久久影院| 亚洲一区二区三区自拍| 日韩欧美国产电影| 成人性色生活片| 亚洲一区二区三区四区在线观看 | 久久亚洲一级片| 成人h动漫精品一区二区| 亚洲精品自拍动漫在线| 欧美一区二区三区日韩| 国产精品资源在线| 亚洲人妖av一区二区| 欧美日本在线视频| 国产乱色国产精品免费视频| 国产精品成人免费在线| 欧美三级在线视频| 狠狠网亚洲精品| 亚洲人成网站影音先锋播放| 五月天激情综合| 精品理论电影在线| 成人国产电影网| 亚洲国产裸拍裸体视频在线观看乱了| 日韩一区二区免费在线电影| 国产成人三级在线观看| 亚洲一区二区视频在线| 久久人人爽人人爽| 欧美午夜不卡视频| 国产精品自拍毛片| 亚洲r级在线视频| 国产色一区二区| 3atv一区二区三区| 成av人片一区二区| 日本不卡一二三区黄网| 国产精品视频yy9299一区| 4hu四虎永久在线影院成人| 成人美女在线观看| 美女视频第一区二区三区免费观看网站| 欧美国产综合色视频| 欧美一区二区私人影院日本| 91小视频免费观看| 狠狠色狠狠色综合| 亚洲国产精品一区二区久久| 国产日韩欧美电影| 日韩一区二区三区视频| 中文字幕一区二区三区乱码在线| 日韩精品专区在线影院观看| 日本精品一区二区三区高清| 国产成人在线网站| 免费视频一区二区| 亚洲va欧美va人人爽| 国产精品福利一区二区三区| 日韩免费高清av| 欧美日韩和欧美的一区二区| aaa国产一区| 国产不卡免费视频| 久久精品国产一区二区三区免费看| 夜夜嗨av一区二区三区网页| 中文成人av在线| 精品国产乱码久久久久久浪潮| 欧美日韩国产在线观看| 91婷婷韩国欧美一区二区| 国产成都精品91一区二区三| 另类综合日韩欧美亚洲| 亚洲国产精品一区二区久久恐怖片| 国产精品久久久久久久久久久免费看 | 久久色中文字幕| 欧美高清www午色夜在线视频| 色综合天天做天天爱| 成人在线视频一区| 国产很黄免费观看久久| 黑人巨大精品欧美一区| 麻豆91在线看| 免费久久99精品国产| 午夜欧美大尺度福利影院在线看| 一区二区日韩电影| 亚洲激情在线激情| 伊人婷婷欧美激情| 一区二区三区在线视频免费观看| 中文字幕亚洲不卡| 最新热久久免费视频| 中文字幕一区日韩精品欧美| 国产精品丝袜91| 欧美国产欧美综合| 国产精品毛片高清在线完整版| 中文一区在线播放| 国产精品欧美一区喷水| 国产1区2区3区精品美女| 国内精品国产三级国产a久久| 经典一区二区三区| 国产在线一区观看| 国产激情视频一区二区在线观看 | 精品久久国产老人久久综合| 日韩欧美不卡一区| 精品久久久久久亚洲综合网 | 国产精品77777竹菊影视小说| 国精产品一区一区三区mba桃花| 蜜桃av一区二区在线观看| 极品瑜伽女神91| 国产酒店精品激情| 成人短视频下载| 一本久久a久久精品亚洲| 91成人在线精品| 欧美日韩久久一区| 日韩一级免费一区| 久久精品一区二区三区不卡牛牛| 中文字幕第一区综合|