COMPUTER ORGANIZATION AND ARCHITECTURE DESIGNING FOR PERFORMANCE NINTH EDITION

Referring back to Figure 8.11, we have discussed three types of queues: the long-
term queue of requests for new processes, the short-term queue of processes ready
to use the processor, and the various I/O queues of processes that are not ready to
use the processor. Recall that the reason for this elaborate machinery is that I/O
activities are much slower than computation and therefore the processor in a uni-
programming system is idle most of the time.
But the arrangement in Figure 8.11 does not entirely solve the problem. It is
true that, in this case, memory holds multiple processes and that the processor can
move to another process when one process is waiting. But the processor is so much
faster than I/O that it will be common for all the processes in memory to be waiting
on I/O. Thus, even with multiprogramming, a processor could be idle most of the
time.
What to do? Main memory could be expanded, and so be able to accommo-
date more processes. But there are two flaws in this approach. First, main memory
is expensive, even today. Second, the appetite of programs for memory has grown
as fast as the cost of memory has dropped. So larger memory results in larger proc-
esses, not more processes.
 
 
Another solution is swapping, depicted in Figure 8.12. We have a long-term
queue of process requests, typically stored on disk. These are brought in, one at a
time, as space becomes available. As processes are completed, they are moved out
of main memory. Now the situation will arise that none of the processes in memory
are in the ready state (e.g., all are waiting on an I/O operation). Rather than remain
idle, the processor swaps one of these processes back out to disk into an intermediate
queue.
This is a queue of existing processes that have been temporarily kicked out
of memory. The OS then brings in another process from the intermediate queue, or
it honors a new process request from the long-term queue. Execution then contin-
ues with the newly arrived process.
Swapping, however, is an I/O operation, and therefore there is the potential
for making the problem worse, not better. But because disk I/O is generally the
fastest I/O on a system (e.g., compared with tape or printer I/O), swapping will usu-
ally enhance performance. A more sophisticated scheme, involving virtual memory,
improves performance over simple swapping. This will be discussed shortly. But
first, we must prepare the ground by explaining partitioning and paging.
 
 

Swapping的更多相关文章

  1. [POJ 1674] Sorting by Swapping

    Sorting by Swapping Time Limit: 1000MS   Memory Limit: 10000K Total Submissions: 9514   Accepted: 50 ...

  2. Case swapping

    Case swapping Description: Given a string, swap the case for each of the letters. e.g. CodEwArs --&g ...

  3. Matrix Swapping II(求矩阵最大面积,dp)

    Matrix Swapping II Time Limit: 9000/3000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Other ...

  4. CDH集群频繁告警(host频繁swapping)

    最近CDH集群频繁告警,原因是某些host频繁swapping,极大影响了集群的性能. 后来发现有个设置(/proc/sys/vm/swappiness)需要修改,默认值60 Setting the ...

  5. UVa 299 - Train Swapping

    题目大意:给n个数的一个序列,通过交换相邻的两个数使得这n个数按照从小到大的顺序排列. Inversion index problem: count how many swaps are needed ...

  6. Hot swapping

    83. Hot swapping83.1 Reload static contentThere are several options for hot reloading. The recommend ...

  7. 【Devops】【docker】【CI/CD】Jenkins源代码管理 添加gitlab项目地址,报错Failed to connect to repository : Error performing command: ls-remote -h git@192.168.92.130:8090/root/swapping.git HEAD

    Jenkins源代码管理 添加gitlab项目地址 报错如下: Failed to connect to repository : Error performing command: ls-remot ...

  8. 【docker-compose】使用docker-compose启动spring-boot+mysql,服务内连数据库报错:create connection SQLException, url: jdbc:mysql://mysql:33061/swapping?useSSL=false&useUnicode=true&characterEncoding=UTF-8, errorCode 0,

    完整配置在这里, https://www.cnblogs.com/sxdcgaq8080/p/10070948.html 启动报错如下: 2018-12-05 01:04:05.569 ERROR 1 ...

  9. Swapping eth0 and eth1 on OK335xS board

    /******************************************************************************* * Swapping eth0 and ...

随机推荐

  1. hdu 4296 贪心

    证明转自:  here 题意:有 n 个地板,每个地板 i 有两个权值 Wi, Si,且 PDV(i) =  (ΣWj) - Si ( j 表示在 i 上面的地板).问如何调整顺序,使得[max(PD ...

  2. 如何清除sql server日志

    1.打开查询分析器,输入命令 DUMP TRANSACTION 数据库名 WITH NO_LOG 2.再打开企业管理器--右键你要压缩的数据库--所有任务--收缩数据库--收缩文件--选择日志文件-- ...

  3. Loadrunner 关联 web_custom_request综合实例

    Loadrunner 关联 web_custom_request综合实例 Loadrunner 关联web_custom_request,针对自带的订票系统的一个综合实例,相信看了本文大家对学习loa ...

  4. C# MarshalByRefObject 和Serializable的区别

    这两种方式的类一般都是用于远程传输时使用. marshalbyrefobject是通过引用传递serializable是通过值传递,现在就来分析下什么是引用传递,什么是值传递. 理解这个对Remoti ...

  5. PDA移动POS开单扫描打票收银系统-带来零售批发 新的技术 新的手段!!

    手持POS终端高清彩屏,清晰.美观.大方,适用于仓库.超市.服装.食品.批发零售.手机电脑等企业管理.可与管理软件灵活对接.1:员工记不住价格,产品名称,只要有PDA扫描,价格,库存,直接开销售单,打 ...

  6. AngularJS学习笔记二:AngularJS指令

    AngularJS 指令: AngularJS 通过被称为 指令 的新属性来扩展 HTML. AngularJS 指令是扩展的 HTML 属性,带有前缀 ng-. 几个常用 指令: ng-app 指令 ...

  7. White Rectangles[HDU1510]

    White Rectangles Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others) ...

  8. BZOJ3831 : [Poi2014]Little Bird

    设f[i]表示到i最少休息次数,f[i]=min(f[j]+(h[j]<=a[i])),i-k<=j<i,单调队列优化DP #include<cstdio> #defin ...

  9. BZOJ3329 : Xorequ

    第一问: 打表可得规律:当且仅当x&(x<<1)=0时才会是解,于是数位DP f[i][j][k]表示二进制中前i位,上一位是j,前i位是否等于n的方案数 第二问: 打表可得规律: ...

  10. 各新旧版本Java及其相关文档可以从这里下载

    http://www.oracle.com/technetwork/java/archive-139210.html