加勒比久久综合,国产精品伦一区二区,66精品视频在线观看,一区二区电影

合肥生活安徽新聞合肥交通合肥房產(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)信息
    合肥生活資訊

    合肥圖文信息
    2025年10月份更新拼多多改銷助手小象助手多多出評(píng)軟件
    2025年10月份更新拼多多改銷助手小象助手多
    有限元分析 CAE仿真分析服務(wù)-企業(yè)/產(chǎn)品研發(fā)/客戶要求/設(shè)計(jì)優(yōu)化
    有限元分析 CAE仿真分析服務(wù)-企業(yè)/產(chǎn)品研發(fā)
    急尋熱仿真分析?代做熱仿真服務(wù)+熱設(shè)計(jì)優(yōu)化
    急尋熱仿真分析?代做熱仿真服務(wù)+熱設(shè)計(jì)優(yōu)化
    出評(píng) 開(kāi)團(tuán)工具
    出評(píng) 開(kāi)團(tuán)工具
    挖掘機(jī)濾芯提升發(fā)動(dòng)機(jī)性能
    挖掘機(jī)濾芯提升發(fā)動(dòng)機(jī)性能
    海信羅馬假日洗衣機(jī)亮相AWE  復(fù)古美學(xué)與現(xiàn)代科技完美結(jié)合
    海信羅馬假日洗衣機(jī)亮相AWE 復(fù)古美學(xué)與現(xiàn)代
    合肥機(jī)場(chǎng)巴士4號(hào)線
    合肥機(jī)場(chǎng)巴士4號(hào)線
    合肥機(jī)場(chǎng)巴士3號(hào)線
    合肥機(jī)場(chǎng)巴士3號(hào)線
  • 短信驗(yàn)證碼 目錄網(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

    不卡专区在线| 欧美久久精品| 天天免费亚洲黑人免费| 国产在线欧美| 日本最新不卡在线| 久久久国产精品网站| 午夜在线播放视频欧美| 日韩精品水蜜桃| 国内精品久久久久久久影视简单 | 首页亚洲欧美制服丝腿| 精品国产中文字幕第一页 | 青青草97国产精品免费观看| 噜噜噜在线观看免费视频日韩 | 亚洲福利一区| 亚洲视频国产精品| 亚洲色图国产| 日韩一区二区三区四区五区| 免费精品视频最新在线| 激情国产一区| 精品视频久久| 亚洲欧美校园春色| 亚洲另类黄色| 国产福利亚洲| 最近高清中文在线字幕在线观看1| 91精品动漫在线观看| 一区二区三区四区视频免费观看| 中文字幕一区二区三区在线视频| 日韩毛片一区| 国产精品久久天天影视| 99成人免费视频| 久久中文字幕av一区二区不卡| 中文久久电影小说| 日本中文字幕在线一区| 成人精品在线| 97久久精品一区二区三区的观看方式 | 国产精品二区影院| 国产欧美自拍| 高清av一区二区三区| 97精品国产| 色琪琪久久se色| 热久久一区二区| 夜夜嗨一区二区| 午夜国产欧美理论在线播放| 欧美日韩在线观看视频小说| 精品伊人久久久| 欧美日韩一本| 久久久成人网| 日韩精品四区| 欧美三级午夜理伦三级在线观看| 欧美2区3区4区| 深夜福利一区| 国产精品网址| 久久99国产精品久久99大师| 欧美有码在线| 日韩精品欧美激情一区二区| 免费看久久久| 欧美大片一区| jlzzjlzz亚洲女人| 夜夜嗨一区二区三区| 99视频+国产日韩欧美| 亚洲免费婷婷| 色婷婷一区二区三区| 亚洲插插视频| 国产欧美在线观看免费| 久久精品一本| 一区二区电影| 日韩av电影一区| 超碰成人在线观看| 四虎影视精品| 亚洲国产一区二区三区在线播放 | 日韩av二区| 日韩欧美国产精品综合嫩v| 日韩中文影院| 日本中文一区二区三区| 91成人精品观看| 亚洲人成网www| 成人看片黄a免费看视频| 99久久精品费精品国产| 99国产精品私拍| 免费一级片91| avav成人| 欧美黄色aaaa| 亚洲视频国产| 婷婷综合视频| sm久久捆绑调教精品一区| 日本在线精品| 一区在线不卡| 国产福利一区二区精品秒拍| 国产精品av久久久久久麻豆网| 狠狠爱www人成狠狠爱综合网 | 亚洲成人最新网站| 亚洲激情另类| 亚洲第一av| 欧美日韩一区二区高清| 午夜日韩影院| 欧美精品九九| 欧美日韩免费看片| 亚洲久久视频| 一区二区三区视频播放| 91成人看片| 交100部在线观看| 成人久久精品| 91精品国产成人观看| 老司机久久99久久精品播放免费| 欧美aaa大片视频一二区| 欧美黄色aaaa| 青青草91久久久久久久久| 一本久道综合久久精品| 天堂在线中文网官网| 欧美日韩亚洲国产精品| 一区视频网站| 亚洲激情社区| 成人国产精品| 一区二区三区自拍视频| 亚洲一区黄色| 久久激情五月激情| 911精品国产| 午夜综合激情| 日本欧美久久久久免费播放网| 99re91这里只有精品| 日韩精品一二三四| 中文字幕日韩欧美精品高清在线| 欧美日韩导航| 日韩欧美一区免费| 欧美日本成人| 亚洲尤物在线| 久久丝袜视频| 制服丝袜日韩| 四虎国产精品免费久久| 91欧美极品| 亚洲欧洲自拍| 日本天堂一区| 蜜臀av性久久久久av蜜臀妖精| 国产精品大片免费观看| 欧美成人亚洲| 亚洲国产黄色| 亚洲国产一区二区三区在线播放 | 日本精品另类| 99久久人爽人人添人人澡| 国产精品久久占久久| 欧洲精品99毛片免费高清观看| 亚洲黄色影片| 久久悠悠精品综合网| 免费成人网www| 日韩精品电影在线观看| 99热国内精品| 久久国内精品| 国产在线日韩| 另类中文字幕网| 欧美午夜a级限制福利片| 麻豆极品一区二区三区| 自拍欧美一区| 影音先锋一区| 99伊人成综合| 亚洲黄色录像| 国产精品论坛| 亚洲免费一区三区| 蜜桃精品在线| 久久一区二区三区喷水| 久久资源在线| 黄色av一区| 国产探花一区二区| 欧美残忍xxxx极端| 99香蕉久久| 日韩欧乱色一区二区三区在线| 欧美日韩水蜜桃| 综合久久十次| 成人一级福利| 美女视频免费精品| 麻豆中文一区二区| 母乳一区在线观看| 午夜视频在线观看精品中文| 精品捆绑调教一区二区三区| 久久精品国产68国产精品亚洲| 日本免费新一区视频| 男女精品网站| 亚洲小说春色综合另类电影| 99riav视频一区二区| 天天色天天射综合网| 亚洲va久久| 中文字幕日本一区二区| 精品一区在线| 精品久久久久久久久久岛国gif| 欧美片第1页| 狠狠综合久久av一区二区老牛| 国产精品一区二区av交换| 日韩欧美三级| 99国产精品| 亚洲精品a区| 日本成人在线电影网| 免费黄网站欧美| 久久久久国产一区二区| 国产aa精品| 国产 日韩 欧美一区| 亚洲精品久久久| av日韩在线播放| 国产精品视频一区二区三区综合| 日韩一区三区| 午夜在线精品偷拍| 久久精品国产亚洲blacked|