操作系統磁盤調度_磁盤調度| 操作系統

操作系統磁盤調度

磁盤調度 (Disk Scheduling)

One of the major duties of the operating is that, to use the hardware orderly and accurately. For disk drives, it has a duty of having a fast access time and disk bandwidth. Generally, bandwidth is the total number of bytes, which need to be transferred, and then divided by the total time between the first service and the last transfer. In the case of disk structure, we have to improve both access time and the bandwidth with the help of scheduling the service of disk I/O requests in good order. By this there are many techniques comes for disk scheduling which is prescribed below.

操作的主要職責之一是有序,準確地使用硬件。 對于磁盤驅動器,它具有快速訪問時間和磁盤帶寬的職責。 通常,帶寬是需要傳輸的總字節數,然后除以第一次服務和最后一次傳輸之間的總時間。 在磁盤結構的情況下,我們必須通過合理安排磁盤I / O請求的服務來改善訪問時間和帶寬。 通過這種方式,有許多用于磁盤調度的技術,如下所述。

1. FCFS調度 (1. FCFS Scheduling)

This is a simple scheduling algorithm which means first come first serve form of an algorithm. This kind of algorithm generally not provides the fastest service.

這是一種簡單的調度算法,這意味著算法的先到先得形式。 這種算法通常不會提供最快的服務。

Consider the example: a disk queue with a request for I/O to blocks on cylinder 97, 182, 37, 128, and 15 in that order. If the disk head is initially at cylinder 52, so it will first move from 52 to 97, then 182, 37, 128, 15. There is a drastic change in the moment like 37 to 128 and then back to 15, it can generate the problem with this schedule.

請考慮以下示例:一個磁盤隊列,該請求按順序依次請求柱面97、182、37、128和15上的塊的I / O。 如果磁盤頭最初位于圓柱體52上,那么它將首先從52移至97,然后從182、37、128、15移動。此刻會發生劇烈變化,例如從37變為128,然后又回到15,則可以生成這個時間表的問題。

2. SSTF調度 (2. SSTF scheduling)

This is an algorithm which is termed as shortest seek time first algorithm. This type of algorithm selects the request with the minimum seek time from the current head position, as seek time is a time in which the arm has to move the head to the cylinder containing the desired sector. Seek time will be increased if the number of the head will be traversed by the head, as SSTF choose the request closest to the head position.

這是被稱為最短尋道時間優先算法的算法。 這種類型的算法從當前磁頭位置中選擇具有最小尋道時間的請求,因為尋道時間是手臂必須將磁頭移動到包含所需扇區的圓柱的時間。 如果SSTF選擇最接近磁頭位置的請求,那么如果磁頭遍歷磁頭的數量,則搜索時間將會增加。

3.掃描計劃 (3. SCAN Scheduling)

SCAN scheduling algorithm is also called the elevator algorithm because in such kind of algorithm arm behaves just like an elevator for building the way. In the SCAN algorithm, the arm will start at the one end of the disk and then move towards another end of the disk. At the last end, the head of the arm will be reversed and then this process continues.

SCAN調度算法也稱為電梯算法,因為在這種算法中,手臂的行為就像電梯一樣。 在SCAN算法中,機械臂將從磁盤的一端開始,然后朝磁盤的另一端移動。 最后,手臂的頭部將反轉,然后繼續此過程。

4. C-SCAN調度 (4. C-SCAN Scheduling)

This kind of algorithm is termed as circular scan scheduling algorithm. This is designed to provide a uniform wait time. The C-SCAN algorithm treats the cylinder as the circular lists which will wrap the final cylinder to the first one. Although it is same as SCAN, in this also the head will move from one end to the another, when the head reaches the end it immediately return at a position of the beginning of the disk, without any request.

這種算法稱為循環掃描調度算法。 這旨在提供統一的等待時間。 C-SCAN算法將圓柱體視為循環列表,它將最終圓柱體包裝到第一個圓柱體中。 盡管與SCAN相同,但磁頭也將從一端移動到另一端,當磁頭到達一端時,它會立即返回磁盤起始位置,而無需任何請求。

5.查找計劃 (5. LOOK scheduling)

This is the same as a SCAN algorithm, this algorithm kindly check the LOOKS to see whether there is any request which is pending in the direction of a head moment. Generally, according to the LOOK algorithm, the arm goes only as far as possible in each direction and then reverse direction without going to the end. The variant like scan is called LOOK scheduling because at last, they will look for a request before to move in a given direction.

這與SCAN算法相同,該算法請檢查LOOKS,以查看是否有任何在頭部力矩方向上待處理的請求。 通常,根據LOOK算法,機械臂只會在各個方向上盡可能遠地移動,然后在不移動的情況下反向移動。 像scan這樣的變量稱為LOOK調度,因為最后,它們將在向給定方向移動之前先查找請求。

Selection of a Disk-Scheduling Algorithms

磁盤調度算法的選擇

SSTF is a common algorithm which will increase the performance over the FCFS. SCAN and C-SCAN perform better for the system which places a heavy load on the disk because there is no such kind of a starvation problem. For any kind of the algorithm, the performance is basically dependent upon the number and the type of the requests. Disk scheduling algorithm should be written separately so that it can be replaced by a different algorithm if necessary. In this case, SSTF or LOOK is the best choice for the shortcoming algorithm.

SSTF是一種通用算法,它將提高FCFS的性能。 SCAN和C-SCAN在磁盤上負載較重的系統上表現更好,因為不存在此類饑餓問題。 對于任何一種算法,性能基本上都取決于請求的數量和類型。 磁盤調度算法應單獨編寫,以便在必要時可以用其他算法替換。 在這種情況下,SSTF或LOOK是該缺點算法的最佳選擇。

翻譯自: https://www.includehelp.com/operating-systems/disk-scheduling.aspx

操作系統磁盤調度

本文來自互聯網用戶投稿,該文觀點僅代表作者本人,不代表本站立場。本站僅提供信息存儲空間服務,不擁有所有權,不承擔相關法律責任。
如若轉載,請注明出處:http://www.pswp.cn/news/377748.shtml
繁體地址,請注明出處:http://hk.pswp.cn/news/377748.shtml
英文地址,請注明出處:http://en.pswp.cn/news/377748.shtml

如若內容造成侵權/違法違規/事實不符,請聯系多彩編程網進行投訴反饋email:809451989@qq.com,一經查實,立即刪除!

相關文章

leetcode 344. 反轉字符串 541. 反轉字符串 II 雙指針解

目錄leetcode 344.反轉字符串1、題目2、思考leetcode 541. 反轉字符串 II1、題目2、思考leetcode 344.反轉字符串 1、題目 2、思考 典型的雙指針解法: 一個從前往后,一個從后往前,指針對應的交換即可。 class Solution { public:void reve…

關于銀聯在線支付和短彩信接口的開發——總結

9月份開始做用二維碼做閉環的一個在線訂購景區門票的項目,其中這樣做是很好的,用二維碼連接了線上與線下的交易和兌券。銀聯在線支付接口(asp.net cs)做的很好,方便調用開發。就是處理回值的時候得找個更好的方法才能顯…

十三、聚類算法

六、聚類算法實戰 一、聚類 聚類是一種無監督的機器學習任務,可以自動將數據劃分為類cluster,因此聚類分組不需要提前被告知所劃分的組應該是什么樣子的。因為我們甚至可能都不知道我們在尋找什么,所以聚類是用于知識發現而不是預測。 聚類…

pl/sql中的賦值運算符_如何在SQL中使用AND / OR運算符?

pl/sql中的賦值運算符Basically, AND / OR operator is used to retrieving the record from the database. If we give more than one conditions by using AND Operator, then it retrieves the data from the database when both the conditions are true. And if we use OR…

【C++grammar】名字隱藏與重定義

目錄1、繼承中的名字隱藏1.基類同名函數被隱藏的現象描述2.問題理解3.避免現象2、重定義1.現象描述2.重定義與重載的區別3.能否使用 using 將基類成員引入到派生類定義中1、繼承中的名字隱藏 1.基類同名函數被隱藏的現象描述 在學習變量作用域的時候知道,全局變量…

javascript 核心概念(1)-數據類型

語法 (1)到現在為止,大多數瀏覽器也還是支持到ECMAScript 第三版的標準。 核心概念就是一個語言的基本工作原理,涉及語法,操作符,數據類型。 (2)javascript的一切--變量,…

注解的力量 -----Spring 2.5 JPA hibernate 使用方法的點滴整理(五):使用@Component 來簡化bean的配置...

雖然我們可以通過 Autowired 在 Bean 類中使用自動注入功能&#xff0c;但是 Bean 還是在 applicatonContext.xml 文件中通過 <bean> 進行定義 —— 在前面的例子中&#xff0c;我們還是在配置文件中定義 Bean&#xff0c;通過 Autowired為 Bean 的成員變量、方法形參或構…

c語言條件語句示例_PHP中的條件語句和示例

c語言條件語句示例PHP條件語句 (PHP Conditional Statements) While coding, you may get to a point where your results can only be gotten when a condition is valid. We make use of conditional statements. Conditional statements are statements that can only be ex…

十四、聚類實戰——圖片壓縮

對同一像素點值的像素點歸為一類&#xff0c;通過平均值進行取代&#xff0c;從而將圖像進行壓縮并且保證圖像盡可能不失真&#xff0c;關鍵信息仍保留。 from PIL import Image import numpy as np from sklearn.cluster import KMeans import matplotlib import matplotlib.…

步驟菜單使用css3實現

代碼庫&#xff1a;http://thecodeplayer.com/walkthrough/css3-breadcrumb-navigation 有興趣的可以看一下&#xff0c;看完絕對讓你大飽眼福。首先截圖&#xff0c;看效果看著很酷吧&#xff0c;其實實現起來也不是很難&#xff0c;里邊需要用的技術有:box-shadow,計數器&…

【嵌入式系統】STM32串口通信的四種方法(基于RTOS)

目錄1、串行通信的基本參數2、輪詢方式代碼效果3、中斷方式代碼效果4、中斷加上時間戳方式代碼及效果5、DMA空閑中斷方式接收數據1、串行通信的基本參數 串行端口的通信方式是將字節拆分成一個接一個的位再傳輸出去&#xff0c;接收方再將此一個一個的位組合成原來的字符&…

大數據 java 代碼示例_Java變量類型與示例

大數據 java 代碼示例Java變量 (Java variables) Variables are the user-defined names of the memory blocks, and their values can be changed at any time during program execution. They play an important role in a class/program as they help in to store, retrieve…

畢業設計

位置跟蹤系統工作原理&#xff08;博聞網&#xff09; http://science.bowenwang.com.cn/location-tracking.htm Azuma是這樣定義增強現實的 :虛實結合 ,實時交互 ,三維注冊 環境搭建&#xff1a; http://cvchina.net/thread-173-1-1.html http://blog.csdn.net/jdh99/article/…

十五、聚類的評估

一、Given Label 均一性homogeneity&#xff1a;一個簇中只包含一個類別樣本&#xff0c;Precision 完整性completeness&#xff1a;同類別樣本被歸到同一個簇中&#xff0c;Recall 將均一性h和完整性c進行結合(二者加權平均)得到V-Measure&#xff0c;&#xff0c;β為權重 …

SQL SERVER作業的Schedules淺析

SQL SERVER作業的計劃&#xff08;Schedules&#xff09;&#xff0c;如果你沒仔細研究過或沒有應用一些復雜的計劃&#xff08;Schedules&#xff09;&#xff0c;那么你覺得SQL SERVER作業的計劃(Schedules)非常好用&#xff0c;也沒啥問題&#xff0c;但是我要告訴你一個“殘…

leetcode 51. N 皇后 思考分析

目錄題目思考AC代碼題目 n 皇后問題研究的是如何將 n 個皇后放置在 nn 的棋盤上&#xff0c;并且使皇后彼此之間不能相互攻擊。 思考 首先以N4為例&#xff0c;畫出解空間樹的一部分&#xff1a; 根據模板&#xff1a; void backtracking(參數) {if(終止條件){存放結果…

Django實戰(18):提交訂單

前面的內容已經基本上涵蓋了Django開發的主要方面&#xff0c;我們從需求和界面設計出發&#xff0c;創建模型和修改模型&#xff0c;并通過scaffold作為開發的起點&#xff1b;在scaffold的基礎上重新定制模板&#xff0c;并且通過Model類和Form類對用戶輸入的數據進行校驗。我…

No module named ‘tensorflow.examples‘解決方案

想從tensorflow中導入mnist手寫數字數據集&#xff0c;結果報錯 from tensorflow.examples.tutorials.mnist import input_data import tensorflow.compat.v1 as tf tf.disable_v2_behavior()my_mnist input_data.read_data_sets("MNIST_data_bak/", one_hotTrue)&…

julia example_使用Julia中的Example的sign()函數

julia exampleJulia| sign()函數 (Julia | sign() function) sign() function is a library function in Julia programming language, it returns the sign of the given value in the form of -1/1. sign()函數是Julia編程語言中的庫函數&#xff0c;它以-1 / 1的形式返回給…

.NET通用基本權限系統

DEMO下載地址&#xff1a; http://download.csdn.net/detail/shecixiong/5372895 一、開發技術&#xff1a;B/S(.NET C# ) 1、Windows XP以上 (支援最新Win 8) 2、Microsoft Visual Studio 2010/2012 C#.NET 3、.NET Framework 4.0以上 (支援最新4.5版本) 4、SQL Server 2005以…