99爱在线视频这里只有精品_窝窝午夜看片成人精品_日韩精品久久久毛片一区二区_亚洲一区二区久久

合肥生活安徽新聞合肥交通合肥房產生活服務合肥教育合肥招聘合肥旅游文化藝術合肥美食合肥地圖合肥社保合肥醫院企業服務合肥法律

代做CITS2002、C/C++語言程序代寫
代做CITS2002、C/C++語言程序代寫

時間:2024-10-09  來源:合肥網hfw.cc  作者:hfw.cc 我要糾錯



CITS2002 - Second Project
A simple simulation of virtual memory
• This project is worth 10% of the marks in the unit.
• The project can be done in groups of two.
• The due date of the project is October 17, 11:59 pm.
• The project description is long, but the coding is simple. We will
discuss the project in the workshops on Fridays.
1 A simple simulation of virtual memory
The aim of this project is to simulate a simple virtual memory system using
an array as the RAM of a hypothetical machine. The project will also require
some C programming skills of using structures and pointers.
We have a computer whose RAM is an array of size 16. It is an array
of pointers. There are 8 page frames in the RAM, each consisting of two
contiguous locations in the array. Hence, the page size of this computer is 2.
The virtual memory of this computer is an array of pointers of size **
(We will pretend it is on disc, but actually it is an array in the RAM of
our computer). There are 4 processes in this computer, and each proces can
have 4 pages, and obviously all the pages of all the processes cannot be in
the main memory at the same time. Some pages will be in the main memory
and some pages will be in the virtual memory at any time. The processes are
numbered 0 . . . 3. Each process has a page table, which is an integer array,
entry of a process page table indicates whether the page is in RAM or in the
virtual memory (on disc), k if the page is in RAM (k is the frame number,
between 0 . . . 7), and 99 if the page is in disc (99 cannot be a frame number).
You have to define a structure that will consist of three fields, a process
id, a page number of the process, and the last time this page was accessed
if it is in the RAM. Time in the simulation is not real time, rather a time
step. Time increases in simulation steps, as explained below. The simulation
starts (at time 0) by initializing the virtual memory with all the 4 pages of
each process. You have to do the following steps before the simulation starts:
1• Define a structure whose pointer will be stored in each array location
of the RAM and the virtual memory. The structure may look like this:
struct {
int process_id;
int page_num;
int last_accessed;
} memory;
Initialise the process id and page num with the id of the process (a
number between 0 . . . 3) and a page number of that process (a number
between 0 . . . 3). Initialise all last access to 0.
• Create each page and store pointers in the array for the virtual memory.
 Note that the process id and page num of two consecutive array
locations will be the same since each page occupies two array locations.
The simulation starts by reading a file where there is a single line of
integers separated by blanks, for example:
0 2 1 3 3 2 2 0 2 1 0 2 3 0
Each integer indicates a process id. For example, the first number 0 indicates
 that the next page of process 0 has to be brought in from virtual
memory to the RAM. The process table of process 0 and the RAM have to
be updated accordingly. You can keep the content of the virtual memory
unchanged, as that is how virtual memory systems work. Our processes do
not do any computation, they just request the next page and later may write
a page back to virtual memory. You can assume for simplicity that all the
pages are always in the virtual memory and nothing needs to be written
back, as no page is updated by doing any computation. The last accessed
time of a page will be the time step when you brought the page to RAM.
For example, after reading this file, the first (or 0th page of process 0 will
be brought to RAM), the last accessed time of this page will be 0, as the
simulation starts now and time is 0. Time will increase by 1 for each entry
in the file.
The RAM may become full sometime, you have to use the local Least
Recently Used (LRU) algorithm for evicting a page and bringing a new page.
2local means you have to evict the least recently used page of the same
process for accommodating the new page. If there is no page of the process
whose page you want to bring in, use a global LRU policy, evict the page
that is least recently used among all pages in the RAM.
2 Submission
You have to write a C program in a single file called simulation.c, and
compiled as an executable called simulation. It will read two file names from
the command line, in.txt and out.txt. The first file is the one mentioned
above, for reading process ids. The second file is an output file where you
should print the following information at the end of the simulation. Your
submission will be executed as:
simulation in.txt out.txt
• The page tables of the four processes in separate lines. For example,
the page table for process 0 may look like this:
3, 2, 1, 99
This means there are three pages of process 0 in the RAM, pages 0, 1
and 2, in frames 3, 2 and 1, and page 3 is in the disc.
You have to also print the content of the RAM, each location separated
by a ’;’. For example, the RAM may look like this:
0,0,5; 0,0,5; 2,0,1; 2,0,1; etc. (16 entries)
Note that, the first two locations of the RAM stores page 0 of process
0, as each page occupies two array locations of the RAM. Also, this
page was brought to RAM at time step 5.
Amitava Datta
September 2024


請加QQ:99515681  郵箱:99515681@qq.com   WX:codinghelp








 

掃一掃在手機打開當前頁
  • 上一篇:代做00301J 、Java設計編程代寫
  • 下一篇: 代寫COMP612、代做C++程序設計
  • 無相關信息
    合肥生活資訊

    合肥圖文信息
    2025年10月份更新拼多多改銷助手小象助手多多出評軟件
    2025年10月份更新拼多多改銷助手小象助手多
    有限元分析 CAE仿真分析服務-企業/產品研發/客戶要求/設計優化
    有限元分析 CAE仿真分析服務-企業/產品研發
    急尋熱仿真分析?代做熱仿真服務+熱設計優化
    急尋熱仿真分析?代做熱仿真服務+熱設計優化
    出評 開團工具
    出評 開團工具
    挖掘機濾芯提升發動機性能
    挖掘機濾芯提升發動機性能
    海信羅馬假日洗衣機亮相AWE  復古美學與現代科技完美結合
    海信羅馬假日洗衣機亮相AWE 復古美學與現代
    合肥機場巴士4號線
    合肥機場巴士4號線
    合肥機場巴士3號線
    合肥機場巴士3號線
  • 短信驗證碼 目錄網 排行網

    關于我們 | 打賞支持 | 廣告服務 | 聯系我們 | 網站地圖 | 免責聲明 | 幫助中心 | 友情鏈接 |

    Copyright © 2025 hfw.cc Inc. All Rights Reserved. 合肥網 版權所有
    ICP備06013414號-3 公安備 42010502001045

    99爱在线视频这里只有精品_窝窝午夜看片成人精品_日韩精品久久久毛片一区二区_亚洲一区二区久久

          9000px;">

                亚洲欧美日韩中文字幕一区二区三区 | 欧美探花视频资源| 精品国产亚洲在线| 亚洲123区在线观看| 97se亚洲国产综合自在线| 久久精品一区二区| 美女一区二区三区| 欧美日韩日日摸| 天堂影院一区二区| 日韩视频在线一区二区| 91精品国产欧美一区二区成人| 亚洲一区二区三区四区在线| 欧美在线观看一区| 日本美女视频一区二区| 欧美精品成人一区二区三区四区| 日日摸夜夜添夜夜添亚洲女人| 99在线热播精品免费| 亚洲欧美一区二区三区孕妇| 91在线精品一区二区| 亚洲精品第1页| 欧美浪妇xxxx高跟鞋交| 麻豆精品一区二区综合av| 精品少妇一区二区| 国产乱子伦一区二区三区国色天香| 欧美成人精品1314www| 国产精品一区二区男女羞羞无遮挡| 欧美日韩国产高清一区二区| 日韩影院免费视频| 国产亚洲精品免费| 色综合中文字幕| 日韩电影网1区2区| 国产精品热久久久久夜色精品三区| 粉嫩av一区二区三区在线播放| 中文字幕日韩精品一区| 91精品国产综合久久香蕉的特点| 精品综合免费视频观看| 国产精品国产三级国产aⅴ入口 | 亚洲精品久久久蜜桃| 色综合欧美在线| 麻豆国产91在线播放| 亚洲欧美影音先锋| 日本高清不卡视频| 免费在线观看日韩欧美| 国产精品精品国产色婷婷| 538在线一区二区精品国产| 国产不卡一区视频| 日本欧美一区二区三区乱码| 中文在线免费一区三区高中清不卡| 精品视频1区2区| 99精品久久免费看蜜臀剧情介绍| 国产福利视频一区二区三区| 激情都市一区二区| 午夜精品成人在线| 亚洲精品视频一区| 日韩欧美国产高清| 在线观看国产精品网站| 国产盗摄精品一区二区三区在线 | 国产成人8x视频一区二区 | 99视频有精品| 国产在线播放一区| 亚洲电影一级片| 亚洲桃色在线一区| 欧美激情在线一区二区| 精品久久人人做人人爱| 欧美一区二区三区在线电影| 欧美日韩情趣电影| 精品视频在线免费看| 99国产精品99久久久久久| 国产成人午夜99999| 韩日欧美一区二区三区| 麻豆视频一区二区| 国模套图日韩精品一区二区| 精品无人码麻豆乱码1区2区 | 亚洲 欧美综合在线网络| 亚洲视频1区2区| 亚洲免费观看高清完整版在线观看| 国产精品久久久久久福利一牛影视| 久久久精品日韩欧美| 久久久另类综合| 国产色产综合色产在线视频| 久久久久久久国产精品影院| 久久在线免费观看| 久久欧美一区二区| 国产精品欧美久久久久一区二区| 国产精品麻豆视频| 日本一区二区三区dvd视频在线| 欧美精品一区二区在线播放| www久久久久| 精品福利av导航| 久久婷婷一区二区三区| 国产亚洲一区二区三区| 国产欧美日韩另类一区| 日韩午夜中文字幕| 久久久www成人免费毛片麻豆 | 色婷婷精品久久二区二区蜜臂av| 色婷婷久久久亚洲一区二区三区 | 欧美性色欧美a在线播放| 精品捆绑美女sm三区| 亚洲黄色片在线观看| 国内精品免费**视频| 一本色道久久综合狠狠躁的推荐 | 精品久久久久久亚洲综合网 | 中文字幕中文字幕在线一区 | 国产成都精品91一区二区三| 欧美在线综合视频| 国产精品视频九色porn| 久久成人免费网站| 欧美图片一区二区三区| 日本一区二区三区国色天香| 男男gaygay亚洲| 欧美在线观看一区| 综合色天天鬼久久鬼色| 国产传媒欧美日韩成人| 精品精品欲导航| 丝袜诱惑制服诱惑色一区在线观看| 成人免费视频视频在线观看免费 | 亚洲视频免费观看| 成人小视频在线| 精品欧美一区二区久久| 亚洲成人资源网| 成人黄色在线视频| 久久久不卡网国产精品二区| 免费成人av在线| 欧美区在线观看| 亚洲国产视频一区| 日本韩国一区二区三区视频| 国产精品久久一卡二卡| 成人美女在线观看| 国产日韩欧美不卡在线| 不卡的av中国片| 国产午夜亚洲精品不卡| 国产一区二区三区在线观看免费| 欧美成人一区二区| 日本在线不卡视频| 欧美一区二区三区在线视频| 免费观看久久久4p| 精品国产百合女同互慰| 国产精品888| 国产精品私人影院| 99国产麻豆精品| 亚洲一区二区三区四区五区黄| 99久久99久久精品国产片果冻| 中文字幕免费观看一区| 成人高清免费观看| 一区二区三区在线播放| 在线播放国产精品二区一二区四区| 亚洲午夜精品一区二区三区他趣| 欧美日韩中文字幕一区二区| 日韩av网站在线观看| 欧美videofree性高清杂交| 黑人巨大精品欧美黑白配亚洲| 精品999在线播放| 99这里只有久久精品视频| 亚洲成人在线免费| 国产亚洲人成网站| 在线观看91视频| 久久精品国产精品亚洲综合| 国产亚洲欧美日韩俺去了| 91网站视频在线观看| 日韩电影一二三区| 国产精品毛片a∨一区二区三区| 欧美精品 日韩| 色一情一伦一子一伦一区| 亚洲电影你懂得| 国产欧美精品在线观看| 欧美影片第一页| 韩国女主播成人在线| 亚洲一区二区欧美| 久久久久高清精品| 欧美亚洲综合色| 国产精品中文字幕日韩精品| 日韩一区在线看| 日韩一区二区三区精品视频| 99r国产精品| 国产老肥熟一区二区三区| 亚洲一区二区精品3399| 久久精品日产第一区二区三区高清版| 91在线视频观看| 国模大尺度一区二区三区| 亚洲一级电影视频| 国产精品美女久久久久久久久| 在线播放国产精品二区一二区四区| 国产91丝袜在线18| 日本视频一区二区| 亚洲一区二区三区免费视频| 国产欧美日韩卡一| 精品福利二区三区| 日韩三级视频在线看| 精品污污网站免费看| 91亚洲精品一区二区乱码| 国产剧情一区二区| 蜜桃视频一区二区三区在线观看| 中文字幕佐山爱一区二区免费| 26uuu精品一区二区三区四区在线| 日韩一级大片在线观看| 欧美日韩在线精品一区二区三区激情| 成人精品国产福利| 福利视频网站一区二区三区| 国产一区二区调教| 国产一区二区在线看|