加勒比久久综合,国产精品伦一区二区,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

    日本午夜精品久久久久| 激情视频一区二区三区| 成人免费一区| 99国产精品| av动漫精品一区二区| 日韩精品成人一区二区三区| 丝袜美腿亚洲综合| 色婷婷综合久久久久久| 国产欧美日韩视频在线| 亚洲精品777| 石原莉奈在线亚洲三区| 久久精品动漫| 日韩中出av| 一区二区三区四区五区在线| 四虎国产精品永久在线国在线| 久久亚洲精品中文字幕蜜潮电影| 国际精品欧美精品| 亚洲国产一区二区久久| 亚洲欧美日本视频在线观看| 99精品在线免费在线观看| 午夜精品福利影院| 青娱乐精品在线视频| 欧美三级网站| 一本色道久久综合一区| 久久国产毛片| 日韩在线观看一区二区三区| 国产成人免费av一区二区午夜| 日本精品久久| 日韩欧美自拍| 蜜臀久久久99精品久久久久久| 婷婷激情图片久久| 99久久综合| 国产伦理久久久久久妇女| 久久综合欧美| 日韩高清欧美激情| 福利一区和二区| 中文字幕高清在线播放| 久久国产精品毛片| 女人色偷偷aa久久天堂| 天天操综合520| 精品99在线| 青草伊人久久| 国产va免费精品观看精品视频 | 久久69成人| 巨胸喷奶水www久久久| 欧美gvvideo网站| 天堂成人国产精品一区| 国产婷婷精品| 伊人久久大香线蕉av超碰演员| 欧美高清日韩| 在线国产一区| 日韩视频精品在线观看| 好看的日韩av电影| 一本色道久久| 亚洲在线播放| 久久久久久久高潮| 伊人久久噜噜噜躁狠狠躁| 久久久久久久久久久久电影| 亚洲理论电影| 亚洲警察之高压线| 亚洲人成亚洲精品| 日本精品在线观看| 88久久精品| 日韩av不卡在线观看| 亚洲欧美久久| 免费成人小视频| 国模套图日韩精品一区二区| 香蕉成人av| 国产原创一区| 亚洲理论在线| 精品一区二区三区中文字幕在线| 亚洲狼人在线| 日韩电影免费一区| 激情小说亚洲图片| 亚洲欧美一区在线| 国产日韩综合| 成人福利视频| 国产日韩欧美高清免费| 亚洲精品护士| 午夜日韩影院| 亚洲一级高清| 三级欧美在线一区| 色老太综合网| 国产精品成人一区二区网站软件| 国产亚洲一区二区三区啪| 午夜视频一区二区在线观看 | 久久久久国产精品一区三寸| 欧美日韩国产综合网| 蜜桃91丨九色丨蝌蚪91桃色| www.一区| 国产欧美日韩一区二区三区四区 | 亚洲激情播播| 久久国产免费| 免费在线一区观看| 成人午夜一级| 亚洲国产最新| 一本久久青青| 国产精品久久久久久影院8一贰佰| 欧美日韩视频免费看| 99精品女人在线观看免费视频| 国产精品一线| 国产精品丝袜xxxxxxx| 视频一区在线免费看| 亚洲日本免费| 91免费精品国偷自产在线在线| 欧美~级网站不卡| 九色porny自拍视频在线播放| 日日摸夜夜添夜夜添精品视频| 日韩av二区在线播放| 一级欧洲+日本+国产| 男人久久天堂| 国产在线观看91一区二区三区| 久久一本综合| 日韩伦理视频| 日韩av网站在线观看| 亚洲精品555| 欧美亚洲一区二区三区| 日韩精品三级| 亚洲欧美久久久| 青青国产91久久久久久 | 亚洲a在线视频| 久草在线资源福利站| 国产精品久久久久久av公交车| 久久久久久美女精品| 亚洲天堂免费电影| 国产一区二区观看| 午夜精品影院| 国产日韩欧美三级| 精品视频免费| 欧美一区久久久| 精品国产一区二区三区性色av| 伊人久久综合| 国产精品红桃| 天天射天天综合网| 免费视频一区| 久久久久久黄| 国产毛片精品久久| 超碰精品在线观看| 中国色在线日|韩| 日韩av一区二区三区| 午夜宅男久久久| 91精品国产自产观看在线| 亚洲成人一区| 日本欧美大码aⅴ在线播放| 人人香蕉久久| 久久激情五月激情| 久久久久99| 欧美黄色成人| 欧美先锋资源| 影音先锋久久精品| 天天射成人网| 中文字幕日韩亚洲| 玖玖在线精品| 日韩电影免费在线观看网站| 国产精品黑丝在线播放| 日韩av在线发布| 日韩毛片视频| 久久久精品网| 日韩精品成人一区二区三区 | 亚洲国产综合在线看不卡| 欧美伊人久久| 菠萝蜜一区二区| 欧美日本国产| 日本大胆欧美人术艺术动态| 日韩电影在线免费看| 亚洲三级欧美| 色吊丝一区二区| 另类综合日韩欧美亚洲| 日韩一级免费| 日韩视频一区二区三区四区| 日韩激情免费| 黑人操亚洲人| 国产精品美女久久久久久不卡| 91久久夜色精品国产按摩| 亚洲福利合集| 久久在线91| 免费日韩一区二区| 亚洲国产视频二区| 欧美在线免费| 久久高清国产| 欧美视频四区| 麻豆一区二区三| 免费观看在线综合| 精品少妇av| 99久久99九九99九九九| 亚洲一区二区三区四区电影| 亚洲综合在线电影| 国产suv精品一区| 国产精品大片| 日韩理论电影大全| 亚洲欧美亚洲| 日韩精品一区国产| 日本成人在线不卡视频| 97在线精品| 一本一道久久综合狠狠老| 日本亚洲不卡| 国内精品久久久久久久97牛牛 | 亚洲欧美日本国产专区一区| 亚洲日本va中文字幕| 日本不卡不码高清免费观看 |