国产人妻人伦精品_欧美一区二区三区图_亚洲欧洲久久_日韩美女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在线免费观看
    国产精品久久久久久亚洲影视| 国产成人精品免费看在线播放| 麻豆亚洲一区| 久久久水蜜桃| 欧美成人一区二区三区电影| 日韩av在线播放不卡| 国产精品午夜国产小视频| 久久久久久久久影视| 国产成人啪精品视频免费网| 亚洲欧美日韩不卡一区二区三区 | 亚洲资源在线看| 奇米888一区二区三区| 99一区二区三区| 久久夜色精品国产欧美乱| 热99久久精品| 国产成人精品视频ⅴa片软件竹菊| 国产精品福利在线观看网址| 欧美日韩爱爱视频| 欧美日本亚洲| 色婷婷久久av| 日本视频一区二区不卡| 成人国产精品一区| 精品国产三级a∨在线| 欧美日产一区二区三区在线观看| 91国产美女在线观看| 一区二区视频在线观看| 欧美激情视频一区二区三区| 91精品国产综合久久久久久久久 | 成人免费淫片aa视频免费| 国产精品久久久久影院日本| 亚洲一区精品视频| 福利精品视频| 九九热这里只有精品免费看| 国模吧一区二区三区| 国产精品久久久亚洲| 欧美韩国日本精品一区二区三区| 日韩中文字幕在线视频播放 | 日韩免费在线视频| 久久婷婷人人澡人人喊人人爽| 亚洲欧美日韩不卡一区二区三区| 成人av资源在线播放| 一区二区在线中文字幕电影视频| 狠狠精品干练久久久无码中文字幕| 国产福利视频一区二区| 亚洲一区二区三区在线视频| 成年丰满熟妇午夜免费视频| 亚洲一区二区三区四区中文| 69**夜色精品国产69乱| 亚洲午夜精品久久| 91精品视频播放| 无码内射中文字幕岛国片| 91精品国产乱码久久久久久蜜臀| 亚洲国产精品毛片| 久久久亚洲天堂| 春色成人在线视频| 久久精品五月婷婷| 欧美日韩一道本| 国产精品美乳一区二区免费| 激情综合网婷婷| 国产精品国产三级国产aⅴ9色| 国产男女猛烈无遮挡91| 尤物一区二区三区| 国产精彩视频一区二区| 日韩av电影中文字幕| 久久久久久久久久婷婷| 黄色一级一级片| 精品久久蜜桃| 2019日韩中文字幕mv| 欧美一区深夜视频| 久久91亚洲精品中文字幕| 91久久久久久久久久| 性亚洲最疯狂xxxx高清| 久久久久久久久久久久av| 欧美日韩在线高清| 精品国产区在线| 久久久天堂国产精品| 亚洲一区不卡在线| 久久久久日韩精品久久久男男| 欧美久久久久久一卡四| 欧美激情综合色综合啪啪五月| 久久久免费在线观看| 黄色99视频| 亚洲一区二区三区免费观看| 国产夫妻自拍一区| 蜜桃在线一区二区三区精品| 亚洲一区二区久久久久久久| 国产h视频在线播放| 国产婷婷一区二区三区| 又粗又黑又大的吊av| 久久久久免费视频| 国产日韩欧美中文| 视频一区不卡| 久久这里只有精品视频首页| 99在线影院| 青青草久久网络| 精品久久久久久无码国产 | 久久国产精品免费视频| 国产高清免费在线| 国产欧美精品在线播放| 无码aⅴ精品一区二区三区浪潮| 久久精品国产69国产精品亚洲 | 精品少妇一区二区三区在线| 日产精品高清视频免费| 一区二区视频在线观看| 欧美成在线视频| 国产精品人人做人人爽| 国产成人精品av| 国产精品91久久久| 91精品国产高清| www.中文字幕在线| 国产精品一区二区免费看| 国产一区一区三区| 国内久久久精品| 欧美一二三视频| 欧美一区二区综合| 欧美日韩免费观看一区| 久久伊人精品视频| 欧美成人中文字幕| 欧美日韩第一页| 久久99久久99精品中文字幕| 精品不卡在线| 制服诱惑一区| 中文字幕一区二区三区在线乱码| 宅男一区二区三区| 亚洲区成人777777精品| 一区二区不卡在线观看 | 国内精品久久影院| 欧美日韩一区综合| 欧美 日韩 国产 高清| 国内成人精品一区| 欧美成人中文字幕在线| 一区二区视频在线播放| 亚洲综合在线播放| 亚洲精品一品区二品区三品区| 亚洲国产一区二区三区在线播| 性色av香蕉一区二区| 日韩国产一级片| 欧美不卡三区| 国产日韩一区二区三区| 成人免费毛片在线观看| 91精品国产高清久久久久久久久| 久久这里只有精品8| 久久一区免费| 国产成人精品视频免费看| 国产精品三级在线| 国产精品第1页| 亚洲午夜精品久久久久久人妖| 午夜精品久久久久久久99热浪潮| 日本免费一级视频| 欧美日韩成人一区二区三区| 国产一区二区三区播放| www国产黄色| 久久久久久久久久久99| 国产精品成人播放| 亚洲a中文字幕| 欧美综合在线播放| 国产免费一区二区三区四在线播放| 国产精品香蕉国产| 久久久久久综合网天天| 欧美精品在线视频观看| 日韩一级特黄毛片| 欧美 国产 精品| 97精品视频在线| 国产成人久久久| 久久久久久18| 日韩久久一级片| 国产日韩专区在线| 久久综合久久久| 国产精品成久久久久三级| 亚洲一区二区三区香蕉| 人妻熟女一二三区夜夜爱 | 日韩中文字幕免费视频| 久久福利网址导航| 欧美一区二区福利| 国产综合在线观看视频| 91福利视频网| 国产精品成人一区| 日批视频在线免费看| 国产自产在线视频| 国产成人精品国内自产拍免费看| 国产精品免费看久久久无码| 亚洲精品人成| 国产在线青青草| 国产超级av在线| 精品国产乱码久久久久久88av| 日本不卡免费新一二三区| 成人久久18免费网站漫画| 国产精品沙发午睡系列| 色噜噜色狠狠狠狠狠综合色一| 国产日韩欧美中文| 久久久国产91| 偷拍盗摄高潮叫床对白清晰| 精品一区久久久久久| 久久久久久久久久久久久国产精品 | 久久久久久久久久久久久国产 | 日韩一级免费在线观看| 91久久精品美女高潮| 欧美成人精品在线播放| 青春草国产视频| 久久久亚洲影院你懂的|