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

合肥生活安徽新聞合肥交通合肥房產(chǎn)生活服務(wù)合肥教育合肥招聘合肥旅游文化藝術(shù)合肥美食合肥地圖合肥社保合肥醫(yī)院企業(yè)服務(wù)合肥法律

代做CITS2002、C/C++語(yǔ)言程序代寫(xiě)
代做CITS2002、C/C++語(yǔ)言程序代寫(xiě)

時(shí)間:2024-10-09  來(lái)源:合肥網(wǎng)hfw.cc  作者:hfw.cc 我要糾錯(cuò)



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


請(qǐng)加QQ:99515681  郵箱:99515681@qq.com   WX:codinghelp








 

掃一掃在手機(jī)打開(kāi)當(dāng)前頁(yè)
  • 上一篇:代做00301J 、Java設(shè)計(jì)編程代寫(xiě)
  • 下一篇: 代寫(xiě)COMP612、代做C++程序設(shè)計(jì)
  • 無(wú)相關(guān)信息
    合肥生活資訊

    合肥圖文信息
    流體仿真外包多少錢(qián)_專業(yè)CFD分析代做_友商科技CAE仿真
    流體仿真外包多少錢(qián)_專業(yè)CFD分析代做_友商科
    CAE仿真分析代做公司 CFD流體仿真服務(wù) 管路流場(chǎng)仿真外包
    CAE仿真分析代做公司 CFD流體仿真服務(wù) 管路
    流體CFD仿真分析_代做咨詢服務(wù)_Fluent 仿真技術(shù)服務(wù)
    流體CFD仿真分析_代做咨詢服務(wù)_Fluent 仿真
    結(jié)構(gòu)仿真分析服務(wù)_CAE代做咨詢外包_剛強(qiáng)度疲勞振動(dòng)
    結(jié)構(gòu)仿真分析服務(wù)_CAE代做咨詢外包_剛強(qiáng)度疲
    流體cfd仿真分析服務(wù) 7類仿真分析代做服務(wù)40個(gè)行業(yè)
    流體cfd仿真分析服務(wù) 7類仿真分析代做服務(wù)4
    超全面的拼多多電商運(yùn)營(yíng)技巧,多多開(kāi)團(tuán)助手,多多出評(píng)軟件徽y1698861
    超全面的拼多多電商運(yùn)營(yíng)技巧,多多開(kāi)團(tuán)助手
    CAE有限元仿真分析團(tuán)隊(duì),2026仿真代做咨詢服務(wù)平臺(tái)
    CAE有限元仿真分析團(tuán)隊(duì),2026仿真代做咨詢服
    釘釘簽到打卡位置修改神器,2026怎么修改定位在范圍內(nèi)
    釘釘簽到打卡位置修改神器,2026怎么修改定
  • 短信驗(yàn)證碼 豆包網(wǎng)頁(yè)版入口 破天一劍 目錄網(wǎng) 排行網(wǎng)

    關(guān)于我們 | 打賞支持 | 廣告服務(wù) | 聯(lián)系我們 | 網(wǎng)站地圖 | 免責(zé)聲明 | 幫助中心 | 友情鏈接 |

    Copyright © 2025 hfw.cc Inc. All Rights Reserved. 合肥網(wǎng) 版權(quán)所有
    ICP備06013414號(hào)-3 公安備 42010502001045

    国产人妻人伦精品_欧美一区二区三区图_亚洲欧洲久久_日韩美女av在线免费观看
    欧美一级视频免费在线观看| 国产精品久久一| 国内自拍中文字幕| 欧美性受xxxx黑人猛交| 日本不卡一二三区| 日韩欧美亚洲日产国产| 人偷久久久久久久偷女厕| 日韩精品一区二区三区四区五区| 日韩手机在线观看视频| 人禽交欧美网站免费| 青青草成人在线| 极品日韩久久| 国产欧美在线一区二区| 国产精品一区二区三区久久| 操人视频欧美| 国产日韩欧美大片| 99视频在线免费| 久久久久久草| 日韩在线精品视频| 国产精品久久av| 中文字幕欧美日韩一区二区| 亚洲精品欧美一区二区三区| 日韩五码在线观看| 蜜桃视频在线观看91| 国产午夜精品视频一区二区三区| 风间由美久久久| 国产成人91久久精品| 国产精品网站免费| 自拍日韩亚洲一区在线| 一本久道久久综合| 亚洲va欧美va国产综合久久| 欧洲成人一区二区| 国产久一一精品| 色琪琪综合男人的天堂aⅴ视频| 国产精品久久久久免费a∨大胸| 欧美精品www在线观看| 熟妇人妻va精品中文字幕| 日韩暖暖在线视频| 国产一区二区三区小说| 91精品久久久久久久久久| 久久久极品av| 亚州欧美日韩中文视频| 激情视频综合网| 91国产精品电影| 国产精品久久婷婷六月丁香| 欧美成人精品一区二区三区| 亚洲在线视频福利| 女女同性女同一区二区三区91| 99精品视频在线看| 国产精品精品久久久| 日日摸日日碰夜夜爽av| 国产伦精品一区二区三区照片91| 久久久久久久久久av| 亚洲制服欧美久久| 国产在线精品二区| 国产成人精品一区二区三区| 亚洲一区二区三区免费观看| 国内视频一区二区| 久久久久久久国产| 午夜精品免费视频| 精品一区二区日本| 色偷偷91综合久久噜噜| 亚洲综合小说区| 国产日韩在线看片| 日韩视频亚洲视频| 日韩精品久久一区二区| 99久久激情视频| 欧美激情综合色| 国产一级二级三级精品| 日韩中文综合网| 欧美一级片一区| 成人h在线播放| 国产aaa精品| 国产天堂在线播放| 久久综合网hezyo| 日韩毛片在线免费看| 国产精品99一区| 亚洲精品免费网站| 99久久精品免费看国产四区| 欧美激情视频网站| 国产免费内射又粗又爽密桃视频 | 国产精品视频资源| 欧洲一区二区在线| 国产高清在线一区二区| 亚洲国产一区二区精品视频| www国产精品内射老熟女| 一区二区三区四区免费视频| 免费看a级黄色片| 国产精品美女诱惑| 狠狠噜天天噜日日噜| 国产精品久久久久久久久久小说| 欧美在线视频观看免费网站| 九一免费在线观看| 日韩精品一区二区三区电影| 久久久久久久久久久网站| 日本国产欧美一区二区三区| 久久久久久久久影视| 青青草视频国产| 国产精品视频男人的天堂| 欧美日韩精品不卡| 国产精品国产三级国产专播精品人| 国内精品视频一区二区三区| 日韩中文字幕在线播放| 欧美精品久久久久久久自慰| 国产精品久久久久久久久久新婚| 精品一区二区国产| 国产av第一区| 91高清免费在线观看| 日本一区二区三区在线视频| 久久久久久久97| 免费在线观看日韩视频| 精品国产一区二区三区麻豆免费观看完整版 | 久久福利视频网| 国产精品一区二区三区观看| 欧美激情第6页| 久久综合伊人77777麻豆| 日韩中文在线字幕| 久久久久久久久久av| 国产资源在线免费观看| 操人视频在线观看欧美| 国产视频一区二区三区四区| 精品国产一区二区三区四区精华| 国产精品永久入口久久久| 亚洲最大成人网色| 久久国产精品高清| 美女被啪啪一区二区| 国产精品久久久久久久久久99| 国产日本在线播放| 婷婷久久五月天| 国产精品视频导航| 国产精品影院在线观看| 精品国产一区二区三区日日嗨| 91免费国产网站| 日韩福利在线| 国产精品福利在线观看网址| 国产毛片久久久久久国产毛片| 夜夜爽www精品| 精品国内自产拍在线观看| 国产精品亚洲一区| 欧美久久久久久一卡四| 中文字幕在线亚洲三区| 国产成人精品综合久久久| 高清国语自产拍免费一区二区三区| 日韩一级免费在线观看| 欧美成人一区二区三区电影| 国产精品com| 国产日韩欧美精品| 污视频在线免费观看一区二区三区| 国产成人精品一区二区| 成人毛片网站| 亚洲国产一区二区在线| 国产成人午夜视频网址| 91精品国产免费久久久久久| 狠狠色噜噜狠狠狠狠色吗综合| 亚洲综合激情五月| 久久精品91久久久久久再现| 国产伦精品一区二区三区高清| 亚洲va韩国va欧美va精四季| 国产精品国语对白| 久久久亚洲精品无码| 毛葺葺老太做受视频| 欧美最猛黑人xxxx黑人猛叫黄| 欧美激情在线一区| 久久综合久久美利坚合众国| 日韩中文字幕视频在线| 免费国产成人av| 日本免费高清一区二区| 中文字幕精品—区二区日日骚| 久久精品国产亚洲精品2020| 91精品国产91久久久久久吃药 | 日韩精品不卡| 亚州精品天堂中文字幕| 国产精品久久久久久久久久尿 | 波多野结衣精品久久| 欧美成ee人免费视频| 日韩一二三区不卡在线视频| 亚洲国产精品久久久久久女王| 国产精品免费看一区二区三区| 亚洲一区亚洲二区亚洲三区| 欧美中在线观看| 91成人国产在线观看| 久久久www成人免费精品| www.日本在线视频| 日韩视频第二页| 三区精品视频| 亚洲精品在线免费看| 一级特黄妇女高潮| 国产精品爽爽ⅴa在线观看| 日韩一区二区久久久| 久久久久中文字幕2018| 久久精品丝袜高跟鞋| 国产成人精品久久| 久久国产精品网| 久久久国产影院| 国产精品美女在线观看| 丝袜美腿精品国产二区| 菠萝蜜影院一区二区免费| 久久视频在线看| 国产精品久久二区| 欧美激情xxxx性bbbb|