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

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

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

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

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

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

    国产人妻人伦精品_欧美一区二区三区图_亚洲欧洲久久_日韩美女av在线免费观看
    日本精品免费在线观看| 美女av一区二区三区| 久久久久久69| 久久精品国亚洲| 白嫩少妇丰满一区二区 | 亚洲v日韩v综合v精品v| 国产综合18久久久久久| 国产成人久久精品| 国产伦精品一区二区三区照片 | 国产精品嫩草影院久久久| 国产在线观看欧美| 亚洲黄色一区二区三区| 国产精品国产精品| 久久精品成人欧美大片| 国产精品97在线| 国产精品中出一区二区三区 | 亚洲在线色站| 精品少妇人妻av免费久久洗澡| 91九色国产视频| 伊人久久青草| 国产精品-区区久久久狼| 国产精品视频1区| 亚洲一区二区三区香蕉| 亚洲精品无人区| 九色综合日本| 在线不卡视频一区二区| 亚洲在线观看视频| 热久久精品国产| 国产精品男人的天堂| 欧美极品欧美精品欧美| 69av视频在线播放| 久久99精品久久久久久青青日本| 日韩videos| 久久精品久久久久久| 国产精品福利网站| 久99久视频| 精品欧美一区二区在线观看视频 | 国产日产欧美精品| 国产精品一区在线播放| 久久中文字幕视频| 91精品国产91久久久| 国产一区二区在线观看免费播放| 黄页网站大全在线观看| 欧美激情视频网站| 国产一区免费在线| 国产精品一区二区久久国产| 久久av中文字幕| 国产精品aaaa| 污污污污污污www网站免费| 不卡毛片在线看| 国产精品国产精品国产专区蜜臀ah| 日本天堂免费a| 国产精品三级网站| 色视频一区二区三区| 久久久久久国产精品mv| 视频一区亚洲| 国产二区一区| 热门国产精品亚洲第一区在线| 久久久久久久久久久一区| 欧美人与动牲交xxxxbbbb| 精品国产欧美一区二区五十路| 欧美自拍视频在线| 国产精品狠色婷| 成人欧美一区二区三区黑人| 亚洲激情免费视频| 色婷婷久久一区二区| 欧美成人精品欧美一级乱| 中文字幕黄色大片| 精品国产一区二区三区免费| 91成人福利在线| 天天综合狠狠精品| 亚洲在线www| 国产精品人人做人人爽| 国产精品一区在线免费观看| 日日碰狠狠丁香久燥| 亚洲v国产v| 在线观看欧美一区| 97精品一区二区三区| 欧美精品电影在线| 色偷偷av一区二区三区| 日本久久亚洲电影| 亚洲在线视频福利| 69精品小视频| 久久精品欧美视频| 国产精品一区=区| 日本三级久久久| 久久国产精品久久久久| 国产成人av影视| 国外色69视频在线观看| 手机看片福利永久国产日韩| 久热国产精品视频| 国产精国产精品| 免费国产a级片| 日本精品视频在线观看| 亚洲熟妇无码一区二区三区| 久久综合久久八八| 久久久久久久影院| 91久久在线视频| 国产免费一区视频观看免费| 欧美日韩精品免费在线观看视频| 午夜精品蜜臀一区二区三区免费| 色综合久综合久久综合久鬼88| 国产成人精品在线| 国产夫妻自拍一区| 91国在线高清视频| 国产欧美精品一区二区三区介绍| 欧美 日韩 亚洲 一区| 日韩免费观看视频| 亚洲av综合色区| 在线天堂一区av电影| 欧美成人第一页| 国产精品加勒比| 国产精品久久久久久久久久久久久久| 日韩有码在线观看| 久久国产精品免费观看| 久久久精彩视频| 国产成一区二区| 久久精品magnetxturnbtih| 国产成人艳妇aa视频在线| 91成人精品网站| 成人a在线观看| 国产精品一区二区在线观看| 国产日韩在线看片| 国产欧美日韩一区| 国产亚洲情侣一区二区无| 国产综合福利在线| 国产中文字幕亚洲| 国产在线精品91| 国产天堂在线播放| 国产伦精品一区二区三区四区视频 | 亚洲人久久久| 亚洲一区在线免费| 亚洲a∨一区二区三区| 亚洲综合av影视| 亚洲欧美日韩精品综合在线观看| 亚洲一区二区三区精品在线观看| 亚洲欧洲久久| 日本亚洲导航| 欧美中文在线免费| 韩国福利视频一区| 国产日韩在线看| 成人免费在线网址| 久久亚洲午夜电影| 国产成人97精品免费看片| 爽爽爽爽爽爽爽成人免费观看| 久久久国产91| 欧美激情图片区| 亚洲国产成人不卡| 秋霞在线一区二区| 国产综合久久久久| 97久久精品午夜一区二区| 国产成人精品a视频一区www| 久久久精品久久久| 蜜月aⅴ免费一区二区三区| 亚洲高潮无码久久| 欧美专区日韩视频| 国产拍精品一二三| 久久久亚洲精品视频| 色偷偷噜噜噜亚洲男人的天堂| 久久久91精品国产一区不卡| 欧美成人性色生活仑片| 午夜伦理精品一区| 欧美xxxx黑人又粗又长精品| 国产精品制服诱惑| 日韩在线视频二区| 色中色综合影院手机版在线观看| 欧美一区二区三区综合 | 欧美专区第一页| 俄罗斯精品一区二区| 国产成人91久久精品| 超碰91人人草人人干| 宅男一区二区三区| 奇米一区二区三区四区久久| 国产欧美亚洲日本| 久久久久久免费看| 欧美激情伊人电影| 日韩久久久久久久| 国产精品永久免费在线| 久久久久久久免费视频| 久久久久久18| 欧美性视频精品| 91久久精品美女| 国产精品免费看一区二区三区 | 日本毛片在线免费观看| 国产午夜精品一区| 久久av喷吹av高潮av| 色综合五月天导航| 欧美亚洲丝袜| 国产精品69久久| 久久成人av网站| 日韩视频专区| www..com日韩| 国产精品久久久久久婷婷天堂| 少妇人妻无码专区视频| 国产欧美自拍视频| 久久九九有精品国产23| 亚洲高清不卡一区| 国产日韩欧美自拍| 久久久99久久精品女同性| 色综合666|