没有合适的资源?快使用搜索试试~ 我知道了~
操作系统
资源推荐
资源详情
资源评论
![pdf](https://img-home.csdnimg.cn/images/20210720083512.png)
![pdf](https://img-home.csdnimg.cn/images/20210720083512.png)
![pdf](https://img-home.csdnimg.cn/images/20210720083512.png)
![pdf](https://img-home.csdnimg.cn/images/20210720083512.png)
![pdf](https://img-home.csdnimg.cn/images/20210720083512.png)
![pdf](https://img-home.csdnimg.cn/images/20210720083512.png)
![pdf](https://img-home.csdnimg.cn/images/20210720083512.png)
![pdf](https://img-home.csdnimg.cn/images/20210720083512.png)
![pdf](https://img-home.csdnimg.cn/images/20210720083512.png)
![rar](https://img-home.csdnimg.cn/images/20210720083606.png)
![rar](https://img-home.csdnimg.cn/images/20210720083606.png)
![rar](https://img-home.csdnimg.cn/images/20210720083606.png)
![pdf](https://img-home.csdnimg.cn/images/20210720083512.png)
![pdf](https://img-home.csdnimg.cn/images/20210720083512.png)
![pdf](https://img-home.csdnimg.cn/images/20210720083512.png)
![pdf](https://img-home.csdnimg.cn/images/20210720083512.png)
![pdf](https://img-home.csdnimg.cn/images/20210720083512.png)
![pdf](https://img-home.csdnimg.cn/images/20210720083512.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![7z](https://img-home.csdnimg.cn/images/20210720083312.png)
![rar](https://img-home.csdnimg.cn/images/20210720083606.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![](https://csdnimg.cn/release/download_crawler_static/89501874/bg1.jpg)
2.1 虚拟化 CPU 3
第
第
2
2
章
章
操
操
作
作
系
系
统
统
介
介
绍
绍
Patt / Patel [PP03 ]
Bryant / O’Hallaron [BOH10]
fetch
decodeexecute
Von Neumann
Operating SystemOS
关键问题:如何将资源虚拟化
我们将在本书中回答一个核心问题:操作系统如何将资源虚拟化?这是关键问题。为什么操作系统
这样做?这不是主要问题,因为答案应该很明显:它让系统更易于使用。因此,我们关注如何虚拟化:
操作系统通过哪些机制和策略来实现虚拟化?操作系统如何有效地实现虚拟化?需要哪些硬件支持?
我们将用这种灰色文本框来突出“关键(crux)问题”,以此引出我们在构建操作系统时试图解决
的具体问题。因此,在关于特定主题的说明中,你可能会发现一个或多个关键点(是的,cruces 是正确
的复数形式),它突出了问题。当然,该章详细地提供了解决方案,或至少是解决方案的基本参数。
virtualization
physical
virtual machine
NBA 6
super visormaster control program
Tron
![](https://csdnimg.cn/release/download_crawler_static/89501874/bg2.jpg)
4 第 2 章 操作系统介绍
API
system call
standard library
CPU
resource manager CPUresource
manage
2.1 虚拟化 CPU
2.1 Spin()
1 #include <stdio.h>
2 #include <stdlib.h>
3 #include <sys/time.h>
4 #include <assert.h>
5 #include "common.h"
6
7 int
8 main(int argc, char
*
argv[])
9 {
10 if (argc != 2) {
11 fprintf(stderr, "usage: cpu <string>\n");
12 exit(1);
13 }
14 char
*
str = argv[1];
15 while (1) {
16 Spin(1);
17 printf("%s\n", str);
18 }
19 return 0;
20 }
2.1 cpu.c
cpu.c CPU
prompt> gcc -o cpu cpu.c -Wall
prompt> ./cpu "A"
A
A
![](https://csdnimg.cn/release/download_crawler_static/89501874/bg3.jpg)
2.1 虚拟化 CPU 5
A
A
C
prompt>
A
Control-c UNIX
2.2
prompt> ./cpu A & ; ./cpu B & ; ./cpu C & ; ./cpu D &
[1] 7353
[2] 7354
[3] 7355
[4] 7356
A
B
D
C
A
B
D
C
A
C
B
D
...
2.2
4
illusion
CPU CPU CPU
CPUvirtualizing the CPU
API
API
& tcsh shell
tcsh
shell bash
剩余13页未读,继续阅读
资源评论
![avatar-default](https://csdnimg.cn/release/downloadcmsfe/public/img/lazyLogo2.1882d7f4.png)
![avatar](https://profile-avatar.csdnimg.cn/default.jpg!1)
colin工作室
- 粉丝: 956
- 资源: 202
上传资源 快速赚钱
我的内容管理 展开
我的资源 快来上传第一个资源
我的收益
登录查看自己的收益我的积分 登录查看自己的积分
我的C币 登录后查看C币余额
我的收藏
我的下载
下载帮助
![voice](https://csdnimg.cn/release/downloadcmsfe/public/img/voice.245cc511.png)
![center-task](https://csdnimg.cn/release/downloadcmsfe/public/img/center-task.c2eda91a.png)
安全验证
文档复制为VIP权益,开通VIP直接复制
![dialog-icon](https://csdnimg.cn/release/downloadcmsfe/public/img/green-success.6a4acb44.png)