操作系統中的處理機調度調度_操作系統中的多處理器調度

操作系統中的處理機調度調度

多處理器操作系統 (Multiprocessor Operating system)

A multiprocessor system consists of several processors which share memory. In the multiprocessor, there is more than one processor in the system. The reason we use multiprocessor is that sometimes load on the processor is very high but input output on other function is not required. This type of operating system is more reliable as even if on processor goes down the other can still continues to work. This system is relatively cheap because we are only having the copies of processor but other devices like input-output and Memory are shared. In the multiprocessor system all the processor operate under the single operating system. Multiplicity of the processor and how the processors work together are transparent to the other.

多處理器系統由幾個共享內存的處理器組成。 在多處理器中,系統中有多個處理器。 我們使用多處理器的原因是,有時處理器上的負載很高,但是不需要其他功能上的輸入輸出。 這種類型的操作系統更加可靠,即使在處理器出現故障時,其他操作系統仍然可以繼續工作。 該系統相對便宜,因為我們只擁有處理器的副本,但其他設備(如輸入輸出和內存)是共享的。 在多處理器系統中,所有處理器都在單個操作系統下運行。 處理器的多樣性以及處理器如何協同工作對彼此透明。

In this, the user does not know in which processor their process work. A process is divided into several small processes and they work independently on the different processor. A system can be both multi-programmed by having multiple programs running at the same time and multiprocessing by having more than one physical and the processor.

在這種情況下,用戶不知道其處理在哪個處理器中進行。 一個進程分為幾個小進程,它們在不同的處理器上獨立工作。 一個系統可以通過同時運行多個程序來進行多程序編程,也可以通過擁有多個物理和處理器來進行多處理。

In this diagram, there are more than 1 CPU and they shared a common memory.

在此圖中,有1個以上的CPU,它們共享一個公共內存。

multiprocessor scheduling

多處理調度 (Multiprocessing scheduling)

In the multiprocessor scheduling, there are multiple CPU’s which share the load so that various process run simultaneously. In general, the multiprocessor scheduling is complex as compared to single processor scheduling. In the multiprocessor scheduling, there are many processors and they are identical and we can run any process at any time.

在多處理器調度中,有多個CPU共享負載,因此各種進程可以同時運行。 通常,與單處理器調度相比,多處理器調度比較復雜。 在多處理器調度中,有許多處理器,它們是相同的,我們可以隨時運行任何進程。

The multiple CPU’s in the system are in the close communication which shares a common bus, memory and other peripheral devices. So we can say that the system is a tightly coupled system. These systems are used when we want to process a bulk amount of data. These systems are mainly used in satellite, weather forecasting etc.

系統中的多個CPU處于緊密通信中,共享一個公共總線,內存和其他外圍設備。 因此,我們可以說該系統是緊密耦合的系統。 當我們要處理大量數據時,將使用這些系統。 這些系統主要用于衛星,天氣預報等。

Multiprocessing system work on the concept of symmetric multiprocessing model. In this system, each processor work on the identical copy of the operating system and these copies communicate with each other. We the help of this system we can save money because of other devices like peripherals. Power supplies and other devices are shared. The most important thing is that we can do more work in a short period of time. If one system fails in the multiprocessor system the whole system will not halt only the speed of the processor will be slow down. The whole performance of the multiprocessing system is managed by the operating system . operating system assigns different task to the different processor in the system. In the multiprocessing system, the process is broken into the thread which they can be run independently. These type of system allow the threads to run on more than one processor simultaneously. In these systems the various process in the parallel so this is called parallel processor. Parallel processing is the ability of the CPU to run various process simultaneously. In the multiprocessing system, there is dynamically sharing of resources among the various processors.

多處理系統致力于對稱多處理模型的概念。 在此系統中,每個處理器都在操作系統的相同副本上工作,并且這些副本彼此通信。 我們借助該系統可以節省其他設備(例如外圍設備)的費用。 電源和其他設備是共享的。 最重要的是,我們可以在短時間內完成更多工作。 如果一個系統在多處理器系統中發生故障,則整個系統將不會停止運行,而只會降低處理器的速度。 多處理系統的整體性能由操作系統管理。 操作系統將不同的任務分配給系統中的不同處理器。 在多處理系統中,進程分為多個線程,它們可以獨立運行。 這些類型的系統允許線程同時在多個處理器上運行。 在這些系統中,各種并行處理因此稱為并行處理器。 并行處理是CPU同時運行各種進程的能力。 在多處理系統中,各個處理器之間動態地共享資源。

Multiprocessor operating system is a kind of regular OS which handles many systems calls at the same time, do memory management, provide file management also the input-output devices.

多處理器操作系統是一種常規OS,可同時處理多個系統調用,執行內存管理,還提供文件管理以及輸入輸出設備。

There are some extra features which multiprocessor perform:

多處理器還具有一些額外的功能:

  • Process synchronization

    流程同步

  • Resource management

    資源管理

  • Scheduling

    排程

There are various organizations of multiprocessor operating system:

多處理器操作系統有多種組織:

1.每個CPU都有自己的操作系統 (1. Each CPU has its own OS)

In this types of the organization then there are much Central processing units in the system and each CPU has its own private operating system and memory is shared among all the processors and input-output system are also shared. All the system is connected by the single bus.

在這種類型的組織中,系統中有許多中央處理單元,每個CPU都有自己的專用操作系統,并且所有處理器之間共享內存,并且輸入輸出系統也共享。 所有系統通過單條總線連接。

multiprocessor scheduling 1

2.主從多處理器 (2. Master slave multiprocessor)

In this type of multiprocessor model, there is a single data structure which keeps track of the ready processes. In this model, one central processing unit works as master and other central processing unit work as a slave. In this, all the processors are handled by the single processor which is called master server. The master server runs the operating system process and the slave server run the user processes. The memory and input-output devices are shared among all the processors and all the processor are connected to a common bus. This system is simple and reduces the data sharing so this system is called Asymmetric multiprocessing.

在這種類型的多處理器模型中,只有一個數據結構可以跟蹤就緒的進程。 在此模型中,一個中央處理單元充當主控,另一個中央處理單元充當從屬。 在這種情況下,所有處理器均由稱為主服務器的單個處理器處理。 主服務器運行操作系統進程,而從服務器運行用戶進程。 存儲器和輸入輸出設備在所有處理器之間共享,并且所有處理器都連接到公共總線。 該系統非常簡單,減少了數據共享,因此該系統稱為非對稱多處理

multiprocessor scheduling 2

3.對稱多處理器 (3. Symmetric multiprocessor)

Symmetric Multiprocessors (SMP) is the third model. In this model, there is one copy of the OS in memory, but any central processing unit can run it. Now, when a system call is made, then the central processing unit on which the system call was made traps to the kernel and then processes that system call. This model balances processes and memory dynamical. This approach uses Symmetric Multiprocessing where each processor is self-scheduling. The scheduling proceeds further by having the scheduler for each processor examine the ready queue and select a process to execute. In this system, this is possible that all the process may be in common ready queue or each processor may have its own private queue for the ready process.

對稱多處理器(SMP)是第三個模型。 在此模型中,內存中只有一個OS副本,但是任何中央處理器都可以運行它。 現在,當進行系統調用時,在其上進行系統調用的中央處理單元將捕獲到內核,然后處理該系統調用。 該模型平衡了進程和動態內存。 這種方法使用對稱多處理,其中每個處理器都是自調度的。 通過讓每個處理器的調度程序檢查就緒隊列并選擇要執行的進程,進一步進行調度。 在此系統中,所有進程都可能在公共就緒隊列中,或者每個處理器可能具有自己的專用隊列以進行就緒過程。

multiprocessor scheduling 2

There are mainly three sources of contention that can be found in a multiprocessor operating system.

在多處理器操作系統中,主要存在三種爭用源。

  • Locking system

    鎖系統

    As we know that the resources are shared in the multiprocessor system so there is a need to protect these resources for safe access among the multiple processors. The main purpose of locking scheme is to serialize access of the resources by the multiple processors.

    眾所周知,資源是在多處理器系統中共享的,因此需要保護這些資源,以便在多個處理器之間進行安全訪問。 鎖定方案的主要目的是序列化多個處理器對資源的訪問。

  • Shared data

    共享資料

    When the multiple processor access the same data at the same time then there may be a chance of inconsistency of data so to protect this we have to use some protocols or locking scheme.

    當多個處理器同時訪問同一數據時,可能會出現數據不一致的情況,因此為了保護這一點,我們必須使用某些協議或鎖定方案。

  • Cache coherence

    緩存一致性

    It is the shared resource data which is stored in the multiple local caches. Suppose there are two clients have a cached copy of memory and one client change the memory block and the other client could be left with invalid cache without notification of the change so this kind of conflict can be resolved by maintaining a coherence view of the data.

    共享資源數據存儲在多個本地緩存中。 假設有兩個客戶端具有緩存的內存副本,并且一個客戶端更改了內存塊,而另一個客戶端可能在沒有通知更改的情況下留有無效的緩存,因此可以通過維護數據的一致性視圖來解決這種沖突。

翻譯自: https://www.includehelp.com/operating-systems/multiprocessor-scheduling-in-operating-system.aspx

操作系統中的處理機調度調度

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

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

相關文章

轉:Delphi2010新發現-類的構造和析構函數功能

Delphi2010發布了. 雖然憑著對Delphi的熱愛第一時間就安裝了,但是現在可能是年紀大了,對新事物缺乏興趣了.一直都沒有仔細研究. 今天有點時間試了一下新功能. 本來C#和Delphi.NET是支持類的構造函數/析構函數的(注意不是實例的構造和析構).也就是在模塊初始化/卸載的時候會調用…

sed 替換_sed命令批量替換文件內容

“ 開發人員有時會大批量替換文件內容,sed命令是一個很好用的工具。”01—暴力替換方式近期有個臨時任務,將系統中所有"帳"替換為"賬",那"帳"和"賬"有啥區別呢;1、賬的部首是貝;帳的部首是巾。2、賬是關于貨幣、…

android 模仿uc標簽頁,模仿UCweb菜單 - 白羽雕弓 - 博客園

UCWeb的菜單看起來不錯,自己想模仿做一個,苦惱一直沒有思路google了幾天,終于找到一個帖子 http://www.eoeandroid.com/viewthread.php?tid28824按照上面提供的思路實現了1、保留menu按鍵作用2、用popupwindow作為菜單顯示容器3、用GridVie…

ipv6路由協議配置_IPV6尋址,標頭和路由協議

ipv6路由協議配置The IPV6 address is 128 bits. Whereas IPV4 is represented by 4 groups of decimal numbers, same IPV6 is represented by 8 groups of hexadecimal numbers. The example of IPV6 address is 2001:0db8:85a3:0000:0000:8a2e:0370:7334. IPV6地址是128位。…

rpc框架

Motan,dubbo轉載于:https://www.cnblogs.com/zhangshiwen/p/5980886.html

android webview 監聽js,Android webview與js的數據交互

項目要用到Webview和js交互,查了查以前的項目感覺還是有必要整理下的。簡單描述下項目中用到的地方,比如說在web頁需要用到登錄的地方點擊登錄跳轉到APP原生登錄界面去登錄,點擊web頁的撥打電話彈出原生dialog詢問是否撥打,點擊we…

c ++查找字符串_C ++異常處理| 查找輸出程序| 套裝1

c 查找字符串Program 1: 程序1&#xff1a; #include <iostream>using namespace std;int main(){try {int num1 10;int num2 0;int res 0;res num1 / num2;}catch (exception e) {cout << "Exception: Divide By Zero" << endl;}return 0;}O…

python的repr和str有什么不同_str()和repr()的異同

str()函數和repr()函數&#xff0c;都是Python內置的標準函數。這兩個函數都是根據參數對象返回一個字符串&#xff0c;但是又有一些不一樣的地方。我們在使用的時候&#xff0c;常常搞混&#xff0c;傾向于使用簡單明了的str()函數&#xff0c;而搞不清楚為什么還有一個不知所…

android web通訊錄,Android手機開發之通訊錄

Android手機開發——通訊錄實現增加、查詢、修改、刪除的功能&#xff0c;輸入聯系人信息&#xff0c;點擊“添加”按鈕&#xff0c;可以添加聯系人信息到數據庫&#xff1b;點擊“查詢”按鈕&#xff0c;會發現添加的聯系人信息顯示在界面中&#xff1b;重新輸入聯系人電話&am…

有關UITableView--cell復用問題

近來用Tableview做了一個九宮格。過程中碰到了兩個cell復用問題。 問題一&#xff1a; 在cell中為button添加addTarget點擊事件時&#xff0c;出現后面的cell會重疊它前面cell的事件。代碼如下&#xff1a; C代碼 static NSString *CellWithIdentifier "DiscoverHomeTab…

python客戶端和服務端實驗_結合服務器和客戶端python

我正在嘗試使用python(稍后可能用c語言)和TCP套接字制作一個本地網絡聊天程序。我的目的是讓服務器監聽當前計算機的地址以獲取傳入消息&#xff0c;并將這些消息轉發給客戶端(我現在還不確定)。客戶端將是一個簡單的gui&#xff0c;可以通過本地連接向活動服務器發送消息。實際…

python常用語法和示例_C語言切換案例教程,語法,示例和規則

python常用語法和示例使用默認情況下的決策 (Decision making using switch-case-default) Many times in our daily lives, we face conditions where we are required to choose between a number of alternatives rather than just two or three. For example, which school…

android so abi適配,Android NDK學習(六): so文件兼容之abiFilters的使用

最近項目中遇到了要使用JavaCV的情況&#xff0c;涉及到了abi兼容的選擇。因為如果全部都適配的話&#xff0c;包很大&#xff0c;這樣兼容那些用戶數極少的cpu就很不劃算&#xff0c;所以我只適配了armeabi-v7a這一個。但是今天在x64-v8a的模擬器上看的時候&#xff0c;提示我…

python中doc=parased.getroot()_python中執行sed命令操作源文件時出現錯誤

我想在python中執行一個sed命令&#xff0c;第一種方法直接指定文件時&#xff0c;可以正確輸出結果&#xff0c;但是第二種我打開文件操作的時候就有問題&#xff0c;不知道什么原因&#xff0c;求高手解答&#xff1f;(1)>>> sedcmd"sed -n \s/{//g; p\ /qye/p…

JavaScript基礎之Number對象和Math對象

2019獨角獸企業重金招聘Python工程師標準>>> //Math對象//屬性float Math.E; //返回自然對數的底數e&#xff0c;約2.718float Math.LN2; //返回2的自然對數&#xff0c;約0.693float Math.LN10; //返回10的自然對數&#xff0c;約2.302fl…

c++ stl 獲取最小值_如何在C ++ STL中找到向量的最小/最小元素?

c stl 獲取最小值Given a vector and we have to minimum/smallest element using C STL program. 給定一個向量&#xff0c;我們必須使用C STL程序最小/最小元素。 尋找向量的最小元素 (Finding smallest element of a vector) To find a smallest or minimum element of a …

android studio panic,Android Studio模擬器PANIC錯誤

Android Studio模擬器突然停止工作.當我嘗試運行虛擬設備時,我在事件日志中收到以下錯誤.模擬器:PANIC:找不到AVD系統路徑.請定義ANDROID_SDK_ROOT仿真器:處理完成,退出代碼為1所以我檢查了ANDROID_SDK_ROOT環境變量設置的值,它是空的.所以我把它設置為/Users/{username}/Libra…

linux特殊權限之訪問權限

特殊權限如/etc/passwd:sSuid:普通用戶以管理員身份運行命令&#xff08;chmod us FILE、chmod u-s FILE&#xff09;如果FILE本身原來就有執行權限&#xff0c;SUID顯示為s&#xff1b;否則顯示SSgid:基本組以管理組身份運行命令&#xff08;chmod gs FILE、chmod g-s FILE&am…

vb.net變量值變化觸發事件_Angular變化檢測的理解

獲取臟檢查的時機Angular 使用NgZone獲取變化的通知&#xff0c;然后進行全面的變化檢測&#xff0c;進而更新Dom臟檢查的過程Angular的數據流是自頂而下&#xff0c;從父組件到子組件單項流動&#xff0c;單項數據流保證了高效可預測的變化檢測。盡管檢查了父組件之后&#xf…

python 算術右移_Python算術序列| 競爭編碼問題

python 算術右移Question: 題&#xff1a; In mathematics, when in an arithmetic sequence is a sequence of numbers such that the difference between the consecutive terms is constant then it is called arithmetic constant. 在數學中&#xff0c;當在算術序列中是…