Reprint: http://blog.csdn.net/jay900323/article/details/18141217performance analysis of Linux five IO modelsDirectory (?) [-]
Conceptual understanding
Five types of IO models under Linux
Blocking IO Model
Non-blocking IO model
IO multiplexing
I have known asynchronous IO for a long time, but it has not been used recently to solve the actual problem (in a CPU-intensive application, some data to be processed may be stored on the disk. The location of the data is known in advance, so an asynchronous IO read request is initiated in advance. Wait until you really need to use these... information
I have known asynchronous
I. Conceptual understandingThere are four types of IO in Linux: synchronous (Sync) and asynchronous (async), blocking (block) and non-blocking (unblock)Sync: When a function call is made, it waits until the result is returned without getting the results.Async: When an asynchronous procedure call is made, the caller cannot get the result immediately. Notifies the caller by notification mechanism or callback function after completionBlocking: The curren
1. Questions:Recently in the real-time synchronization of the log, before the online is done a single part of the online log stress test, Message Queuing and client, the machine is no problem, but did not think of the second log, the problem came:A machine in the cluster top see the load high, the cluster of machine hardware configuration, the deployment of software are the same, but only this one load problem, the initial speculation that there may be hardware problems.At the same time, we also
Tags: Optimize modify understand table store reference response a traditionalI. IO introductionThere are four types of IO: continuous read, random read, random write and continuous write, the IO size of continuous reading and writing is usually larger (128KB-1MB), the main measure of throughput, and random read and write IO
The input/output of C + + is provided by the standard library. The standard library defines a set of types that support read-write (IO) for devices such as files and control Windows. Other types have also been defined so that the string object can operate like a file, allowing us to convert between data and characters without the need for IO. In general, class designers can also easily use the
1. Page CacheLinux OS writes are write-cached by default, and direct IO is used to bypass the operating system's write cache. When you write a string of data, the system will open up a memory area to cache the data, which is what we often call the page cache (the caching of the operating system's pages). View system memory commonly used commands are: Vmstat, free, top and so on. You can use Cat/proc/meminfo to view detailed memory usage where the cach
Synchronous (synchronous) IO and asynchronous (asynchronous) Io, what is the difference between blocking (blocking) IO and non-blocking (non-blocking) IO, respectively. The problem is that different people may give different answers, some think asynchronous IO and non-blocki
IO modelLinux system IO is divided into two phases: The kernel prepares the data and copies the data from the kernel to the user space.This diagram outlines the process of moving data from an external disk to the memory of a running program.User space, kernel spaceNow the operating system is using virtual memory, then for the 32-bit operating system, its address space (virtual storage space) is 4G (2 of 32)
Basic concept blocking and non-blocking 阻塞是进行读写时, 如果当时没有东西可读,或者暂时不可写, 程序就进入等待, 直到有东西可读或者可写为止 Synchronous and asynchronous 同步是指的是用户操作后等待或者轮询的去查看操作是否就绪 异步是指用户某动作操作后便开始做其他动作,而当这个动作操作完成的时候用户会得到这个动作完成的通知IO model Synchronous blocking IO (JAVA BIO):In this way, the user process must wait for the IO operation to complete after initiating an
-blocking: When an event or task is executing, it issues a request action that, if the requested action requires a condition that is not met, immediately returns a flag informing that the condition is not satisfied and will not wait there.This is the difference between blocking and non-blocking. That is, the difference between blocking and non-blocking is that when a request is made, if the condition is not met, it waits or returns a flag message. blocking i
Note: This article is a lot of blog learning and summary, there may be an understanding error. Please take a skeptical look at the same time if there are mistakes to be pointed out. What is the difference between synchronous IO and asynchronous Io, what is blocking IO and non-blocking IO respectively? The answers given
I. OverviewWhat is the difference between synchronous (synchronous) IO and asynchronous (asynchronous) Io, what is blocking (blocking) IO and non-blocking (non-blocking) IO respectively? The problem is that different people may give different answers, such as wikis, that asynchronous
1. Questions:Recently in the real-time synchronization of the log, before the online is done a single part of the online log stress test, Message Queuing and client, the machine is no problem, but did not think of the second log, the problem came:A machine in the cluster top see the load high, the cluster of machine hardware configuration, the deployment of software are the same, but only this one load problem, the initial speculation that there may be hardware problems.At the same time, we also
Python basic-I/O model and python-io Model
I. I/O model
IO indicates Input/Output in the computer, that is, Input and Output. Because the program and runtime data reside in the memory, it is executed by the super-fast computing core of the CPU, which involves data exchange, usually disks and networks, and IO interfaces are required.
What are the differences betwe
Let's start by talking about the objects and steps involved in IO. Take read, for example, to go through two stages:1) Wait for data preparation2) copy data from the kernel to the processTwo, blocking IO (blocking IO)In Linux, all sockets are blocking by default, and a typical read operation flow is as follows:So the blocking
poll the state, the appropriate time to call the blocking function, you can avoid blocking. For non-blocking objects, calling a special function can also enter a blocking call. The function Select is an example of this.1. Sync, that is, I call a function, the function does not end before I death the result.2. Asynchronous, that is, I call a function, do not need to know the result of the function, the function has a result notify me (callback notification)3. Blocking is called me (function), I
Thanks to the guidance of our predecessors, here is my own understanding, some pictures and passages from http://www.cnblogs.com/alex3714/articles/5876749.htmlHttp://www.cnblogs.com/Anker/p/3254269.htmlIf you encounter problems during your learning process, please contact: 2775724349 (because of their limited time, so may not often reply, but will collect each week to meet the problem, in Saturday to blog in the form of post)Blocking I/O (blocking IO)
Note: This article is a lot of blog learning and summary, there may be an understanding error. Please take a skeptical look at the same time if there are mistakes to be pointed out. What is the difference between synchronous IO and asynchronous Io, what is blocking IO and non-blocking IO respectively? The answers given
1. Pdflush Refresh dirty Data condition(Introduction to the principles and parameters of Linux io kernel parameter tuning) The previous section describes the key parameter parameters of the IO kernel tuning. It is concluded that the dirty data in cached is flushed to disk by Pdflush when one or more of the following conditions are met:(1)Data exists longer than Dirty_expire_centisecs (default 30s) time(2)Di
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.