教学文库网 - 权威文档分享云平台
您的当前位置:首页 > 精品文档 > 学前教育 >

山大操作系统课程设计报告(全套)(15)

来源:网络收集 时间:2026-05-20
导读: Read Size 128 Read Size 128 Read Size 64 END OF LOADING CODE PAGES Load initial data into the main memory! Load initial data into the virtual memory! Reading buffer= END OF LOADING INITIAL DATA PAGES

Read Size 128 Read Size 128 Read Size 64

END OF LOADING CODE PAGES

Load initial data into the main memory!

Load initial data into the virtual memory! Reading buffer=

END OF LOADING INITIAL DATA PAGES

Page table dump: 28 pages in total

======================================= VirtPage, PhysPage Page 0, 0 Page 1, 1 Page 2, 2 Page 3, 3 Page 4, 4 Page 5, 5 Page 6, 7 Page 7 INVALID Page 8 INVALID Page 9 INVALID Page 10 INVALID Page 11 INVALID Page 12 INVALID Page 13 INVALID Page 14 INVALID Page 15 INVALID Page 16 INVALID Page 17 INVALID Page 18 INVALID Page 19 INVALID Page 20 INVALID Page 21 INVALID Page 22 INVALID Page 23 INVALID Page 24 INVALID Page 25 INVALID Page 26 INVALID

StackPage 27, 6

=======================================

PageFaultAddress: 896 ,PageFaultPage: 7

copy from swap file :execFile to main memoryNumber of occupied pages 10 virtual page 7 -> physical page 8 LRU:0-->5-->6-->1-->27-->2-->7

PageFaultAddress: 1024 ,PageFaultPage: 8

copy from swap file :execFile to main memoryNumber of occupied pages 11 virtual page 8 -> physical page 9 LRU:0-->5-->6-->7-->1-->27-->2-->8

PageFaultAddress: 1152 ,PageFaultPage: 9

copy from swap file :execFile to main memoryNumber of occupied pages 12 virtual page 9 -> physical page 10 LRU:0-->5-->6-->7-->8-->1-->27-->2-->9

PageFaultAddress: 1280 ,PageFaultPage: 10

copy from swap file :execFile to main memoryNumber of occupied pages 13 virtual page 10 -> physical page 11

LRU:0-->5-->6-->7-->8-->9-->1-->27-->2-->10

PageFaultAddress: 1408 ,PageFaultPage: 11

copy from swap file :execFile to main memoryNumber of occupied pages 14 virtual page 11 -> physical page 12

LRU:0-->5-->6-->7-->8-->9-->10-->1-->27-->2-->11

PageFaultAddress: 1536 ,PageFaultPage: 12

copy from swap file :execFile to main memoryNumber of occupied pages 15 virtual page 12 -> physical page 13

LRU:0-->5-->6-->7-->8-->9-->10-->11-->1-->27-->2-->12

PageFaultAddress: 1664 ,PageFaultPage: 13

copy from swap file :execFile to main memoryNumber of occupied pages 16 virtual page 13 -> physical page 14

LRU:0-->5-->6-->7-->8-->9-->10-->11-->12-->1-->27-->2-->13

PageFaultAddress: 1792 ,PageFaultPage: 14

copy from swap file :execFile to main memoryNumber of occupied pages 17 virtual page 14 -> physical page 15

LRU:0-->5-->6-->7-->8-->9-->10-->11-->12-->13-->1-->27-->2-->14

PageFaultAddress: 1920 ,PageFaultPage: 15

copy from swap file :execFile to main memoryNumber of occupied pages 18 virtual page 15 -> physical page 16

LRU:0-->5-->6-->7-->8-->9-->10-->11-->12-->13-->14-->1-->27-->2-->15

PageFaultAddress: 2048 ,PageFaultPage: 16

copy from swap file :execFile to main memoryNumber of occupied pages 19 virtual page 16 -> physical page 17

LRU:0-->5-->6-->7-->8-->9-->10-->11-->12-->13-->14-->15-->1-->27-->2-->16

PageFaultAddress: 2176 ,PageFaultPage: 17

copy from swap file :execFile to main memoryNumber of occupied pages 20 virtual page 17 -> physical page 18

LRU:0-->5-->6-->7-->8-->9-->10-->11-->12-->13-->14-->15-->16-->1-->27-->2-->17

PageFaultAddress: 2304 ,PageFaultPage: 18

copy from swap file :execFile to main memoryNumber of occupied pages 21 virtual page 18 -> physical page 19

LRU:0-->5-->6-->7-->8-->9-->10-->11-->12-->13-->14-->15-->16-->17-->1-->27-->2-->18

PageFaultAddress: 2432 ,PageFaultPage: 19

copy from swap file :execFile to main memoryNumber of occupied pages 22 virtual page 19 -> physical page 20

LRU:0-->5-->6-->7-->8-->9-->10-->11-->12-->13-->14-->15-->16-->17-->18-->1-->27-->2-->19

PageFaultAddress: 2560 ,PageFaultPage: 20

copy from swap file :execFile to main memoryNumber of occupied pages 23 virtual page 20 -> physical page 21

LRU:0-->5-->6-->7-->8-->9-->10-->11-->12-->13-->14-->15-->16-->17-->18-->19-->1-->27-->2-->20

PageFaultAddress: 2688 ,PageFaultPage: 21

copy from swap file :execFile to main memoryNumber of occupied pages 24 virtual page 21 -> physical page 22

LRU:0-->5-->6-->7-->8-->9-->10-->11-->12-->13-->14-->15-->16-->17-->18-->19 -->20-->1-->27-->2-->21 Exit !20

=====Delete the virtual memory file!======

No threads ready or runnable, and no pending interrupts. Assuming the program completed. Machine halting!

Ticks: total 9769100, idle 43, system 976910, user 8792147 Disk I/O: reads 0, writes 0 Console I/O: reads 0, writes 0 Paging: faults 0

Network I/O: packets received 0, sent 0

Cleaning up... Sort.c源文件: /* sort.c

* Test program to sort a large number of integers. *

* Intention is to stress virtual memory system. *

* Ideally, we could read the unsorted array off of the file system, * and store the result back to the file system! */

#include \

/* size of physical memory; with code, we'll run out of space!*/ #define ARRAYSIZE 516

int b[]={1,2,3,4,5,6,7,87,9,10};

int A[ARRAYSIZE]; int main() {

int i, j, tmp;

/* first initialize the array, in reverse sorted order */ for (i = 0; i < ARRAYSIZE; i++) A[i] = ARRAYSIZE - i - 1;

/* then sort! */

for (i = 0; i < (ARRAYSIZE - 1); i++)

for (j = 0; j < ((ARRAYSIZE - 1) - i); j++)

if (A[j] > A[j + 1]) { /* out of order -> need to swap ! */ tmp = A[j];

A[j] = A[j + 1]; A[j + 1] = tmp; }

Exit(A[20]); /* and then we're done -- should be 0! */ }

实验结果分析:

(使用修改后的sort.c 编译执行的)

使用Nachos运行sort.noff文件,sort的主要工作是对一个长度为516的数组进行升序排序,

…… 此处隐藏:3090字,全部文档内容请下载后查看。喜欢就下载吧 ……
山大操作系统课程设计报告(全套)(15).doc 将本文的Word文档下载到电脑,方便复制、编辑、收藏和打印
本文链接:https://www.jiaowen.net/wendang/598633.html(转载请注明文章来源)
Copyright © 2020-2025 教文网 版权所有
声明 :本网站尊重并保护知识产权,根据《信息网络传播权保护条例》,如果我们转载的作品侵犯了您的权利,请在一个月内通知我们,我们会及时删除。
客服QQ:78024566 邮箱:78024566@qq.com
苏ICP备19068818号-2
Top
× 游客快捷下载通道(下载后可以自由复制和排版)
VIP包月下载
特价:29 元/月 原价:99元
低至 0.3 元/份 每月下载150
全站内容免费自由复制
VIP包月下载
特价:29 元/月 原价:99元
低至 0.3 元/份 每月下载150
全站内容免费自由复制
注:下载文档有可能出现无法下载或内容有问题,请联系客服协助您处理。
× 常见问题(客服时间:周一到周五 9:30-18:00)