操作系统中的处理机调度调度_操作系统中的多处理器调度

操作系统中的处理机调度调度

多处理器操作系统 (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.mzph.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;当在算术序列中是…