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. Hibernate 分页时 Long 无法转化成Integer类型 异常

    转自:http://loquat.iteye.com/blog/818547 报错:java.lang.Long cannot be cast to java.lang.Integer   Long ...

  2. MATLAB信号与系统分析(一)——连续时间信号与系统的时域分析

    一.连续时间信号的表示: 1.向量表示法: 在MATLAB中,是用连续信号在等时间间隔点的样值来近似表示连续信号,当取样时间间隔足够小时,这些离散的样值就能较好地近似出连续信号. 对于连续时间信号f( ...

  3. 转载:关于Matlab GUI的一些经验总结

    去年做了一些关于Matlab GUI的程序,现在又要做相关的东西,回想起来,当时很多经验没有记录下来,现在回顾起来始终觉得不爽,所以从现在开始,一定要勤写记录. 从简单的例子说起吧. 创建Matlab ...

  4. Android loading进度条使用简单总结

    在这里,总结一下loading进度条的使用简单总结一下. 一.说起进度条,必须说说条形进度条,经常都会使用到嘛,特别是下载文件进度等等,还有像腾讯QQ安装进度条一样,有个进度总给人良好的用户体验. 先 ...

  5. LIB 配置文件读写器

    由于读写配置文件的次数比较频繁,而且拥有众多的类库,到最后,直接被各种各样的类库烦死. 顺手封一个简单,实用的.主要功能: 读写AppSetting 读取连接字符串 读取自定义配置节 using Sy ...

  6. extjs tips

    <%@ page language="java" import="java.util.*" pageEncoding="UTF-8"% ...

  7. BZOJ3680 : 吊打XXX

    本题就是找一个受力平衡的点 我们一开始假设这个点是(0,0) 然后求出它受到的力,将合力正交分解后朝着合力的方向走若干步,并不断缩小步长,一步步逼近答案 #include<cstdio> ...

  8. [译]JavaScript:函数的作用域链

    原文:http://blogs.msdn.com/b/jscript/archive/2007/07/26/scope-chain-of-jscript-functions.aspx 在JavaScr ...

  9. ios batchRequest

    https://github.com/facebook/pop AF 为什么要用 一个线程去进行  1.这有什么好处  因为其生产额外的线程也要 开销的   asi 和af都是这么去做的  2.本身所 ...

  10. ashx 集成于Ihandle 简易 高性能 web

    不用搞MV4..如果你用.ashx写的后台..自己加一个switch case就实现了路由...更方便,还不用配置   scaffold 不是dynamic data里面的东西吗   现在我全是ash ...