In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)05/31 Report--
How to analyze the multi-thread structure of INFORMIX-ONLINE dynamic server, I believe that many inexperienced people do not know what to do about it. Therefore, this paper summarizes the causes and solutions of the problem. Through this article, I hope you can solve this problem.
1. What is a clue?
A clue can be thought of as a sequence of instructions being executed in a program. When a clue runs in the same entity, it is called multiple cues.
two。 Single clue and multiple clue
A UNIX process that usually has no implementation clue can be considered a single-threaded process. In such a process, only one instruction sequence is executed, and the responsibility of the operating system is to schedule and execute the process.
Multiple threads is a method that allows you to execute the same process for different users without having to form multiple processes at the operating system level.
Multi-thread is a system-level concept, where the program actually executes machine instructions to manipulate the process so that the process can be executed for many users rather than just a single user, and these instructions are entirely at the user level, not at the Unix core level. As far as Unix is concerned, this multi-threaded process, like other processes, is a single process.
3. Virtual processor
The processes that make up the database server are called virtual processors (virtual processor), and each virtual processor (VP) belongs to a virtual processor (VP class). A VP class is a collection of processes that perform specified tasks in the form of clues, such as writing disk logical logs or reading data from disk. This means that a particular VP can only run clues of the same kind. Each virtual processor (VP) class can contain one or more VP, and in most cases the number can be configured by the online administrator. All VP executors are oninit.
4. Run a clue
A clue runs either on a specified processor or in a queue in a series. The context of the ready run clue is saved in the ready queue.
Similar virtual processors share ready queues, so that a clue can be scheduled and run by different virtual processors during its lifetime. This mechanism balances the load between processors and ensures that clues can be run as long as processors are available.
Advantages of 5.online multi-thread structure
It takes only a small number of database service processes to do the same job.
Multiple database service processes can serve the same user.
Cue context switching within the database service process is faster than that performed by the operating system.
The database server can carry out its own thread scheduling strategy.
It is easy to take advantage of some of the scheduling features provided by hardware manufacturers.
6. Virtual processor class
CPU all user clues and some system clues can run on this category, and there can be no blocked system calls in these clues.
PIO runs internal clues to write physical logs.
LIO runs internal clues that write logical logs.
The AIO runs internal clues to all disk Izod O operations except for logging.
ADT runs security audit trails.
6. Client / server connection
The connection between the customer application and the database service can be run through shared memory, sockets, or ITL.
Poll is responsible for listening for new connection requests from customer applications.
The listening thread sets a data structure called session data block for the user.
Once the session control is set, the sqlexec thread is responsible for returning the online processing results to the application, and the poll thread is responsible for receiving messages from the application.
How does 7.VPs handle operations?
Take the process in which a select statement is processed by a database service process as an example
The sqlexec thread (the customer's main thread) in the virtual processor of the CPU class parses and optimizes the select statement, which reads qualified pages in the buffer.
If the sqlexec thread cannot find a suitable page in the buffer, it puts the request to read the page from disk into the AIO vp queue. The sqlexec thread then transfers control to another clue in the ready queue and puts itself in the sleep queue, waiting for the IO virtual processor disk request.
The AIO virtual processor also reads data from disk and puts it into a buffer, and when the operation is complete, it wakes up the sqlexec thread and returns it to the ready queue, so that it can continue the execution of the select statement.
Each chunk of the online system has a queue of AIO requests.
After reading the above, have you mastered the method of how to analyze the multi-thread structure of INFORMIX-ONLINE dynamic server? If you want to learn more skills or want to know more about it, you are welcome to follow the industry information channel, thank you for reading!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.