Oracle Process Architecture - Oracle 进程结构篇5

前言:接上一篇 Oracle Process Architecture - Oracle 进程结构篇4

           http://blog.csdn.net/nature_ann/article/details/17144185

1. Slave Processes 从属进程

<<----从属进程是为了其他进程执行工作的后台进程。本部分介绍一些Oracle数据库使用的从属进程。---->>

Slave processes are background processes that perform work on behalf of other processes. This section describes some slave processes used by Oracle Database.

1.1 I/O Slave Processes I/O从属进程

<<---- I/O从属进程为不支持异步I/O的系统和设备模拟异步I/O。异步I/O没有传输时间的要求,它可以让其他进程在传输完成之前开始。---->>

I/O slave processes (Innn) simulate asynchronous I/O for systems and devices that do not support it. In asynchronous I/O, there is no timing requirement for transmission, enabling other processes to start before the transmission has finished.

<<---- 比如,一个应用程序在一个不支持异步I/O的操作系统上写1000个块到磁盘,每次写都是顺序发生,并且等待一个写入成功的确认。在异步磁盘上,一个应用程序可以大容量的写人到数据库,并且在等待操作系统对所有的块被写入做出响应的同时,执行其他的工作---->>

For example, assume that an application writes 1000 blocks to a disk on an operating system that does not support asynchronous I/O. Each write occurs sequentially and waits for a confirmation that the write was successful. With asynchronous disk, the application can write the blocks in bulk and perform other work while waiting for a response from the operating system that all blocks were written.

<<----为了模拟异步I/O,由一个进程监督几个从属进程。调用者进程将工作分配给每一个从属进程,从属进程会等待每一个写操作的完成,并且完成后报告调用者。在真正的异步I/O中,操作系统会等待I/O完成,并在完成时报告主进程,而在模拟异步I/O中,从属进程会等待,并在完成时报告调用者。 ---->>

To simulate asynchronous I/O, one process oversees several slave processes. The invoker process assigns work to each of the slave processes, who wait for each write to complete and report back to the invoker when done. In true asynchronous I/O the operating system waits for the I/O to complete and reports back to the process, while in simulated asynchronous I/O the slaves wait and report back to the invoker.

<<----数据库支持不同类型的I/O从属进程,包括以下几个:1.恢复管理的I/O从属进程(当使用rman备份或还原数据时,磁盘和磁带设备会使用I/O从属进程。2.数据库写入从属进程(如果计算机只有一个CPU,数据库使用多个写进程是不现实的,数据库可以通过多个从属进程来分布I/ODBWR是扫描高速缓冲区LRU列表中的快以写入到磁盘的唯一进程。而I/O从属进程为这些快执行I/O。)---->>

The database supports different types of I/O slaves, including the following:

>>I/O slaves for Recovery Manager (RMAN)

When using RMAN to back up or restore data, you can make use of I/O slaves for both disk and tape devices.

>>Database writer slaves

If it is not practical to use multiple database writer processes, such as when the computer has one CPU, then the database can distribute I/O over multiple slave processes. DBWR is the only process that scans the buffer cache LRU list for blocks to be written to disk. However, I/O slaves perform the I/O for these blocks.

1.2 Parallel Query Slaves 并行查询从属进程

<<----在并行执行或并行处理中,多个进程协同工作,来运行一个单一的SQL语句。通过在多个进程间分配工作,oracle数据库可以更快地运行语句。比如,四个进程分别处理一年中不同的四个季度而不是一个进程处理所有的四个季度。---->>

In parallel execution or parallel processing, multiple processes work together simultaneously to run a single SQL statement. By dividing the work among multiple processes, Oracle Database can run the statement more quickly. For example, four processes handle four different quarters in a year instead of one process handling all four quarters by itself.

<<----并行执行减少了在大数据库(如数据仓库)上密集型操作响应的时间。对称多处理(SMP)和集群系统在并行执行获得了最大的性能优势,因为语句处理可以在多个CPU之间划分。并行执行也能使某些类型的OLTP和混合系统受益。 ---->>

Parallel execution reduces response time for data-intensive operations on large databases such as data warehouses. Symmetric multiprocessing (SMP) and clustered system gain the largest performance benefits from parallel execution because statement processing can be split up among multiple CPUs. Parallel execution can also benefit certain types of OLTP and hybrid systems.

<<----RAC系统里,特定服务的服务配置控制并行执行。具体而言,并行进程运行在那些配置服务的节点上。默认情况下,oracle 数据库只在提供数据库连接服务的实例上运行并行进程。这并不影响其他并行操作,如并行恢复或对视图GV$的查询的处理。---->>

In Oracle RAC systems, the service placement of a particular service controls parallel execution. Specifically, parallel processes run on the nodes on which you have configured the service. By default, Oracle Database runs the parallel process only on the instance that offers the service used to connect to the database. This does not affect other parallel operations such as parallel recovery or the processing of GV$ queries.

1.2.1 Serial Execution 串行执行

<<----在串行执行里,一个单个服务器进程,执行顺序执行的某个sql语句所有必需的处理。比如,执行一个全表扫描(Select * from employees,由一个服务器进程执行所有的工作。如下图:4.3.2.1---->>

In serial execution, a single server process performs all necessary processing for the sequential execution of a SQL statement. For example, to perform a full table scan such as SELECT * from employees, one server process performs all of the work, as shown in Figure 1.2.1

 

                         Figure 1.2.1 Serial Full Table Scan

1.2.2 Parallel Execution 并行执行

<<----在并行执行中,服务器进程担当并行执行协调器的角色,负责解析查询,分配和控制从属进程,并将输出发送给用户。给定一个SQL查询的查询计划,协调器将sql查询中的每一个运算符分解成平行片,并且按查询中的指定顺序运行它们,集成部分结果由执行操作的从属进程产生。---->>

In parallel execution, the server process acts as the parallel execution coordinator responsible for parsing the query,allocating and controlling the slave processes, and sending output to the user. Given a query plan for a SQL query, the coordinator breaks down each operator in a SQL query into parallel pieces, runs them in the order specified in the query, and integrates the partial results produced by the slave processes executing the operators.

<<---- 下图显示了表employees的并行扫描。表被动态划分(动态分区)为多个加载单元,这些加载单元被称为颗粒。每一个颗粒是一个由单个从属进程读取的表的数据块范围,这些从属进程叫做并行执行服务。名称格式为Pnnn---->>

Figure 1.2.2 shows a parallel scan of the employees table. The table is divided dynamically (dynamic partitioning) into load units called granules. Each granule is a range of data blocks of the table read by a single slave process, called a parallel execution server, which uses Pnnn as a name format.

                             Figure 1.2.2 Parallel Full Table Scan

<<----数据库在执行时映射颗粒到执行服务器。当一个执行服务器完成某个颗粒对应行的读取,而此时还有其他的颗粒将要读取,执行服务器会从协调器那里获取另一个颗粒。这个操作将继续,直到这个表读完为止。执行服务器向协调器发送执行结果,协调器再将这些片断合并,为全表扫描所用。---->>

The database maps granules to execution servers at execution time. When an execution server finishes reading the rows corresponding to a granule, and when granules remain, it obtains another granule from the coordinator. This operation continues until the table has been read. The execution servers send results back to the coordinator, which assembles the pieces into the desired full table scan.

<<---- 分配给单个操作的并行服务器的数量是操作的并行度。同一SQL语句中的多个操作具有相同的并行度。---->>

The number of parallel execution servers assigned to a single operation is the degree of parallelism for an operation. Multiple operations within the same SQL statement all have the same degree of parallelism.

 

 

At this point,  the oracle process architecture is end.

 

 

 

 

 

 

 

 

Python网络爬虫与推荐算法新闻推荐平台:网络爬虫:通过Python实现新浪新闻的爬取,可爬取新闻页面上的标题、文本、图片、视频链接(保留排版) 推荐算法:权重衰减+标签推荐+区域推荐+热点推荐.zip项目工程资源经过严格测试可直接运行成功且功能正常的情况才上传,可轻松复刻,拿到资料包后可轻松复现出一样的项目,本人系统开发经验充足(全领域),有任何使用问题欢迎随时与我联系,我会及时为您解惑,提供帮助。 【资源内容】:包含完整源码+工程文件+说明(如有)等。答辩评审平均分达到96分,放心下载使用!可轻松复现,设计报告也可借鉴此项目,该资源内项目代码都经过测试运行成功,功能ok的情况下才上传的。 【提供帮助】:有任何使用问题欢迎随时与我联系,我会及时解答解惑,提供帮助 【附带帮助】:若还需要相关开发工具、学习资料等,我会提供帮助,提供资料,鼓励学习进步 【项目价值】:可用在相关项目设计中,皆可应用在项目、毕业设计、课程设计、期末/期中/大作业、工程实训、大创等学科竞赛比赛、初期项目立项、学习/练手等方面,可借鉴此优质项目实现复刻,设计报告也可借鉴此项目,也可基于此项目来扩展开发出更多功能 下载后请首先打开README文件(如有),项目工程可直接复现复刻,如果基础还行,也可在此程序基础上进行修改,以实现其它功能。供开源学习/技术交流/学习参考,勿用于商业用途。质量优质,放心下载使用。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值