UNIX overview

zhaozj2021-02-16  57

Internal structure of UNIX processes

The center of the UNIX operating system is the so-called kernel (kernel), the kernel is responsible for implementing all hardware devices, such as the interface between the disk RAM and the CPU and UNIX processes.

The communication between the user process and the OS is implemented by system calling for UNIX systems. These system calls include open (), read (), Write (), basic UNIX operations such as EXEC (), Malloc, and UNIX core intercepts these systems. Call, will be processed in a specific rule.

Read (), Write () Operates the disk

Fork () is a new task, namely a new process

Malloc () Operates RAM Memory

UNIX buffer cache

As Oracle has a data cache in RAM, UNIX also uses a RAM buffer to minimize unnecessary I / O operation, which is often referred to as JFS (log file system) buffer, when Oracle requests When the data block, Oracle first checks the Data Buffer catch, if you do not find the UNIX JFS buffer, if the data is not found, check the disk array buffer only when these buffers do not contain data blocks. Physical disk read operation is made.

UNIX memory management

The UNIX operating system has virtual memory, in the virtual memory settings, special swap magnetic panels can be used.

(SWAP Disk Area) to expand existing RAM memory.

Virtual Memory is a policy: this policy relies on such a fact: not every executable task to access its RAM storage area, because all RAM regions are not often used, so UNIX has developed a page Scheduling algorithm, when the RAM memory is not required, the algorithm can move the RAM memory to the swap disk.

When the memory area is established, UNIX will not reject the RAM request has exceeded the new task of the RAM. More specifically, UNIX will pass the most recently used RAM memory page to the swap disk, so that the new request When exceeding the physical limit of the RAM, UNIX can clear the RAM area because these regions have been written to swap disks.

When the RAM area is to be cleared for the switch, any original program caused by any original program requires UNIX to copy the memory page in the RAM to allow these memory pages to access, and the UNIX page requests need to call disk i in the operation. / O, and this is a slow root that is slow, so for a DBA, avoiding the Unix page request in the operation is critical.

1. Exchange (PAGE OUT)

When there is an additional RAM memory area request, UNIX usually swaps the RAM page. The asynchronous write operation of the RAM is usually performed on all memory regions marked as switchable. In summary, the exchange operation does not allow the RAM memory area from the RAM. Physical removal, it is just a temporary state. When UNIX decides to move the area from the RAM, the memory COPY has been taken to disk.

2. Exchange into (PAGE IN)

Since the Unix has not deleted the area from the RAM, the exchange operation cannot be attracted, however, call the disk I / O when UNIX performs exchange operation, when UNIX retrieves the area from the swap disk and re-re-re- When loading the RAM area, the request task is waiting for a long time (several milliseconds)

Therefore, for the Oracle task, the RAM exchange operation is something that is unwilling to happen, and Oracle DBA must always monitor exchange operations and take appropriate measures.

Add additional RAM for UNIX servers

Reduce the SGA size of the database by reducing the size of the database buffer

Mark the key area SGA as an unswedable space

转载请注明原文地址:https://www.9cbs.com/read-15681.html

New Post(0)