国产人妻人伦精品_欧美一区二区三区图_亚洲欧洲久久_日韩美女av在线免费观看

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

代做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++程序設計
  • 無相關信息
    合肥生活資訊

    合肥圖文信息
    流體仿真外包多少錢_專業CFD分析代做_友商科技CAE仿真
    流體仿真外包多少錢_專業CFD分析代做_友商科
    CAE仿真分析代做公司 CFD流體仿真服務 管路流場仿真外包
    CAE仿真分析代做公司 CFD流體仿真服務 管路
    流體CFD仿真分析_代做咨詢服務_Fluent 仿真技術服務
    流體CFD仿真分析_代做咨詢服務_Fluent 仿真
    結構仿真分析服務_CAE代做咨詢外包_剛強度疲勞振動
    結構仿真分析服務_CAE代做咨詢外包_剛強度疲
    流體cfd仿真分析服務 7類仿真分析代做服務40個行業
    流體cfd仿真分析服務 7類仿真分析代做服務4
    超全面的拼多多電商運營技巧,多多開團助手,多多出評軟件徽y1698861
    超全面的拼多多電商運營技巧,多多開團助手
    CAE有限元仿真分析團隊,2026仿真代做咨詢服務平臺
    CAE有限元仿真分析團隊,2026仿真代做咨詢服
    釘釘簽到打卡位置修改神器,2026怎么修改定位在范圍內
    釘釘簽到打卡位置修改神器,2026怎么修改定
  • 短信驗證碼 寵物飼養 十大衛浴品牌排行 suno 豆包網頁版入口 wps 目錄網 排行網

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

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

    国产人妻人伦精品_欧美一区二区三区图_亚洲欧洲久久_日韩美女av在线免费观看
    久久手机视频| 国产精品一区二区你懂得| 久久久久久免费看| 91九色国产社区在线观看| 国产精品一区在线播放| 国产精品自拍合集| 成人免费福利视频| 国产免费一区二区三区视频| 精品欧美一区免费观看α√| 欧美精品一区二区三区在线四季| 亚洲7777| 国产美女扒开尿口久久久| 欧美精品日韩三级| 99热成人精品热久久66| 91美女片黄在线观看游戏| 国产精品91久久| 深夜福利一区二区| 国产精品麻豆va在线播放| 国产精品第二页| 国产精品国产亚洲伊人久久| 精品国产一区二区三区四区精华 | 色噜噜狠狠一区二区三区| 日韩在线一级片| 日韩精品xxxx| 秋霞在线一区二区| 黄色网在线视频| 国产三区精品| 99视频免费观看| 国产第一区电影| 国产成人精品一区二区三区福利 | 国产精品第2页| 欧美日韩国产成人| 亚洲视频电影| 日韩少妇中文字幕| 欧美日韩激情视频在线观看| 黄色污污在线观看| 成人动漫在线视频| 日韩在线视频国产| 久久电影一区二区| 婷婷久久伊人| 黄色片网址在线观看| 99视频精品免费| 久久久久久久久一区| 久久综合久久八八| 日韩在线国产| 国内精品久久久久久中文字幕| 国产伦精品一区二区三区视频免费 | 日本一区二区三区四区高清视频| 欧美亚洲丝袜| 97国产精品视频| 国产精品久久久久久久久免费| 亚洲午夜精品福利| 欧美在线免费视频| www.日本少妇| 国产精品美女久久久久久免费| 亚洲午夜久久久影院伊人| 日韩精品不卡| 日韩免费av一区二区| 麻豆av免费在线| 国产一区二区中文字幕免费看| 99热在线国产| 国产精品久久久久91| 日本一区二区三区视频免费看 | 国产福利久久| 欧美日韩成人在线观看| 欧洲成人一区二区| 久久久亚洲综合网站| 国产精品第12页| 日本精品久久久久久久久久| www..com日韩| 日本亚洲欧洲精品| 欧美精品久久久| 国内精品久久久久| 久久av免费一区| 亚洲视频精品一区| 国产女人18毛片| 国产精品视频一| 日本一本中文字幕| 国产毛片视频网站| 国内精品400部情侣激情| 麻豆中文字幕在线观看| 久久久久久九九九九| 亚洲va码欧洲m码| 成人国产精品一区| 欧美另类99xxxxx| 欧美亚洲日本黄色| 国产成人亚洲综合无码| 亚洲国产精品综合| 99精品视频在线看| 亚洲一区二区中文字幕| 成人在线观看a| 欧美久久久精品| 精品欧美国产| 国产精品日韩在线播放| 日韩欧美一区二区在线观看| 国产精品96久久久久久| 亚洲精品自在在线观看| 高清国语自产拍免费一区二区三区 | 国产免费色视频| 久久精品99久久久香蕉| 日韩手机在线观看视频| 久久大片网站| 日本久久久网站| 久久久久久欧美精品色一二三四| 日韩av免费看网站| 日韩在线欧美在线| 欧美精品成人网| 国产精品久久久久91| 国产在线不卡精品| 在线亚洲美日韩| 91久久久亚洲精品| 色婷婷精品国产一区二区三区| 国产成人亚洲综合无码| 欧美国产综合在线| 久久精视频免费在线久久完整在线看| 欧洲日本亚洲国产区| 久久精品视频中文字幕| 国产一区欧美二区三区| 亚洲精品欧美日韩专区| 日韩在线视频播放| 精品少妇人欧美激情在线观看 | av免费观看网| 欧美一级特黄aaaaaa在线看片| 日韩专区中文字幕| 国产无套粉嫩白浆内谢的出处| 美日韩精品视频免费看| 91精品久久久久久久久久另类| 日本国产一区二区三区| 国产精品久在线观看| 97久久伊人激情网| 欧美亚洲国产日本| 一级一片免费播放| y97精品国产97久久久久久| 国产亚洲欧美在线视频| 日本一区高清不卡| 超在线视频97| 国产成人精品免费看在线播放| 狠狠久久综合婷婷不卡| 久久69精品久久久久久久电影好| 久久人妻无码一区二区| 欧洲一区二区在线| 国产99久久精品一区二区 夜夜躁日日躁 | 欧美中日韩在线| 亚洲图片都市激情| 久久最新资源网| 国产精品一区二区三| 青青草影院在线观看| 国产精品国产对白熟妇| 91精品综合久久久久久五月天| 奇米一区二区三区四区久久| 久久久久久国产| 色噜噜亚洲精品中文字幕| 国产内射老熟女aaaa| 热久久这里只有| 亚洲国产精品一区二区第四页av| 久久精品色欧美aⅴ一区二区| 91九色精品视频| 国产一区不卡在线观看| 日本一区视频在线观看| 在线视频一二三区| 国产精品区一区二区三含羞草| 91国产一区在线| 精品视频第一区| 日av在线播放中文不卡| 亚洲va欧美va在线观看| 欧美成人精品在线观看| 日韩在线播放视频| 91精品国产网站| 国产伦理一区二区三区| 激情伦成人综合小说| 奇米一区二区三区四区久久| 亚洲精品9999| 宅男av一区二区三区| 久久伊人精品一区二区三区| 色老头一区二区三区在线观看| 国产成人永久免费视频| 99视频网站| 国产欧美韩国高清| 国精产品一区一区三区有限在线| 欧美牲交a欧美牲交aⅴ免费真| 日本一区精品| 日韩中文字幕一区| 五月天婷亚洲天综合网鲁鲁鲁| 在线视频福利一区| 久久99视频免费| 精品中文字幕乱| 国产精品夫妻激情| 国产精品久久久久久av下载红粉| 啊v视频在线一区二区三区| 国产成人综合精品| 久久人人爽人人爽人人av | 不卡一区二区三区视频| 国产日韩精品在线观看| 国产在线播放91| 国产精品美女久久久久av福利| 亚洲 自拍 另类小说综合图区| 亚洲在线视频一区二区| 亚洲一区美女视频在线观看免费| 在线不卡日本| 亚洲在线一区二区|