WO2018082570A1 - I/o请求的调度方法及装置 - Google Patents

I/o请求的调度方法及装置 Download PDF

Info

Publication number
WO2018082570A1
WO2018082570A1 PCT/CN2017/108951 CN2017108951W WO2018082570A1 WO 2018082570 A1 WO2018082570 A1 WO 2018082570A1 CN 2017108951 W CN2017108951 W CN 2017108951W WO 2018082570 A1 WO2018082570 A1 WO 2018082570A1
Authority
WO
WIPO (PCT)
Prior art keywords
queue
request
queues
requests
response speed
Prior art date
Application number
PCT/CN2017/108951
Other languages
English (en)
French (fr)
Inventor
缪勰
钟江
夏开旭
Original Assignee
华为技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Priority to EP17866432.2A priority Critical patent/EP3534255A4/en
Publication of WO2018082570A1 publication Critical patent/WO2018082570A1/zh
Priority to US16/401,977 priority patent/US10628216B2/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/48Program initiating; Program switching, e.g. by interrupt
    • G06F9/4806Task transfer initiation or dispatching
    • G06F9/4843Task transfer initiation or dispatching by program, e.g. task dispatcher, supervisor, operating system
    • G06F9/4881Scheduling strategies for dispatcher, e.g. round robin, multi-level priority queues
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/30Arrangements for executing machine instructions, e.g. instruction decode
    • G06F9/38Concurrent instruction execution, e.g. pipeline or look ahead
    • G06F9/3854Instruction completion, e.g. retiring, committing or graduating
    • G06F9/3856Reordering of instructions, e.g. using queues or age tags
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/48Program initiating; Program switching, e.g. by interrupt
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/50Queue scheduling
    • H04L47/62Queue scheduling characterised by scheduling criteria
    • H04L47/625Queue scheduling characterised by scheduling criteria for service slots or service orders
    • H04L47/6255Queue scheduling characterised by scheduling criteria for service slots or service orders queue load conditions, e.g. longest queue first
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/50Queue scheduling
    • H04L47/62Queue scheduling characterised by scheduling criteria
    • H04L47/625Queue scheduling characterised by scheduling criteria for service slots or service orders
    • H04L47/6275Queue scheduling characterised by scheduling criteria for service slots or service orders based on priority

Definitions

  • the embodiments of the present invention relate to computer technologies, and in particular, to a method and an apparatus for scheduling I/O requests.
  • the Linux operating system provides various I/O scheduling policies, such as noop, deadline, cfq, and row, for different business scenarios. For example, in some business scenarios, I/O is improved by combining I/O operations. speed.
  • these scheduling strategies provided by Linux systems still cannot guarantee the I/O response speed of critical applications (usually foreground applications) in the scenario of multi-application I/O concurrency, because non-critical applications (usually background applications) may A large number of I/O requests are generated, which traps the queue of the scheduler, causing the IO of critical applications to fail to execute in time.
  • the embodiment of the invention provides a method and a device for scheduling I/O requests, which are used to ensure the I/O response speed of key applications running on the terminal device to a certain extent.
  • an embodiment of the present invention provides a scheduling method for an I/O request, which may be implemented in an operating system as a functional module of an operating system, or may be implemented as a functional module independent of an operating system.
  • the method includes storing a plurality of received I/O requests into a plurality of queues, wherein each queue corresponds to at least one process group, one process group includes one or more processes, and the received I/O request And being sent to the queue corresponding to the process group to which the process corresponding to the I/O request belongs; the I/O request in the multiple queues is dispatched to the I/O device, where the same is sent.
  • the number of I/O requests from a queue with a higher priority is greater than the number of I/O requests from a queue with a lower priority. Further, the priority of a queue matches the characteristics of the process group corresponding to the queue.
  • the feature information of the process group includes importance information of the process group, and the priority of the queue corresponding to the process group with high importance is higher than that of the process group with low importance.
  • the importance information may include one or more included in the process group.
  • the degree of influence of the process on the user experience, the importance of the process group with a high degree of influence on the user experience is greater than the importance of the process group with a low impact on the user experience.
  • An I/O request is generally understood to be a request for input or output data sent by the upper layer of the memory to the memory, such as an I/O read request for reading data from the memory; and, for example, an I/O write request for writing to the memory. data.
  • the high and low priority levels are relative to the number of I/O requests. For example, if two queues A and B have a higher priority than B, the number of I/O requests from A in the same delivery process is greater than the I/O request from B. Quantity. It is not limited to how much A's priority is higher than B, and how much I/O requests are more than B. In addition, the embodiment of the present invention does not limit the priority of any two queues in multiple queues. For example, if there are three queues, the priority of the two queues may be the same. In addition, there may be multiple queues corresponding to the same process group.
  • the processes included in each process group are usually the processes of the application.
  • some types of I/O requests are created by kernel threads, not by application processes (or threads), so a separate queue can be further set up to store this type of I/O request, such as an asynchronous write request.
  • Kernel threads can be grouped by processes that do not participate in the application, and do not belong to any of the described process groups (so in this implementation, not all queues correspond to one process group); the kernel threads can also be divided into a single group.
  • a queue is a data structure that performs data processing on a first-in, first-out basis.
  • the specific implementation of a queue can be an array or a linked list.
  • the size or depth of a queue refers to the amount of data that can be stored in the queue, such as the number of I/O requests that can be stored. It is also possible that other data structures can implement the methods provided by the embodiments of the present invention.
  • a process group can also be called an application group in some implementations.
  • the process group or application group can be divided according to the running status of the process or application (such as foreground running or background running), the degree of influence of the process or application on the user experience, the importance of the process or application to the system, and so on. All processes under one application can be in the same group or in different groups.
  • the first step of the method provided by the embodiment of the present invention may also be: Multiple I/O requests are stored in multiple queues, where each queue corresponds to at least one application group, each application group contains one or more applications, and the received I/O requests are stored and generated. The queue corresponding to the application group to which the application of the I/O request belongs.
  • I/O requests can be obtained from all queues during the same delivery process, and I/O requests can be obtained from some of the queues.
  • the “process corresponding to the I/O request” is a process of creating the I/O request. For example, if an application wants to read data, a certain process of the application will call the system call. Through the system call, the process enters the kernel layer from the application layer (or user mode or user layer) (or called The file system layer of the kernel mode, the process finds the data to be read in the file system cache, and directly copies it into its own buffer, then exits the kernel layer and returns to the application layer. If not found, the process creates a read I/O request at the file system level and submits the read I/O request to the block device layer (referred to as the BLOCK layer).
  • the BLOCK layer block device layer
  • the process corresponding to the read I/O request is the process that created the read I/O request. Which priority process group the process belongs to, the BLOCK layer will issue the read I/O request according to which priority.
  • This correspondence of a process and an I/O request is sometimes simply referred to as a "process I/O request" when introducing an I/O request in this application.
  • the body that generates the I/O request is the application process, it is sometimes referred to as "X application generates I/O request" or "X application I/O request” when introducing the I/O request, in order to facilitate reading.
  • X stands for any application.
  • the priority of the queue is represented by a priority identifier, and the priority identifier of a queue is used to identify the priority of the queue, and the priority may be identified by a numerical value. The higher the value, the lower the priority of the queue (and vice versa). Of course, the priority can also be identified by other types of parameters.
  • the priority of the queue is represented by a weight, that is, each queue is configured with a respective weight value, and the weight of the queue with a higher priority is greater than the priority.
  • the weight value of the queue when an I/O request is issued, an I/O request is obtained from each queue according to the weight value of each queue.
  • X*a and X*b I/O requests are obtained from A and B respectively (* indicates multiplication).
  • the priority of multiple queues and the number of I/O requests are sent by setting the I/O request delivery ratio of multiple queues. For example, the ratio of I/O requests sent by queue A and queue B is 3:2, and then I/O requests are sent according to the ratio.
  • each queue must have an attribute that identifies the priority or weight of the queue, as long as the number of deliveries can be controlled to implement the I/O request of the important process.
  • the number of I/O requests that are issued is less than the number of non-critical processes.
  • Other implementations are not enumerated here.
  • the I/O request scheduling method stores an I/O request corresponding to a plurality of process groups of different priorities by setting a plurality of queues of different priorities, and then issuing an I/O request.
  • the I/O request sent by the high-priority process group is preferentially delivered according to the priority of the queue, and the processes in the high-priority process group correspond to the critical application, so that the I/O device can be prioritized.
  • Execute I/O requests for critical applications thereby avoiding congestion of I/O requests for a large number of non-critical applications to a certain extent, and ensuring I/O request response speed for critical applications.
  • the scheduling method of the I/O request further includes: acquiring configuration information, where the configuration information includes information for indicating a feature of the process group, according to any implementation manner of the foregoing aspect or the foregoing
  • the configuration information configures the priority of the multiple queues, where the priority of one queue matches the characteristics of the process group corresponding to the queue.
  • the method further includes: obtaining a corresponding number of I/O requests from the respective queues according to priorities of the respective queues, and then delivering the obtained I/O requests to a lower layer scheduler or a driving device. in.
  • the configuration information includes the importance information of the process group, and the priority of the queue corresponding to the process group with high importance is higher than the priority of the queue corresponding to the process group with low importance.
  • the importance information may include information on the degree of influence of one or more processes included in the process group on the user experience, and the process group having a high degree of influence on the user experience is more important than the user experience. The importance of a low process group.
  • the configuration information may be input by the user, that is, the configuration information is obtained through user input; or may be preset in the system, that is, the configuration information is read from a memory or other type of memory. Even if the configuration information is set in advance, it may change with the current situation of the system. This can adjust the weight of each queue or the proportion of I/O requests, so that I/O requests can be sent and processed. It is more in line with the current situation of the system, improving the efficiency of system resource utilization and improving the user experience.
  • scheduling of the I/O request also includes determining an I/O request response speed of one or more of the plurality of queues; adjusting a size of the other queues according to the I/O request response speed.
  • the size of the queue (or the depth of the queue) represents the total number of I/O requests the queue can store.
  • determining an I/O request response speed of the queue with the highest priority if the I/O request response speed is determined to be less than or equal to the first threshold, the size of one or more queues in the other queue is determined. lower.
  • the queue with the highest priority can be preset, that is, the I/O request response speed of which queue is monitored in advance is set in the system.
  • the response speed of some queue I/O requests in multiple queues will affect the size of other queues, and adjusting the size of other queues can adversely affect the I/O request response speed of the queues, thus achieving further adjustment.
  • the purpose of the I/O request response speed In particular, when the I/O request response speed of the critical queue (ie, the critical process group) is monitored, the purpose of ensuring the response speed of the I/O request of the critical queue can be further achieved, thereby effectively avoiding the sticking of key applications and improving user experience.
  • the first threshold is a preset speed threshold, which can be obtained through testing.
  • the speed threshold can be set to a minimum value that does not affect the user experience or the I/O request response speed that has less impact on the user experience.
  • determining an I/O request response speed of the queue with the highest priority if it is determined that the I/O request response speed is greater than the second threshold, adjusting the size of one or more queues in the other queue Big.
  • the implementation is similar to the implementation of the previous description and will not be described again.
  • the purpose of this implementation is to avoid excessive I/O request response times for critical applications and to balance the allocation of I/O resources between critical and non-critical applications.
  • the object determined in the above implementation manner may also be the response time of the I/O request of the queue with the highest priority, not the response speed of the I/O request.
  • the threshold can be set to a time threshold accordingly.
  • the number of I/O requests stored in the queue with the highest priority is determined; if it is determined that the number is less than or equal to the third threshold, the size of one or more queues in the other queue is increased.
  • the third threshold is an integer greater than or equal to 0, but is generally set to be small, for example, set to 5.
  • a condition may be further added on the basis of the implementation manner: determining that the number is less than or equal to the third threshold for a certain period of time, and then adjusting the size of the other queues.
  • the purpose of this implementation is to consider that even for critical applications, there may be no I/O requests or I/O requests for a period of time, and less use of I/O resources, resulting in no I/O resources.
  • the size of other non-critical queues can be increased to speed up the processing and processing of I/O requests of other non-critical applications, thereby improving the utilization of I/O resources.
  • any one or more of the first threshold, the second threshold, and the third threshold may be set in the system, that is, any one or more of the foregoing implementation manners may be implemented.
  • the two types of monitoring can be Interleaved to avoid conflicting results.
  • one of the results can be selected arbitrarily or according to the current system, and the size of the other queues is adjusted based on the result.
  • the speed of the I/O request response of the non-highest priority queue may also be determined in the above implementation manners, and the threshold is also adaptively adjusted, and then the size of other queues is adjusted according to the current demand. In addition, determining which queue's I/O request response speed can be preset or user-entered.
  • the embodiment of the present invention further provides an I/O request scheduling apparatus, including one or more modules that can implement the first aspect or any one of the foregoing first aspects.
  • an I/O request scheduling apparatus including one or more modules that can implement the first aspect or any one of the foregoing first aspects.
  • one module may implement one or more of the steps.
  • an embodiment of the present invention further provides a computer device, such as a terminal device.
  • the computer device includes a processor and a memory for storing a software program for reading a software program stored in the memory and implementing the method provided by the first aspect or any one of the foregoing first aspects .
  • the I/O request scheduling apparatus provided by the second aspect is implemented by software
  • the I/O request scheduling apparatus is also stored in the memory in the form of a software program, and the software program is read by the processor and implemented.
  • the processor can be a single core or a multi-core; the computer device can include one or more processors.
  • the type of the processor may be a Central Processing Unit (CPU), a Graphic Processing Unit (GPU) or other type of processor, or a plurality of processors of the same type or more.
  • CPU Central Processing Unit
  • GPU Graphic Processing Unit
  • the different types of processors cooperate to complete the method provided by the embodiments of the present invention.
  • the embodiment of the present invention further provides a computer storage medium, which may be non-volatile, that is, the content stored in the storage medium is not lost after the power is turned off.
  • the storage medium is for storing a software program that can be read by one or more processors to facilitate the one or more processors to implement the methods provided in any or all of the above embodiments.
  • the I/O request scheduling method stores an I/O request corresponding to a plurality of process groups of different priorities by setting a plurality of queues of different priorities, and then sends the I/O request.
  • the /O request preferentially delivers the I/O request sent by the high priority process group according to the priority of the queue, and the process in the high priority process group corresponds to the critical application, so that the I/O can be made.
  • the device can preferentially execute I/O requests of critical applications, so as to avoid congestion of I/O requests of a large number of non-critical applications to a certain extent, and ensure the response speed of I/O requests of critical applications.
  • the critical application is an application that has a great impact on the user experience
  • the I/O request of the application is processed in time, and the smoothness of the execution of the application is correspondingly improved, thereby improving the user experience.
  • FIG. 1 is a schematic structural diagram of a terminal device according to an embodiment of the present disclosure
  • FIG. 2 is a schematic diagram of a logical structure of an operating system according to an embodiment of the present invention.
  • FIG. 3 is a schematic diagram showing a further logical structure of the operating system provided in FIG. 2;
  • FIG. 4 is a schematic diagram of a principle of an I/O request scheduling method according to an embodiment of the present invention.
  • FIG. 5 is a schematic flowchart of an I/O request scheduling method according to an embodiment of the present invention.
  • FIG. 5b is a schematic flowchart of another I/O request scheduling method according to an embodiment of the present disclosure.
  • FIG. 6 is a schematic diagram of a logical structure of an I/O request scheduling apparatus according to an embodiment of the present invention.
  • FIG. 7 is a schematic diagram of a logical structure of another I/O request scheduling apparatus according to an embodiment of the present invention.
  • FIG. 8 is a schematic diagram of a logical structure of another I/O request scheduling apparatus according to an embodiment of the present disclosure.
  • FIG. 9 is a schematic diagram of a logical structure of another I/O request scheduling apparatus according to an embodiment of the present invention.
  • the scheduling method of the I/O request provided by the embodiment of the present invention is mainly applied to a terminal device, which may also be referred to as a user equipment (User Equipment, referred to as "UE"), and a mobile station (Mobile Station, referred to as "MS” for short.
  • UE User Equipment
  • MS Mobile Station
  • the terminal may have the ability to communicate with one or more core networks via a Radio Access Network (RAN), for example, the terminal may be a mobile phone (or "cellular" telephone), or a computer with mobile nature, for example, the terminal can also be a portable, pocket, handheld, computer built-in or vehicle-mounted mobile device.
  • RAN Radio Access Network
  • the terminal may be a mobile phone (or "cellular" telephone), or a computer with mobile nature, for example, the terminal can also be a portable, pocket, handheld, computer built-in or vehicle-mounted mobile device.
  • RAN Radio Access Network
  • the decoding method provided by the embodiment of the present invention can be applied to other types of computer equipment, such as
  • FIG. 1 is a schematic structural diagram of a terminal device according to an embodiment of the present invention.
  • the terminal device 100 includes a memory 180, a processor 150, and a display device 140.
  • the memory 180 generally includes two types: memory and external memory.
  • Memory includes random access memory (RAM), read only memory (ROM), and cache (CACHE).
  • External storage includes a disk, an embedded multimedia media card (eMMC), a non-volatile memory (Non-Volatile Memory, NVMe), and the like.
  • the memory 180 is used to store a computer program including an operating system program 182, an application 181, and the like.
  • the computer program is typically stored on external memory, and the processor 150 loads the computer program from external memory into memory before running the computer program.
  • the I/O request mentioned in the embodiment of the present invention is usually a read request or a write request that is sent to the external memory.
  • the processor 150 may include one or more processors.
  • the processor 150 may include one or more central processing units (CPUs), or include a central processing unit and a graphics processing unit (Graphic Processing Unit, GPU).
  • CPUs central processing units
  • GPU graphics processing unit
  • the processor 150 includes a plurality of processors, the plurality of processors may be integrated on the same chip, or may each be a separate chip.
  • a processor can include one or more processing cores.
  • the processor 150 is configured to read a computer program in the memory 180 and then execute a computer program defined method, for example, the processor 150 reads the operating system program 182 to run an operating system on the terminal device 100 (refer to FIG. 2) and implements the operation.
  • the operating system program 182 includes a computer program that can implement the scheduling method of the I/O request provided by the embodiment of the present invention. After the processor 150 reads the operating system program 182 and runs the operating system, the terminal device 100 can be provided.
  • the I/O request scheduling function provided by the embodiment of the present invention ensures the I/O response speed of the critical application running on the terminal device 100 to a certain extent, and improves the operation experience of the user who applies the terminal device 100.
  • the display device 140 includes a display panel 141 for displaying information input by the user or information provided to the user, and various menu interfaces of the terminal device 100, etc., which may be used to display an application in order to receive the user-to-application in the embodiment of the present invention. The operation, which leads to the generation of I/O requests.
  • the display device 140 can include a display panel 141. Alternatively, an LCD (Liquid Crystal Display) or an OLED (Organic) can be used.
  • the display panel 141 is configured in the form of a Light-Emitting Diode or the like.
  • the terminal device 100 further includes an input device 130 for receiving input digital information, character information or contact touch/contactless gestures, and generating user settings and function control related to the terminal device 100.
  • the input device 130 may include a touch panel 131.
  • the touch panel 131 also referred to as a touch screen, can collect touch operations on or near the user (such as a user using a finger, a stylus, or the like on the touch panel 131 or near the touch panel 131. Operation), and drive the corresponding connecting device according to a preset program.
  • the touch panel 131 may include two parts: a touch detection device and a touch controller.
  • the touch detection device detects the touch orientation of the user, and detects a signal brought by the touch operation, and transmits the signal to the touch controller; the touch controller receives the touch information from the touch detection device, converts the touch information into contact coordinates, and sends the touch information.
  • the processor 150 is provided and can receive commands from the processor 150 and execute them. For example, the user clicks on the application icon of the photographing application with the finger on the touch panel 131, the touch detection device detects the signal brought by the click, and then transmits the signal to the touch controller, and the touch controller transmits the signal again.
  • the conversion to coordinates is sent to the processor 150, and the processor 150 performs an opening operation on the photographing application according to the coordinates and the type of the signal (click).
  • the touch panel 131 can be implemented in various types such as resistive, capacitive, infrared, and surface acoustic waves. In current mainstream terminal devices, the touch panel 131 is generally overlaid on the display panel 141 to form a touch display screen.
  • the input device 130 may further include other input devices 132.
  • the other input devices 132 may include, but are not limited to, a physical keyboard, function keys (such as volume control buttons, switch buttons, etc.), trackballs, mice, joysticks, and the like. One or more of them.
  • the terminal device 100 may further include a power source 190 for supplying power to other modules and a camera 160 for taking a photo or video.
  • the terminal device 100 may also include one or more sensors 120, such as acceleration sensors, light sensors, and the like.
  • the terminal device 100 may further include a radio frequency (RF) circuit 110 for performing network communication with the wireless network device, and may further include a WiFi module 170 for performing WiFi-based communication with other devices.
  • RF radio frequency
  • the I/O scheduling of the terminal device is generally implemented in the operating system (ie, the aforementioned operating system program 182).
  • the embodiment of the present invention provides an improvement on the existing I/O scheduling method in the operating system. It should be noted that, when the method of the embodiment of the present invention is implemented by software, the software is stored in the memory 180, and the processor 150 implements the method provided by the embodiment of the present invention by reading the software stored in the memory 180. Other devices than processor 150 and memory 180 in FIG. 1 are generally optional for embodiments of the present invention.
  • FIG. 2 is a schematic diagram of a logical structure of an operating system applied to an I/O scheduling method.
  • the embodiment of the present invention uses an Android operating system as an example.
  • FIG. 2 can also be regarded as a schematic diagram of the logical structure of the terminal device after the operating system program 182 and the application program 181 in FIG. 1 are run on the terminal device.
  • the operating system 200 includes a framework layer 210, a core library layer (referred to as a kernel layer) 220, and a driver layer 230.
  • applications running on the operating system 200, such as a photo application, a media player, and a browser. These applications generate I/O requests at the operating system layer 200 by the application process or thread at runtime. These I/O requests are eventually sent to the hardware layer's memory. For example, in order to implement the action of "storing photos into memory" for the photo application, the process of the photo application enters the kernel layer from the application layer through a system call, and then the process creates an I/O write request at the kernel layer, the I/O write request.
  • the I/O request can also be an I/O read request for reading data stored on the memory, such as opening a saved photo.
  • other types of hardware are also included in the hardware layer, such as a processor, an input device, a display device, etc., as shown in FIG. 1, which is not repeatedly shown in FIG.
  • the kernel layer 220 includes a virtual file system layer (VFS) 221, a file system layer 222, and a block device layer (abbreviated as BLOCK layer) 223.
  • the mainstream file systems include Flash Friendly File System (F2FS), Fourth Extended File System (EXT4), and Log File System (such as XFS).
  • the drive layer 230 may include a disk drive, an embedded multimedia media card (eMMC) drive, a non-volatile memory (NVM) drive, and a central processing unit (CPU) drive. , respectively, used to drive their respective hardware.
  • eMMC embedded multimedia media card
  • NVM non-volatile memory
  • CPU central processing unit
  • an application's process generates an I/O request at file system layer 222, which then submits the I/O request to BLOCK layer 223.
  • the process submits the request itself to the driver layer 230 (and possibly to the kernel thread), and then the process encapsulates the memory into a command that can be executed, sends it to the memory, and then returns and Wait for the I/O request execution to end.
  • the command submitted to the memory will be retrieved and processed by the controller of the memory.
  • the memory will send an electrical signal (interrupt signal) to the CPU.
  • the CPU will execute the interrupt handler to wake up the process, the process. After being awakened, copy the data to its own buffer, then exit the kernel layer and return to the application layer.
  • a process or thread (not limited to an application process or thread) is the execution subject of the software method, but for ease of reading, "a layer receives or issues an I/O request" appears below the application. The description will be understood by those of ordinary skill in the art to mean that a process or thread receives or issues an I/O request at this layer.
  • the BLOCK layer 223 stores I/O requests of all applications in a single queue manner, that is, all application I/O requests are stored in the same queue, and then these I/O requests are serially sent to corresponding
  • the driver may also be sent to a scheduling layer, sent to the driver through the scheduling layer), so that when some non-critical applications always generate a large number of I / O requests, it will lead to a large number of non-critical applications in this queue for a long time.
  • the I/O request causes the I/O request of the critical application to be delivered too slowly, causing the critical application to be stuck and affecting the user experience of the terminal device.
  • the embodiment of the present invention provides a function of I/O request packet management in the BLOCK layer 223, which is embodied as an I/O request scheduling device 2231 in this embodiment, and a scheduling method for providing I/O requests by the device. , group scheduling I/O requests.
  • the device 2231 may be an improvement of the prior art original I/O scheduling device (or referred to as a module), or may be a device newly added based on the scheduling device provided by the prior art.
  • the specific implementation of the I/O request scheduling device 2231 can be implemented as one module, or multiple modules that cooperate with each other.
  • the I/O request scheduling device 2231 includes at least two queues: a critical queue and a non-critical queue. Key and non-critical queues store I/O requests for critical applications (referred to as critical I/O requests) and I/O requests for non-critical applications (referred to as non-critical I/O requests).
  • the I/O request scheduling device 2231 schedules the I/O requests stored in the queues according to the importance of the applications corresponding to the queues, thereby controlling the delivery of the I/O requests. For example, due to The priority of the key queue is higher than that of the non-critical queue.
  • the ratio of the I/O request of the key queue in the issued I/O request and the I/O request of the non-critical queue is A:B (it can be seen as setting 2) I/O delivery bandwidth), where A is greater than B, A and B can be considered as the weight of the critical queue and non-critical queue; then the I/O request is issued according to the ratio.
  • I/O request scheduling device 2231 can only obtain the I/O request from the non-critical queue and deliver it to the non-critical queue each time the I/O request is sent. In memory. After this period of time, the memory is all non-critical I/O requests to be processed, and the I/O requests of critical applications are forced to wait for a long time, resulting in I/O request response for non-critical applications. The speed is too slow.
  • the I/O request scheduling device 2231 can also monitor the response speed of the I/O request of the critical queue, and if it is determined that the I/O request response speed of the critical queue is too low, then at least The queue depth of a non-critical queue to reduce the number of I/O requests it can store.
  • the I/O request response speed of the critical queue is detected to be too low, it is determined that the above situation may occur.
  • the I/O request of some non-critical applications is timely by reducing the queue depth of the non-critical queue. Blocking on the BLOCK layer, that is, the I/O request of non-critical applications will enter the sleep waiting state. It takes time to wait for the sleep to restart, so the speed of the non-critical application I/O requests from the BLOCK layer to the non-critical queue is It will slow down, it is possible that non-critical queues are empty, and I/O requests for non-critical applications have not yet been reached, thereby gradually reducing non-critical I/O requests pending in memory and increasing memory for critical I/O requests. The possibility of processing, which in turn increases the response speed of I/O requests for critical applications.
  • the depth of the non-critical queue may be gradually increased.
  • the so-called “gradual" increase can be achieved by increasing the fixed value or a specific multiple each time the above conditions are met. For example, when the I/O request response speed of the critical queue is determined to be greater than the preset value for the first time, the depth of at least one non-critical queue is increased by 5 (5 I/O requests can be stored), and the critical queue is detected after a period of time.
  • the depth of the non-critical queue is further increased by 5, which of course can also increase the depth of other non-critical queues that have not been increased in depth.
  • the above preset value can be fixed or can be reset according to the current situation of the system. The specific implementation manners are various and will not be described here.
  • the method for monitoring the I/O request response speed and adjusting the queue depth in time may also be used separately. This method does not depend on the method of setting the I/O delivery ratio according to the weight.
  • the I/O request scheduling device 2231 can perform the I/O request when delivering the I/O request of the critical application (ie, the I/O request stored in the critical queue). Adding a flag to indicate that the I/O request is an I/O request of a critical application, so that the driving device (or scheduler) of the driving layer 230 (refer to FIG. 2) that receives the I/O request can According to this flag, the I/O request is identified as an I/O request of the critical application, and the I/O request of the critical application is preferentially submitted to the next device.
  • a device is generally a memory (refer to FIG.
  • the kernel layer also includes a scheduling layer, or a scheduler, so that the I/O request scheduling device 2231 issues the I/O request to the scheduling first.
  • the I/O request is further scheduled by the scheduler, for example, to identify the I/O request of the critical application, and then send the I/O request to the driver device of the driver layer, and the I/O is driven by the driver device.
  • the request is submitted to the memory.
  • the number of the application group, the number of the queues, and the multiple applications are grouped, which may be set according to the situation of the terminal device or the user requirements. Make a limit.
  • the application grouping is typically implemented at the framework layer 210 (see Figure 2), and the packet results are then provided to the kernel's BLOCK layer for use.
  • the application grouping can be changed. For example, an application originally running in the background belongs to the non-critical application group. When the foreground switching event of the application is detected, the application is switched to the foreground, and the application is re-divided. Go to the key application group.
  • FIG. 4 is a schematic diagram of an implementation of an I/O request scheduling method according to an embodiment of the present invention. This method is implemented by the aforementioned I/O request scheduling means 2231. In other implementations, other modules of the operating system may also be implemented.
  • an application is divided into three groups according to the degree of influence on the user experience, and the group 1 includes an application running in the foreground (hereinafter referred to as a foreground application), a system service, and an application running in the background.
  • a foreground application an application running in the foreground
  • a system service an application running in the background
  • background application user-sensitive applications (such as music playback applications)
  • group 2 includes background applications that are not user-sensitive
  • group 3 includes background applications that users do not perceive.
  • user experience sensitivity and insensitivity may be further refined to the level of sensitivity, and based on such considerations, the application may be divided into more than three groups. In other embodiments, the application may also be divided into only two groups, the two groups respectively including the foreground application and the background application; or the application is divided into two groups, one group includes the application of the group 1 above, and the other includes the above group. 2 and group 3 applications.
  • Group 1, Group 2, and Group 3 are divided according to the degree of influence of the application on the user experience, since one application may have multiple processes, the three groups contain the applications included in each group. Process, so it can also be called a process group. In some other embodiments, different processes of the same application may also be divided into different process groups. In this implementation, the name "process group" is more suitable than the "application group”.
  • the kernel when the Android system is initialized, the kernel generates three queues corresponding to the three groups according to the above three groups: queue 1, queue 2, and queue 3 (S301), which are respectively used for the storage group 1. I/O requests for applications in groups 2 and 3. Then, the kernel initializes the I/O request scheduling means 2231 (S302), and the configuration of the configuration parameter completion scheduling policy is read by the I/O request scheduling means 2231 (S303).
  • the configuration parameters may include the respective weights of the above three queues or the proportion of I/O requests sent by three queues, the queue depth value that needs to be promoted or lowered each time, and the I/ corresponding to queue 1 (or other critical queues). O response time threshold.
  • the configuration parameters may be temporarily input by the user or may be preset in the system. If there are multiple configuration parameters, you can get them at the same time, or you can get them when you need them.
  • the I/O request scheduling device 2231 After the configuration of the scheduling policy is completed, the I/O request scheduling device 2231 performs the issuance of the I/O request according to the scheduling policy (S304).
  • the ratio of I/O requests sent by queue 1, queue 2, and queue 3 is 3:2:1, and the initial depth of each queue is 32.
  • the depth value that needs to be reduced or increased each time is the current depth of the queue. 1/2 of the value, corresponding to queue 1
  • the response time threshold is milliseconds.
  • M is usually determined by the processing capability of the memory
  • a process or thread
  • M is separately from the queue 1
  • the queue 2 Obtain M*1/2, M*1/3, and M*1/6 I/O requests in queue 3 and then the thread sends the obtained M I/O requests to the lower scheduler or Drive the device.
  • the scheduler can also create or change the order of the M I/O requests according to a specific scheduling policy, and then deliver the M I/O requests to the driving device. The scheduler will not be described here.
  • the weight value of each queue is combined to calculate the number of I/O requests that should be obtained from each queue, and then the I/O request is delivered.
  • the weights of the three queues are different, that is, the priorities of the three queues are different, but in other implementations, when there are three or more queues, two of them may be allowed. Or more than two queues have the same priority.
  • the depth and priority of the queue may change, and the previously different queue depths or priorities may become the same, and the original same queue depth or priority may become different.
  • the number of I/O requests processed per unit of memory is an inherent property of the memory, and the memory in the terminal device is usually fixed, so the number of I/O requests processed per unit time (which can also be called I/O bandwidth). It is fixed. In other words, the number of I/O requests sent per unit time is also fixed. Therefore, increasing the ratio of I/O requests issued for important applications means increasing the I/I issued per unit time.
  • the number of I/O requests for important applications in the O request that is, the number of I/O requests that are processed by the critical application is increased per unit time, thereby improving the processing efficiency of important application I/O requests and avoiding to some extent.
  • the I/O request scheduling device 2231 also detects the I/O request response time of the queue 1 (because the queue 1 is a critical queue) (S305) .
  • This detection can be event triggered or periodic.
  • the foregoing "event” may be an event triggered by the user to actively report the stuck after the card is found, or may be an event that is triggered after the system automatically detects the occurrence of the jamming phenomenon in the important application, or other, which is not limited in the embodiment of the present invention.
  • the I/O request response time of the queue 1 can be obtained by: the I/O request scheduling device 2231 obtaining the response time of the current I/O request in the queue 1 as the I/O request response time of the queue 1; or Record the response time of multiple I/O requests over a period of time, and calculate the average response time of these I/O requests, which is used as the I/O request response time of queue 1.
  • the depth of the queue 2 is decreased and/or the depth of the queue 3 is decreased (S306), the depth of the queue 3 is preferentially lowered, or both are reduced but the queue 3 is The depth is reduced larger than that of queue 2.
  • the “decrease depth” may be that the depth is directly halved or decreased by a certain value each time.
  • the value may be configured by the user or set to a default value each time the value needs to be lowered, and the value may be changed even if the value is set. of.
  • the depth of the queue 2 is increased and/or the depth of the queue 3 is increased (S307), and the depth of the queue 2 is preferentially increased, or Both are increased but the depth of queue 2 is increased larger than that of queue 3.
  • the I/O request scheduling device 2231 detects that the number of I/O requests or I/O requests in the queue 1 does not exist for a long time is lower than a certain threshold (for example, the number is maintained) In the case of 2 or less, the depth of queue 2 and/or queue 3 can be increased once every fixed time.
  • a certain threshold for example, the number is maintained
  • the depth of queue 2 and/or queue 3 can be increased once every fixed time.
  • the I/O request response time of the critical queue is gradually restored, thereby improving the response speed of the key applications corresponding to the critical queue, namely, the foreground application, the system service, and the background application sensitive to the user experience. Improve the user experience.
  • the critical queue I/O request response time is small (that is, the response speed is fast) or there is no (or very few) I/O requests in the critical queue, the depth of the non-critical queue is gradually increased, thereby ensuring that critical applications are not needed.
  • other applications can use the remaining I/O resources to avoid wasting I/O resources and improve the utilization of system I/O resources.
  • the queue and the application group may not be one-to-one, that is, one application group may correspond to multiple queues.
  • the I/O request scheduling method described above is implemented by which process or thread in a specific implementation, and may be implemented according to a specific situation at the time of code writing, and the implementation manner is various, which is not specifically limited in the embodiment of the present invention.
  • FIG. 6 is a schematic diagram of a logical structure of an I/O request scheduling apparatus according to an embodiment of the present invention.
  • the I/O request scheduling device 400 includes a storage unit 410 and a delivery unit 420.
  • the storage unit 410 is configured to store the received multiple I/O requests into multiple queues, for example, into multiple queues.
  • One queue corresponds to at least one process group, each process group includes one or more processes, and each received I/O request is stored in a queue corresponding to the process group to which the process corresponding to the I/O request belongs. in.
  • the issuing unit 420 is configured to send an I/O request in the multiple queues to the I/O device, where the number of I/O requests from the queue with higher priority in the same delivery process is greater than The number of I/O requests for queues with low priority. Further, the priority of a queue matches the characteristics of the process group corresponding to the queue.
  • the I/O request scheduling apparatus 400 may further include a configuration information acquiring unit 430 and a priority configuration unit 440.
  • the configuration information acquiring unit 430 is configured to acquire configuration information, where the configuration information includes information indicating a feature of the process group.
  • the priority configuration unit 440 is configured to configure a priority of the multiple queues according to the configuration information, wherein a priority of a queue matches a feature of a process group corresponding to the queue.
  • the sending unit 420 obtains a corresponding number of I/O requests from the respective queues according to the priorities of the respective queues configured by the 440, and performs a delivery operation.
  • the configuration information includes the importance information of the process group (that is, the importance information of the application included in the process group), and the higher the importance of the process group corresponding to one queue, the higher the priority of the queue.
  • the importance information may include information on the degree of influence of one or more processes included in the process group on the user experience, and the higher the degree of influence on the user experience, the higher the importance of the process group.
  • the so-called impact on the user experience is actually how much impact the user can feel if the process or application is stuck.
  • the foreground application is generally considered to be an application that is visible to the user, so if a card is present, the default user can feel it.
  • the user may define the importance of each application according to the above description, and set the application group according to the importance of each application, and determine the configuration information of the queue corresponding to the group according to the application group and input the configuration. Information to configure the priority of the corresponding queue.
  • the operating system can monitor changes in the importance of the application or process (eg, a process moves from the foreground to the background) to adjust the application's grouping at the appropriate time.
  • the operating system monitors and collects information about the application or process, such as whether it is located in the foreground or the background, whether there is a voice action, etc., determines the importance of the application according to the information, implements grouping of the application, and determines according to the grouping of the application.
  • the configuration information of the queue corresponding to the packet is transmitted to the I/O request scheduling device provided by the embodiment of the present invention, and the device configures the priority of the queue according to the configuration information.
  • the I/O request scheduling apparatus 400 may further include a response speed determining unit 450 and an adjusting unit 460.
  • a response speed determining unit 450 is configured to determine an I/O request response speed of one or more of the plurality of queues.
  • the adjusting unit 460 is configured to adjust the size of the other queue according to the I/O request response speed.
  • the response speed determining unit 450 is configured to determine the response speed of the I/O request in the queue corresponding to the more important process group, such as the I/O request response speed of the queue 1 with the highest priority mentioned above.
  • the size of the other queue or its own size is adjusted in time to change the I/O request response speed of the queue. Specifically, if the I/O request response speed of the queue with the highest priority is determined to be less than or equal to the first threshold, the size of one or more queues in the other queue is reduced, thereby improving the response speed of the I/O request; If the I/O request response speed of the queue with the highest priority is determined to be greater than (or equal to) the second threshold, the size of one or more queues in the other queue is increased, thereby improving the I/O response speed of other queues. Balance the use of I/O resources. Further, as shown in FIG.
  • the I/O request scheduling apparatus 400 may further include a quantity determining unit 450 for determining the number of I/O requests stored in the queue with the highest priority; if the quantity determining unit 450 determines the quantity If it is less than or equal to the third threshold, the adjusting unit 440 is configured to increase the size of one or more queues in the other queues. That is to say, when the number of I/O requests of the application with high priority is small, even when it is 0, that is, when the occupied I/O resources are small or do not occupy I/O resources, the other priorities are lower than him.
  • the size of the queue allows I/O requests of lower priority queues to consume more I/O resources, thereby increasing the utilization of I/O resources.
  • the device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separate, and the components displayed as units may or may not be physical units, ie may be located A place, or it can be distributed to multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the embodiment.
  • the connection relationship between the modules indicates that there is a communication connection between them, and specifically, one or more communication buses or signal lines can be realized.
  • the drawing device can be implemented by means of software plus necessary general hardware, and of course, the dedicated hardware can also include an ASIC. , dedicated CPU, dedicated memory, dedicated components, etc. to achieve.
  • functions performed by computer programs can be easily implemented with the corresponding hardware, and the specific hardware structure used to implement the same function can be various, such as analog circuits, digital circuits, or dedicated circuits. Circuits, etc.

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Telephonic Communication Services (AREA)
  • Stored Programmes (AREA)
  • Computer And Data Communications (AREA)

Abstract

一种I/O请求的调度方法和装置,该方法包括将接收到的多个I/O请求存储到多个队列中,其中,每个队列对应至少一个进程组,每个进程组中包含一个或多个进程,且接收到的I/O请求被存储到与该I/O请求对应的进程所属的进程组对应的队列中;向I/O设备下发所述多个队列中的I/O请求,其中,同一次下发过程中来自于优先级高的队列的I/O请求的数量多于来自于优先级低的队列的I/O请求的数量。通过该方法提高关键应用或进程的I/O响应速度。

Description

I/O请求的调度方法及装置
本申请要求于2016年11月2日提交中国专利局、申请号为201610951240.9、申请名称为“I/O请求的调度方法及装置”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本发明实施例涉及计算机技术,尤其涉及一种I/O请求的调度方法和装置。
背景技术
当前的移动终端大多采用了支持多任务的操作系统,当用户在进行前台操作的同时,后台也可以运行其他的应用,例如音乐播放或网络下载等。如果后台的某个应用对应的I/O(input/output)操作请求(简称为I/O请求)比较频繁,必然会占用大量的I/O资源。但由于计算机系统的I/O资源有限,此时若前台应用需要执行I/O操作,则该IO操作必然会因后台应用的IO资源占用过多而导致响应速度变慢,体现到用户那里,就会出现前台应用打开慢或操作卡顿等现象,严重影响到前台应用的用户体验。
Linux操作系统提供了noop,deadline,cfq和row等各种I/O调度策略,供不同的业务场景进行选择,例如,在某些业务场景下通过合并I/O操作提升整个系统的I/O速度。但是,Linux系统提供的这些调度策略仍然无法保障在多应用I/O并发的场景下关键应用(一般是前台应用)的I/O响应速度,因为非关键应用(一般是后台应用)有可能会产生大量I/O请求,拥塞住调度器的队列,导致关键应用的IO没法及时执行。
发明内容
本发明实施例提供一种I/O请求的调度方法及装置,用以一定程度上保证终端设备上运行的关键应用的I/O响应速度。
第一方面,本发明实施例提供一种I/O请求的调度方法,该方法可以实现在操作系统中,作为操作系统的一个功能模块,也可以实现为一个独立于操作系统的功能模块。该方法包括将接收到的多个I/O请求存储到多个队列中,其中,每个队列对应至少一个进程组,一个进程组中包含一个或多个进程,且接收到的I/O请求被存储到与所述I/O请求对应的进程所属的进程组对应的队列中;向I/O设备下发(dispatch)所述多个队列中的I/O请求,其中,同一次下发过程中来自于优先级高的队列的I/O请求的数量多于来自于优先级低的队列的I/O请求的数量。进一步的,一个队列的优先级与该队列对应的进程组的特征匹配。
基于第一方面,在一些实现方式下,该进程组的特征信息包括进程组的重要性信息,并且与重要性高的进程组对应的队列的优先级高于与重要性低的进程组对应的队列的优先级。进一步的,所述重要性信息可以包括所述进程组中包含的一个或多个进 程对用户体验的影响程度信息,对用户体验的影响程度高的进程组的重要性大于对用户体验的影响程度低的进程组的重要性。
I/O请求一般理解为存储器的上层向存储器发送的输入或输出数据的请求,例如I/O读请求用于从存储器中读取数据;再例如I/O写请求用于向存储器中写入数据。
优先级的高和低与I/O请求数量的多少是相对的概念。举例来说,两个队列A和B,A的优先级高于B的优先级,则同一次下发过程中来自于A的I/O请求的数量多于来自于B的I/O请求的数量。并不限定A的优先级比B高多少,I/O请求的数量比B多多少。另外,本发明实施例并不限定多个队列中任意两个队列的优先级均不相同,例如若有三个队列,其中两个队列的优先级也可以相同。另外,同一个进程组对应的队列也可能是多个。
各个进程组中包括的进程通常是应用的进程。另外,有些类型的I/O请求是内核线程创建的,而非应用的进程(或线程)创建的,因此可以进一步设置一个单独的队列存储这种类型的I/O请求,例如异步写请求。内核线程可以不参与应用的进程分组,不属于任意一个所述的进程组(所以在此种实现方式下并非所有队列均对应一个进程组);也可以将该内核线程划分为一个单独的组。
队列是一种以先入先出为原则进行数据处理的数据结构,队列的具体实现方式可以为数组或链表等。队列的大小或深度指的是队列中可存储的数据的数量,例如可存储的I/O请求的数量。若是其他数据结构能够实现本发明实施例提供的方法也可以。
进程组在某些实现方式下也可以称之为应用组。进程组或应用组的划分依据可以是进程或应用的运行状态(例如前台运行或后台运行)、进程或应用对用户体验的影响程度、进程或应用对系统的重要程度等。一个应用下的所有进程可以在同一个组中,也可以在不同的组中。当意图设置同一个应用的所有进程在同一个组中时,也可以直接按照应用进行分组,在这种实现方式下,本发明实施例提供的方法的第一个步骤也可以为:将接收到的多个I/O请求存储到多个队列中,其中,每个队列对应至少一个应用组,每个应用组中包含一个或多个应用,且接收到的I/O请求被存储到与产生该I/O请求的应用所属的应用组对应的队列中。
同一次下发过程中可以从所有队列中获取I/O请求,也可以从其中的部分队列中获取I/O请求。
基于第一方面,在一些实现方式下,所述“I/O请求对应的进程”为创建该I/O请求的进程。例如,一个应用要读取数据,该应用的某个进程就会调用系统调用,通过系统调用,该进程就从应用层(或称之为用户态或用户层)进入内核层(或称之为内核态)的文件系统层,该进程在文件系统的缓存中查找要读取的数据,查到了就直接拷贝到自己的buffer中,然后退出内核层,回到应用层。若没有查到,该进程就在文件系统层创建一个读I/O请求,并将该读I/O请求提交到块设备层(简称BLOCK层)。这种情况下,与该读I/O请求对应的进程就是创建该读I/O请求的这个进程。这个进程属于哪个优先级的进程组,BLOCK层就将该读I/O请求按照哪种优先级下发。在本申请中在介绍I/O请求时有时将进程与I/O请求的这种对应简称为“进程的I/O请求”。虽然产生I/O请求的主体是应用的进程,但在介绍I/O请求时为了便于阅读,有时也称为“X应用产生I/O请求”或“X应用的I/O请求”,其中X表示任意应用。
基于第一方面或以上任意一种实现方式,在一些实现方式下,队列的优先级用优先级标识表示,一个队列的优先级标识用于标识该队列的优先级,优先级可以用数值标识,数值越高,队列的优先级越低(反之亦可),当然优先级也可以用其他类型的参数标识。
基于第一方面或以上任意一种实现方式,在另一些实现方式下,队列的优先级用权重表示,即为各个队列配置各自的权重值,优先级高的队列的权重值大于优先级低的队列的权重值。具体的,下发I/O请求的时候根据各个队列的权重值分别从各个队列获取I/O请求。例如上述队列A和B的权重分别为a和b,其中a和b均小于1且大于0,且a大于b,以及a+b=1。一次下发过程需要下发X个I/O请求,则从A和B分别获取X*a和X*b个I/O请求(*表示乘法)。
基于第一方面或以上任意一种实现方式,在其他一些实现方式下,多个队列的优先级以及I/O请求的下发数量通过设置多个队列的I/O请求下发比例来实现。例如设置队列A和队列B的I/O请求下发比例为3:2,然后根据该比例下发I/O请求。
通过上述列举的实现方式可以看出,本发明实施例并不限定每个队列必须具有一个标识该队列优先级或权重的属性,只要能控制下发数量以实现重要进程的I/O请求下发数量较非重要进程的I/O请求下发数量多即可。其他实现方式在此不再枚举。
可见,本发明实施例提供的I/O请求的调度方法,通过设置多个不同优先级的队列,分别存储多个不同优先级的进程组对应的I/O请求,然后在下发I/O请求时根据队列的优先级有目的性的优先下发高优先级的进程组发送的I/O请求,而高优先级的进程组里的进程对应着关键应用,这样可使得I/O设备可优先执行关键应用的I/O请求,从而一定程度上避免了大量非关键应用的I/O请求拥塞,保证了关键应用的I/O请求响应速度。
基于第一方面或以上任意一种实现方式,在一些实现方式下,该I/O请求的调度方法还包括:获取配置信息,该配置信息包括用于表示进程组的特征的信息;根据所述配置信息配置所述多个队列的优先级,其中,一个队列的优先级与该队列对应的进程组的特征匹配。进一步的,该方法还包括:根据所述各个队列的优先级从所述各个队列中获取到相应数量的I/O请求,然后将获取到的I/O请求下发到下层调度器或驱动设备中。
在一些实现方式下,该配置信息包括进程组的重要性信息,并且与重要性高的进程组对应的队列的优先级高于与重要性低的进程组对应的队列的优先级。进一步的,所述重要性信息可以包括所述进程组中包含的一个或多个进程对用户体验的影响程度信息,对用户体验的影响程度高的进程组的重要性大于对用户体验的影响程度低的进程组的重要性。
配置信息可以是用户输入的,即通过用户输入获取配置信息;也可以是在系统中预先设置的,即从内存或其他类型的存储器中读取该配置信息。即便是预先设置的配置信息,也可能随着系统的当前情况发生变化,这种可以及时调整各个队列的分权重或I/O请求的下发比例,从而使得I/O请求的下发和处理更加符合系统当前的情况,提升系统资源使用效率,提高用户体验。
基于第一方面或以上任意一种实现方式,在一些实现方式中,该I/O请求的调度 方法还包括:确定所述多个队列中一个或多个队列的I/O请求响应速度;根据所述I/O请求响应速度调整其他队列的大小。队列的大小(或称之为队列的深度)表示队列能够存储的I/O请求的总数量。
在一些实现方式下,确定优先级最高的队列的I/O请求响应速度;若确定所述I/O请求响应速度小于或等于第一阈值,则将其他队列中的一个或多个队列的大小调小。这里优先级最高的队列可以是预先设置的,即系统中预先设置监测哪个队列的I/O请求响应速度。
也就是说,多个队列中部分队列I/O请求响应速度会影响其他队列的大小,而通过调整其他队列的大小可以反过来影响该部分队列的I/O请求响应速度,这样达到了进一步调整I/O请求响应速度的目的。尤其是当监测的是关键队列(即关键的进程组)的I/O请求响应速度时,可以进一步达到保证关键队列的I/O请求响应速度的目的,从而有效避免关键应用的卡顿,提升用户体验。
具体的,该第一阈值为预先设置的一个速度阈值,可以通过测试获得。例如该速度阈值可以设置为不影响用户体验或对用户体验影响较小的I/O请求响应速度的最小值。
在另一些实现方式下,确定优先级最高的队列的I/O请求响应速度;若确定所述I/O请求响应速度大于第二阈值,则将其他队列中的一个或多个队列的大小调大。实现和之前叙述的实现方式类似,不再赘述。
这种实现方式的目的是避免关键应用的I/O请求响应速度过快,平衡I/O资源在关键应用和非关键应用之间的分配。
以上实现方式中确定的对象也可以是优先级最高的队列的I/O请求的响应时间,而非I/O请求的响应速度。在这种实现方式下,阈值可以相应设置为时间阈值。
再一些实现方式下,确定优先级最高的队列中存储的I/O请求的数量;若确定所述数量小于或等于第三阈值,则将其他队列中的一个或多个队列的大小调大。该第三阈值为大于或等于0的整数,但一般设置的较小,例如设置为5。
进一步的,也可在这种实现方式的基础上再增加一个条件:确定数量小于或等于第三阈值的状态持续一定的时间,然后再调整其他队列的大小。这种实现方式的目的是考虑到即便是关键应用,也可能存在一段时间内无I/O请求或I/O请求较少,对I/O资源的使用就较少,使得I/O资源没办法充分利用,通过调大其他非关键队列的大小,就可以加快其他非关键应用的I/O请求的下发和处理,从而提高I/O资源的利用率。
系统中可以设置第一阈值、第二阈值和第三阈值中的任意一个或多个,即这几种实现方式可以实现其中的任意一种或多种。
值得注意的是,当系统中设置了监控优先级最高的队列的I/O请求响应速度(或时间)和监控优先级最高的队列中存储的I/O请求的数量时,这两种监控可以交错进行,以免出现结果冲突。当没有交错设置出现冲突时,可以任意选择或根据当前系统的情况选择其中一种结果,以该结果为基础调整其他队列的大小。
以上几种实现方式中确定的也可以是非最高优先级的队列的I/O请求响应速度或数量,阈值也做适应性调整,然后再根据当下的需求调整其他队列的大小。另外,确定哪个队列的I/O请求响应速度,可以是预先设置的,也可以是用户输入的。
第二方面,本发明实施例还提供一种I/O请求调度装置,包括可实现第一方面或上述第一方面的任意一种实现方式的一个或多个模块。当该I/O请求调度装置包括多个模块时,一个模块可实现其中的一个或多个步骤。
第三方面,本发明实施例还提供一种计算机设备,例如终端设备。该计算机设备包括处理器和存储器,该存储器用于存储软件程序,该处理器用于读取所述存储器中存储的软件程序并实现第一方面或上述第一方面的任意一种实现方式提供的方法。另外,当第二方面提供的I/O请求调度装置通过软件实现时,该I/O请求调度装置也会以软件程序的形式存储在该存储器中,由该处理器读取该软件程序并实现该I/O请求调度装置的功能。该处理器可以为单核也可以为多核;该计算机设备中可以包括一个或多个处理器。处理器的类型可以是中央处理器(Central Processing Unit,CPU),也可以是图形处理器(Graphic Processing Unit,GPU)或其他类型的处理器,当然也可以是多个同类型的处理器或多个不同类型的处理器协同完成本发明实施例提供方法。
第四方面,本发明实施例中还提供一种计算机存储介质,该存储介质可以是非易失性的,即该存储介质中存储的内容在断电后内容不丢失。该存储介质用于存储软件程序,该软件程序能够被一个或多个处理器读取,以便于该一个或多个处理器实现上述任意方面或任意一种实现方式提供的方法。
综上所述,本发明实施例提供的I/O请求的调度方法,通过设置多个不同优先级的队列,分别存储多个不同优先级的进程组对应的I/O请求,然后在下发I/O请求时根据队列的优先级有目的性的优先下发高优先级的进程组发送的I/O请求,而高优先级的进程组里的进程对应着关键应用,这样可使得I/O设备可优先执行关键应用的I/O请求,从而一定程度上避免了大量非关键应用的I/O请求拥塞,保证了关键应用的I/O请求响应速度。
进一步的,关键应用若为对用户体验影响大的应用,由于该应用的I/O请求得到了及时处理,该应用执行的流畅度相应提高,从而提升了用户体验。
附图说明
图1为本发明实施例提供的一种终端设备的结构示意图;
图2为本发明实施例提供的一种操作系统的逻辑结构示意图;
图3为图2提供的操作系统的进一步的逻辑结构示意图;
图4为本发明实施例提供的一种I/O请求调度方法的原理示意图;
图5a为本发明实施例提供的一种I/O请求调度方法的流程示意图;
图5b为本发明实施例提供的另一种I/O请求调度方法的流程示意图;
图6为本发明实施例提供的一种I/O请求调度装置的逻辑结构示意图;
图7为本发明实施例提供的另一种I/O请求调度装置的逻辑结构示意图;
图8为本发明实施例提供的另一种I/O请求调度装置的逻辑结构示意图;
图9为本发明实施例提供的另一种I/O请求调度装置的逻辑结构示意图。
具体实施方式
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚地描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。
本发明实施例提供的I/O请求的调度方法主要应用于终端设备,该终端设备也可称之为用户设备(User Equipment,简称为“UE”)、移动台(Mobile Station,简称为“MS”)、移动终端(Mobile Terminal)等,可选的,该终端可以具备经无线接入网(Radio Access Network,RAN)与一个或多个核心网进行通信的能力,例如,终端可以是移动电话(或称为“蜂窝”电话)、或具有移动性质的计算机等,例如,终端还可以是便携式、袖珍式、手持式、计算机内置的或者车载的移动装置。应理解的是,除了终端设备以外,本发明实施例提供的解码方法也可以应用于其他类型的计算机设备,例如服务器。
请参考图1,为本发明实施例应用的一种终端设备的结构示意图。如图1所示,该终端设备100包括存储器180、处理器150以及显示设备140。
存储器180一般包括两种:内存和外存。内存包括随机存储器(RAM),只读存储器(ROM),以及高速缓存(CACHE)等。外存包括磁盘、嵌入式多媒体存储卡(Embedded Multi Media Card,eMMC)、非易失性存储器(Non-Volatile Memory,NVMe)等。存储器180用于存储计算机程序,该计算机程序包括操作系统程序182和应用程序181等。计算机程序通常被存储在外存上,处理器150在运行计算机程序前会将计算机程序从外存加载到内存。本发明实施例中提到的I/O请求通常是被发送到外存的读请求或写请求。
处理器150可以包括一个或多个处理器,例如,处理器150可以包括一个或多个中央处理器(Central Processing Unit,CPU),或者包括一个中央处理器和一个图形处理器(Graphic Processing Unit,GPU)。当处理器150包括多个处理器时,这多个处理器可以集成在同一块芯片上,也可以各自为独立的芯片。一个处理器可以包括一个或多个处理核。处理器150用于读取存储器180中的计算机程序,然后执行计算机程序定义的方法,例如处理器150读取操作系统程序182从而在该终端设备100上运行操作系统(参考图2)以及实现操作系统的各种功能,或读取一种或多种应用程序181,从而在该终端设备上运行一种或多种应用。
操作系统程序182中包含了可实现本发明实施例提供的I/O请求的调度方法的计算机程序,这样处理器150读取到该操作系统程序182并运行该操作系统后,终端设备100可具备本发明实施例提供的I/O请求调度功能,通过该功能一定程度上保证终端设备100上运行的关键应用的I/O响应速度,提升应用该终端设备100的用户的操作体验。
显示设备140包括显示面板141,用于显示由用户输入的信息或提供给用户的信息以及终端设备100的各种菜单界面等,在本发明实施例中可以用于显示应用以便于接收用户对应用的操作,从而导致I/O请求的产生。显示设备140可包括显示面板141,可选的,可以采用LCD(Liquid Crystal Display,液晶显示器)或OLED(Organic  Light-Emitting Diode,有机发光二极管)等形式来配置显示面板141。
如图1所示,终端设备100还包括输入设备130,用于接收输入的数字信息、字符信息或接触式触摸操作/非接触式手势,以及产生与终端设备100的用户设置以及功能控制有关的信号输入等。具体地,该输入设备130可以包括触控面板131。触控面板131,也称为触摸屏,可收集用户在其上或附近的触摸操作(比如用户使用手指、触笔等任何适合的物体或附件在触控面板131上或在触控面板131附近的操作),并根据预先设定的程式驱动相应的连接装置。可选的,触控面板131可包括触摸检测装置和触摸控制器两个部分。其中,触摸检测装置检测用户的触摸方位,并检测触摸操作带来的信号,将信号传送给触摸控制器;触摸控制器从触摸检测装置上接收触摸信息,并将它转换成触点坐标,再送给处理器150,并能接收处理器150发来的命令并加以执行。例如,用户在触控面板131上用手指点击拍照应用的应用图标,触摸检测装置检测到此次单击带来的这个信号,然后将该信号传送给触摸控制器,触摸控制器再将这个信号转换成坐标发送给处理器150,处理器150根据该坐标和该信号的类型(单击)执行对该拍照应用的打开操作。
触控面板131可以采用电阻式、电容式、红外线以及表面声波等多种类型实现。在当前主流的终端设备中,触控面板131通常覆盖在显示面板141之上形成触摸显示屏。除了触控面板131,输入设备130还可以包括其他输入设备132,其他输入设备132可以包括但不限于物理键盘、功能键(比如音量控制按键、开关按键等)、轨迹球、鼠标、操作杆等中的一种或多种。
除以上之外,终端设备100还可以包括用于给其他模块供电的电源190以及用于拍摄照片或视频的摄像头160。终端设备100还可以包括一个或多个传感器120,例如加速度传感器、光传感器等。终端设备100还可以包括无线射频(Radio Frequency,RF)电路110,用于与无线网络设备进行网络通信,还可以包括WiFi模块170,用于与其他设备进行基于WiFi的通信。
终端设备的I/O调度通常实现在操作系统(即前述操作系统程序182)中,本发明实施例提出的就是对操作系统中现有的I/O调度方法的改进。需要说明的是,当本发明实施例提出的方法通过软件实现时,该软件存储在存储器180中,处理器150通过读取存储器180中存储的所述软件实现本发明实施例提供的方法。图1中除处理器150和存储器180之外的其他设备对于本发明实施例而言通常都是可选的。
请参阅图2,为I/O调度方法应用的一种操作系统的逻辑结构示意图,本发明实施例以安卓(Android)操作系统为例。图2也可以看做是图1中的操作系统程序182和应用程序181运行在终端设备之上后终端设备的逻辑结构示意图。
如图2所示,操作系统200包括框架层210,核心库层(简称为kernel层)220以及驱动层230。操作系统200之上同时运行有多种应用程序,例如拍照应用、媒体播放器以及浏览器等,这些应用程序在运行时会由应用程序的进程或线程在操作系统200层产生I/O请求,这些I/O请求最终会被下发到硬件层的存储器中。例如为了拍照应用实现“将照片保存到存储器中”这个动作,拍照应用的进程通过系统调用从应用层进入kernel层,然后该进程在kernel层创建一个I/O写请求,该I/O写请求用于请求存储器将当前拍摄的照片存储到特定位置。当然,在其他情况下,应用创建的 I/O请求还可以为I/O读请求,用于读取存储器上存储的数据,例如打开一张已保存的照片。除存储器外,硬件层中还包括其他类型的硬件,例如处理器、输入设备、显示设备等,可参考图1所示,图2不再重复示出。
具体的,如图3所示,kernel层220包括虚拟文件系统层(Virtual File System,VFS)221、文件系统层222和块设备层(简称BLOCK层)223。主流的文件系统有flash文件系统(Flash Friendly File System,F2FS)、第四代扩展文件系统(Fourth extended file system,EXT4)、日志文件系统(例如XFS)等。驱动层230可以包括磁盘驱动、嵌入式多媒体存储卡(Embedded Multi Media Card,eMMC)驱动、非易失性存储器(Non-Volatile Memory,NVMe)驱动以及中央处理器(Central Processing Unit,CPU)驱动等,分别用于驱动各自对应的硬件。
结合图2和图3,某个应用的进程在文件系统层222产生I/O请求,然后该进程会将该I/O请求提交到BLOCK层223。这个时候根据BLOCK层的实现,有可能这个进程自己把请求提交到驱动层230(也有可能就交给内核线程提交),之后由这个进程封装成存储器能执行的命令,发送给存储器,然后返回并等待该I/O请求执行结束。那个提交到存储器的命令会由存储器的控制器获取并处理,处理完成后存储器会发送一个电信号(中断信号)给CPU,CPU接收到信号后,会执行中断处理程序,唤醒那个进程,那个进程被唤醒后拷贝数据到自己的buffer中,然后退出内核层回到应用层。
应理解的是,进程或线程(注意并不限定是应用的进程或线程)是软件方法的执行主体,但为了便于阅读,本申请下面会出现“某个层接收或下发I/O请求”的描述,本领域普通技术人员应理解其含义是进程或线程在这个层接收或下发I/O请求。
现有技术中BLOCK层223采用单队列的方式存储所有应用的I/O请求,即所有应用的I/O请求均存储在同一个队列中,然后这些I/O请求会被串行发送给相应的驱动(也可能是发送到一个调度层,通过调度层发给驱动),这样,当一些非关键应用总是产生大量I/O请求时,就会导致这个队列中长时间存在大量非关键应用的I/O请求,从而导致关键应用的I/O请求下发速度过慢,造成关键应用卡顿,影响终端设备的用户体验。
如图3所示,本发明实施例在BLOCK层223提供I/O请求分组管理的功能,在本实施例中体现为I/O请求调度装置2231,由该装置提供I/O请求的调度方法,对I/O请求进行分组调度。需要说明的是,该装置2231可以是现有技术原有I/O调度装置(或称之为模块)的改进,也可以是在现有技术提供的调度装置的基础上新增的装置。该I/O请求调度装置2231在具体实现时可以实现为一个模块,也可以实现相互协作的多个模块。
根据应用的特征,例如应用对系统的重要程度或对用户体验的影响程度,终端设备中的多个应用被划分为至少两种:关键应用和非关键应用,例如,对系统重要程度高的或对用户体验影响大的作为关键应用,其他的作为非关键应用。相应的,I/O请求调度装置2231中包括至少两个队列:关键队列和非关键队列。关键队列和非关键队列分别存储关键应用的I/O请求(简称为关键I/O请求)和非关键应用的I/O请求(简称为非关键I/O请求)。I/O请求调度装置2231会根据这些队列对应的应用的重要程度对这些队列中存储的I/O请求进行调度,从而控制I/O请求的下发。例如,由于关 键队列的重要程度高于非关键队列,设置下发的I/O请求中关键队列的I/O请求和非关键队列的I/O请求的比例为A:B(可看做是在设置二者的I/O下发带宽),其中A大于B,A和B可以认为是关键队列和非关键队列的权重;然后根据该比例执行I/O请求的下发。
即使按照设置的比例下发I/O请求,在某些情况下还是可能发生过多的非关键应用的I/O请求下发到存储器中从而堵塞住存储器的现象。比如,某段时间内关键应用没有产生与该关键应用对应的I/O请求,非关键应用则产生了很多I/O请求,这些I/O请求被存储到了非关键队列中,这样即便是按照设置的比例下发,由于关键队列中并没有I/O请求,I/O请求调度装置2231每次下发I/O请求时只能从非关键队列中获取到I/O请求并下发到存储器中。这段时间过后,存储器中就全是待处理的非关键I/O请求,而此时关键应用的I/O请求就会被迫等待较长时间,从而造成非关键应用的I/O请求响应速度过慢。
考虑到以上举例的情况或其他可能的情况,I/O请求调度装置2231还可以监测关键队列的I/O请求的响应速度,如果确定关键队列的I/O请求响应速度过低,则降低至少一个非关键队列的队列深度以减少其可存储的I/O请求的数量。
换句话说,如果监测到关键队列的I/O请求响应速度过低,则确定可能出现了上述情况,这时通过降低非关键队列的队列深度,将一些非关键应用的I/O请求适时的阻塞在BLOCK层之上,即非关键应用的I/O请求会进入睡眠等待的状态,由于睡眠等待再重启需要时间,这样非关键应用的I/O请求从BLOCK层到非关键队列的速度就会变慢,有可能非关键队列已经空了,非关键应用的I/O请求还没有下来,从而渐渐减少了存储器中待处理的非关键I/O请求,增加了存储器对关键I/O请求处理的可能性,进而提高了关键应用的I/O请求的响应速度。
进一步的,如果确定关键队列中无I/O请求或关键队列的I/O请求响应速度大于预设值时,可以逐渐提高非关键队列的深度。所谓的“逐渐”提高可以实现为每次以上条件满足时提高固定值或特定倍数。例如第一次确定关键队列的I/O请求响应速度大于上述预设值时,将至少一个非关键队列的深度提高5(可多存储5个I/O请求),一段时间后再检测关键队列的I/O请求响应速度,若仍然大于预设值,则将上述非关键队列的深度再提高5,当然这一次也可以提高上一次没有被提高深度的其他非关键队列的深度。上述预设值可以是固定的,也可以根据系统当前情况重新设置。具体实现方式多样,在此不再赘述。采取这样的技术方案,可以在关键应用对I/O资源需求较小时,一定程度上提高非关键应用的I/O请求的响应速度,从而保证系统整体的I/O请求调度效率。
需要说明的是,本发明实施例提出的监测I/O请求响应速度并适时调整队列深度的方法也可以单独使用,这种方法并不依赖于按照权重设置I/O下发比例的方法。
另外,为了进一步提高关键应用的I/O请求响应速度,I/O请求调度装置2231在下发关键应用的I/O请求(即关键队列中存储的I/O请求)时可以在I/O请求中增加标记,该标记用以指示该I/O请求是关键应用的I/O请求,这样接收到该I/O请求的驱动层230(参考图2)的驱动设备(或调度器)就可以根据这个标记识别出该I/O请求为关键应用的I/O请求,并将该关键应用的I/O请求优先提交给下一个设备,下 一个设备一般为存储器(参考图2),但在其他实现方式中,内核层中还包含调度层,或称调度器,这样I/O请求调度装置2231会先将I/O请求下发给调度器,然后由调度器对I/O请求进行进一步的调度,例如识别出关键应用的I/O请求,然后再将I/O请求发送给驱动层的驱动设备,由该驱动设备将I/O请求提交给存储器。
需要说明的是,在方案的具体实现中,应用分组的个数,队列的个数以及多个应用如何分组,这些可以根据终端设备的情况或用户需求自行设定,本发明实施例对此不做限定。另外,应用的分组通常在框架层210(参考图2)实现,然后将分组结果提供给内核的BLOCK层使用。应用的分组是可以变化的,例如一个应用原先在后台运行,属于非关键应用这个组,当检测到该应用的前台切换事件时,说明该应用要切换到前台运行,此时将该应用重新划分到关键应用这个组中。
下面通过更具体的实施例介绍本发明提供的I/O请求调度方法的实现过程。需要说明的是,本发明实施例中出现的有关操作系统的逻辑结构示意图可互相参考,有些重复信息为避免累赘已经省略。
请参阅图4,为本发明实施例提供的I/O请求调度方法的实现示意图。此方法由前述I/O请求调度装置2231实现。在其他一些实现方式中,也可以由操作系统的其他模块实现。
如图4所示,本发明实施例中将应用按照对用户体验的影响程度划分为三个组,组1包括在前台运行的应用(下文简称为前台应用)、系统服务和在后台运行的应用(下文简称后台应用)中用户体验敏感的应用(例如音乐播放应用);组2包括用户体验不敏感的后台应用;组3包括用户完全不感知的后台应用。
在其他一些实施例中,用户体验敏感和不敏感可以进一步细化为敏感度的高低,基于这样的考虑,应用可以被划分为3个以上的组。在另一些实施例中,应用也可以仅划分为两个组,这两个组分别包含前台应用和后台应用;或者应用划分为两组,一组包括上述组1的应用,另一个包括上述组2和组3的应用。
需要说明的是,组1、组2和组3虽然是按照应用对用户体验的影响程度划分,但由于一个应用可能具有多个进程,所以三个组里包含的其实是各个组包含的应用的进程,所以也可以称之为进程组。在其他一些实施例中,同一应用的不同进程也可以划分到不同的进程组中,这种实现方式下“进程组”这个名称比“应用组”更合适。
参考图5a,Android系统初始化时,内核根据上述的三个组生成与三个组对应的三个队列:队列1、队列2和队列3(S301),这三个队列分别用于存储组1、组2和组3中的应用的I/O请求。然后,内核初始化I/O请求调度装置2231(S302),由I/O请求调度装置2231读取配置参数完成调度策略的配置(S303)。
配置参数可以包括以上三个队列各自的权重或三个队列下发I/O请求的占比、每次需要提升或降低的队列深度值,以及与队列1(或其他关键队列)对应的I/O响应时间阈值。配置参数可以是用户临时输入的,也可以是预先设定在系统中的。若配置参数有多个,可以同时获取,也可以在需要哪个时再获取哪个。I/O请求调度装置2231完成调度策略的配置后根据该调度策略执行I/O请求的下发(S304)。
举例来说,队列1、队列2和队列3下发I/O请求的占比为3:2:1,每个队列的初始深度为32,每次需要降低或提升的深度值为队列当前深度值的1/2,与队列1对应 的响应时间阈值为毫秒级。如图4所示,假设I/O请求调度装置2231同时能发送M个I/O请求(M通常是由存储器的处理能力决定),则由一个进程(或线程)分别从队列1、队列2和队列3中获取M*1/2、M*1/3以及M*1/6个I/O请求,然后该线程将获取到的这M个I/O请求下发到下层的调度器或驱动设备。若下发到度器中,调度器还可以根据具体的调度策略创建或更改该M个I/O请求的顺序,然后再将这个M个I/O请求下发到驱动设备,可采用现有的调度器,在此不再赘述。
再例如,当配置参数包括3个队列各自的权重时,根据队列的重要程度,队列1的权重>队列2的权重>队列3的权重。在下发I/O请求时结合各个队列的权重值计算出应该从各个队列中获取的I/O请求的数量,然后下发I/O请求。
本发明实施例三个队列的权重都不相同,即三个队列的优先级各不相同,但是在其他一些实现方式中,当存在三个或三个以上队列时,也可以允许其中的两个或两个以上队列的优先级相同。另外,在本发明实施例或其他一些实施例中,队列的深度和优先级都可能发生变化,原先不相同的队列深度或优先级可能变得相同,原先相同的队列深度或优先级可能变得不同。
存储器单位时间内处理I/O请求的数量是存储器的固有属性,而终端设备中的存储器通常是固定的,因此单位时间内I/O请求的处理数量(也可以称之为I/O带宽)是固定的,换句话说,I/O请求在单位时间内被下发的数量也是固定的,因此提高重要应用的I/O请求的下发占比意味着提高单位时间内下发的I/O请求中重要应用的I/O请求的数量,也就是提高了重要应用的I/O请求在单位时间内被处理的数量,从而提高了重要应用I/O请求的处理效率,一定程度上避免了重要应用的使用卡顿问题。
进一步的,如图5b所示,在I/O请求的下发过程中,I/O请求调度装置2231还会检测队列1(因为队列1是关键队列)的I/O请求响应时间(S305)。这种检测可以是事件触发的,也可以是周期性的。前述“事件”可以是用户发现卡顿后主动上报卡顿从而触发的事件,也可以是系统自动检测到重要应用出现卡顿现象后触发的事件,或其他,本发明实施例不做限定。
具体的,队列1的I/O请求响应时间可以通过如下方式获得:I/O请求调度装置2231获取队列1中当前一个I/O请求的响应时间作为队列1的I/O请求响应时间;或者,记录一段时间内多个I/O请求的响应时间,并计算这些I/O请求的响应时间平均值,将该平均值作为队列1的I/O请求响应时间。
若确定队列1的I/O请求响应时间大于阈值X,则降低队列2的深度和/或降低队列3的深度(S306),优先选择降低队列3的深度,或者二者都降低但队列3的深度降低的比队列2的大。
具体的,“降低深度”可以是深度直接减半或者每次降低某一个数值,该数值可以每次需要降低时由用户配置也可以设置为默认的数值,即便设置数值,该数值也可以是变化的。
若确定队列1的I/O请求响应时间小于阈值Y(Y通常设置为小于X),则提高队列2的深度和/或提高队列3的深度(S307),优先选择提高队列2的深度,或者二者都提高但队列2的深度提高的比队列3的大。
若确定队列1的I/O请求响应时间小于或等于阈值X且大于或等于阈值Y,则维 持队列2或队列3的当前深度(S308)。
进一步的,除以上情况之外,如果I/O请求调度装置2231检测到队列1中长时间不存在I/O请求或I/O请求的数量长时间低于某个特定阈值(比如数量一直维持在2个以下),则可以每隔固定时间就提高一次队列2和/或队列3的深度。当然,这里低数量是多少,以及低数量维持多长时间可以根据终端设备的当前运行情况或用户需求自行设定。
通过上述适时的调整各个队列的深度,关键队列的I/O请求响应时间会逐渐恢复,从而提高与该关键队列对应的关键应用即前台应用、系统服务和用户体验敏感的后台应用的响应速度,提升用户体验。而当关键队列的I/O请求响应时间很小(即响应速度很快)或关键队列中没有(或很少)I/O请求时,逐渐提升非关键队列的深度,从而保证关键应用不需要占用太多I/O资源时其他应用可以使用剩余的I/O资源,避免I/O资源浪费,提升系统I/O资源的利用率。
需要说明的是,在其他一些实现方式中,队列和应用分组也可以不是一对一的,即一个应用分组可以对应多个队列。
上述描述的I/O请求调度方法在具体实现是由哪个或哪些进程或线程执行,可以在代码撰写时根据具体情况考虑,实现方式多样,本发明实施例不对此做具体限定。
下面介绍上述I/O请求调度装置可能的逻辑结构。
请参考图6,为本发明实施例提供的一种I/O请求调度装置的逻辑结构示意图。该I/O请求调度装置400包括存储单元410和下发单元420。存储单元410用于将接收到的多个I/O请求存储到多个队列中,例如存储到多个队列中。一个队列对应至少一个进程组,每个进程组中包含一个或多个进程,且接收到的每个I/O请求被存储到与所述I/O请求对应的进程所属的进程组对应的队列中。下发单元420用于向I/O设备下发所述多个队列中的I/O请求,其中,同一次下发过程中来自于优先级高的队列的I/O请求的数量多于来自于优先级低的队列的I/O请求的数量。进一步的,一个队列的优先级与该队列对应的进程组的特征匹配。
进一步的,如图7所示,该I/O请求调度装置400还可以包括配置信息获取单元430和优先级配置单元440。配置信息获取单元430用于获取配置信息,其中,所述配置信息包括用于表示进程组的特征的信息。优先级配置单元440用于根据该配置信息配置所述多个队列的优先级,其中,一个队列的优先级与该队列对应的进程组的特征匹配。进一步的,下发单元420根据440配置的各个队列的优先级从各个队列中获取到相应数量的I/O请求,并执行下发操作。
该配置信息包括进程组的重要性信息(即该进程组中包含的应用的重要性信息),并且一个队列对应的进程组的重要性越高,所述队列的优先级越高。具体的,该重要性信息可以包括所述进程组中包含的一个或多个进程对用户体验的影响程度信息,对用户体验的影响程度越高,所述进程组的重要性越高。所谓对用户体验的影响程度其实就是该进程或应用如果出现卡顿,用户能够感受到多大的影响。比如前台应用一般认为是用户可见的应用,所以如果出现卡顿,默认用户是可以感受到的,这些应用一般可以认为是重要性较高的应用,而后台应用一般认为是用户不可见的且重要性较低的应用。但是后台应用中也有一些应用具备用户可感知的特性,比如有语音等用户可 感知的动作,例如音乐播放应用,这类型应用如果出现卡顿也会较大地影响用户的体验,因此也可以认为是重要性较高的应用。
在一些实现方式下,用户可以根据上述描述定义各个应用的重要性,并根据各个应用的重要性设定应用的分组,并根据应用的分组确定与该分组对应的队列的配置信息并输入该配置信息,用以配置相应的队列的优先级。在此实现方式下,操作系统可监测应用或进程的重要性的变化情况(例如一个进程从前台转入后台运行),适时调整应用的分组。
在另一些实现方式下,操作系统监测并收集应用或进程的信息,例如位于前台或后台、是否具有语音动作等,根据这些信息确定应用的重要性,实现应用的分组,并根据应用的分组确定与该分组对应的队列的配置信息,将该配置信息传递给本发明实施例提供的I/O请求调度装置,由该装置根据该配置信息配置队列的优先级。
在图6所示的装置基础上,如图8所示,该I/O请求调度装置400还可以包括响应速度确定单元450和调整单元460。当然,也可以在图7所示的装置基础上增加单元430和440获得另一个I/O请求调度装置。响应速度确定单元450用于确定所述多个队列中一个或多个队列的I/O请求响应速度。调整单元460用于根据所述I/O请求响应速度调整其他队列的大小。一般来说,响应速度确定单元450用于确定较重要进程组对应的队列中I/O请求的响应速度,比如前文所提到的优先级最高的队列1的I/O请求响应速度,在I/O响应速度出现异常时及时调整其他队列的大小或自身的大小从而改变该队列的I/O请求响应速度。具体的,若确定优先级最高的队列的I/O请求响应速度小于或等于第一阈值,则将其他队列中的一个或多个队列的大小调小,从而提高该I/O请求响应速度;若确定优先级最高的队列的I/O请求响应速度大于(或等于)第二阈值,则将其他队列中的一个或多个队列的大小调大,从而提高其他队列的I/O响应速度,平衡I/O资源的使用。进一步的,如图9所示,I/O请求调度装置400还可以包括数量确定单元450用于确定优先级最高的队列中存储的I/O请求的数量;若数量确定单元450确定所述数量小于或等于第三阈值,则调整单元440用于将其他队列中的一个或多个队列的大小调大。也就是说,在优先级高的应用的I/O请求数量较小,甚至为0时,亦即占用I/O资源较小或不占用I/O资源时,提高其他优先级比他低的队列的大小,让优先级较低的队列的I/O请求能够占用更多I/O资源,从而提高I/O资源的利用率。
装置实施例中涉及到的方案的具体实现可参考前述方法实施例,在此不再赘述。
以上所描述的装置实施例仅仅是示意性的,其中所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部模块来实现本实施例方案的目的。另外,本发明提供的装置实施例附图中,模块之间的连接关系表示它们之间具有通信连接,具体可以实现为一条或多条通信总线或信号线。本领域普通技术人员在不付出创造性劳动的情况下,即可以理解并实施。
通过以上的实施方式的描述,所属领域的技术人员可以清楚地了解到本发明实施例所述的绘图装置可借助软件加必需的通用硬件的方式来实现,当然也可以通过专用硬件包括专用集成电路、专用CPU、专用存储器、专用元器件等来实现。一般情况下,凡由计算机程序完成的功能都可以很容易地用相应的硬件来实现,而且,用来实现同一功能的具体硬件结构也可以是多种多样的,例如模拟电路、数字电路或专用电路等。
以上所述,仅为本发明的具体实施方式,但本发明的保护范围并不局限于此。

Claims (18)

  1. 一种I/O请求的调度方法,其特征在于,包括:
    将接收到的多个I/O请求存储到多个队列中,其中,一个队列对应至少一个进程组,每个进程组中包含一个或多个进程,且接收到的I/O请求被存储到与该I/O请求对应的进程所属的进程组对应的队列中;
    向I/O设备下发所述多个队列中的I/O请求,其中,同一次下发过程中来自于优先级高的队列的I/O请求的数量多于来自于优先级低的队列的I/O请求的数量。
  2. 根据权利要求1所述的方法,其特征在于,一个队列的优先级与该队列对应的进程组的特征匹配。
  3. 根据权利要求1或2所述的方法,其特征在于,还包括:
    获取配置信息,其中,所述配置信息包括用于表示进程组的特征的信息;
    根据所述配置信息配置所述多个队列的优先级,其中,一个队列的优先级与该队列对应的进程组的特征匹配。
  4. 根据权利要求1-3任意一项所述的方法,其特征在于,还包括:
    确定所述多个队列中至少一个队列的I/O请求响应速度;
    根据所述I/O请求响应速度调整除所述至少一个队列之外的其他队列中的一个或多个队列的大小。
  5. 根据权利要求4所述的方法,其特征在于,
    所述获取所述多个队列中至少一个队列的I/O请求响应速度包括:确定优先级最高的队列的I/O请求响应速度;
    所述根据所述I/O请求响应速度调整除所述至少一个队列之外的其他队列中的一个或多个队列的大小包括:若确定所述I/O请求响应速度小于或等于第一阈值,则将所述其他队列中的一个或多个队列的大小调小。
  6. 根据权利要求4所述的方法,其特征在于,
    所述获取所述多个队列中至少一个队列的I/O请求响应速度包括:确定优先级最高的队列的I/O请求响应速度;
    所述根据所述I/O请求响应速度调整除所述至少一个队列之外的其他队列中的一个或多个队列的大小包括:若确定所述I/O请求响应速度大于第二阈值,则将所述其他队列中的一个或多个队列的大小调大。
  7. 根据权利要求1-3任意一项所述的方法,其特征在于,还包括:
    确定优先级最高的队列中存储的I/O请求的数量;
    若确定所述数量小于或等于第三阈值,则将除所述优先级最高的队列之外的其他队列中的一个或多个队列的大小调大。
  8. 根据权利要求1-7任意一项所述的方法,其特征在于,所述配置信息包括进程组的重要性信息以用来表示进程组的特征,重要性高的进程组对应的队列的优先级高于重要性低的进程组对应的队列的优先级。
  9. 据权利要求1-8任意一项所述的方法,其特征在于,所述重要性信息包括所述进程组中包含的一个或多个进程对用户体验的影响程度信息,对用户体验的影响程度高的进程组的重要性高于对用户体验的影响程度低的进程组的重要性。
  10. 一种I/O请求的调度装置,其特征在于,包括:
    存储单元,用于将接收到的多个I/O请求存储到多个队列中,其中,一个队列对应至少一个进程组,每个进程组中包含一个或多个进程,且接收到的I/O请求被存储到与所述I/O请求对应的进程所属的进程组对应的队列中;
    下发单元,用于向I/O设备下发所述多个队列中的I/O请求,其中,同一次下发过程中来自于优先级高的队列的I/O请求的数量多于来自于优先级低的队列的I/O请求的数量。
  11. 根据权利要求10所述的装置,其特征在于,还包括:
    配置信息获取单元,用于获取配置信息,其中,所述配置信息包括用于表示进程组的特征的信息;
    优先级配置单元,用于根据所述配置信息配置所述多个队列的优先级,其中,一个队列的优先级与该队列对应的进程组的特征匹配。
  12. 根据权利要求10或11所述的装置,其特征在于,还包括:
    响应速度确定单元,用于确定所述多个队列中至少一个队列的I/O请求响应速度;
    调整单元,用于根据所述I/O请求响应速度调整除所述至少一个队列之外的其他队列中的一个或多个队列的大小。
  13. 根据权利要求12所述的装置,其特征在于,所述响应速度确定单元具体用于确定优先级最高的队列的I/O请求响应速度;
    所述调整单元具体用于若确定所述I/O请求响应速度小于或等于第一阈值,则将所述其他队列中的一个或多个队列的大小调小。
  14. 根据权利要求12所述的装置,其特征在于,所述响应速度确定单元具体用于确定优先级最高的队列的I/O请求响应速度;
    所述调整单元具体用于若确定所述I/O请求响应速度大于第二阈值,则将所述其他队列中的一个或多个队列的大小调大。
  15. 根据权利要求10或11所述的装置,其特征在于,还包括:数量确定单元,用于确定优先级最高的队列中存储的I/O请求的数量;所述调整单元还用于若确定所述数量小于或等于第三阈值,则将除所述优先级最高的队列之外的其他队列中的一个或多个队列的大小调大。
  16. 一种计算机设备,其特征在于,包括处理器和存储器,其中:
    所述存储器用于存储计算机程序;
    所述处理器用于读取所述存储器中存储的所述计算机程序以执行:将接收到的多个I/O请求存储到多个队列中,其中,一个队列对应至少一个进程组,每个进程组中包含一个或多个进程,且接收到的I/O请求被存储到与所述I/O请求对应的进程所属的进程组对应的队列中;以及向I/O设备下发所述多个队列中的I/O请求,其中,同一次下发过程中来自于优先级高的队列的I/O请求的数量多于来自于优先级低的队列的I/O请求的数量。
  17. 根据权利要求16所述的计算机设备,其特征在于,所述处理器用于读取所述存储器中存储的所述计算机程序以执行确定所述多个队列中一个或多个队列的I/O请求响应速度;以及根据所述I/O请求响应速度调整其他队列的大小。
  18. 根据权利要求16或17所述的计算机设备,其特征在于,所述计算机程序为操作系统程序。
PCT/CN2017/108951 2016-11-02 2017-11-01 I/o请求的调度方法及装置 WO2018082570A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
EP17866432.2A EP3534255A4 (en) 2016-11-02 2017-11-01 INPUT / OUTPUT REQUEST PLANNING METHOD AND DEVICE
US16/401,977 US10628216B2 (en) 2016-11-02 2019-05-02 I/O request scheduling method and apparatus by adjusting queue depth associated with storage device based on hige or low priority status

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201610951240.9A CN108009006B (zh) 2016-11-02 2016-11-02 I/o请求的调度方法及装置
CN201610951240.9 2016-11-02

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US16/401,977 Continuation US10628216B2 (en) 2016-11-02 2019-05-02 I/O request scheduling method and apparatus by adjusting queue depth associated with storage device based on hige or low priority status

Publications (1)

Publication Number Publication Date
WO2018082570A1 true WO2018082570A1 (zh) 2018-05-11

Family

ID=62047320

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2017/108951 WO2018082570A1 (zh) 2016-11-02 2017-11-01 I/o请求的调度方法及装置

Country Status (4)

Country Link
US (1) US10628216B2 (zh)
EP (1) EP3534255A4 (zh)
CN (1) CN108009006B (zh)
WO (1) WO2018082570A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113806102A (zh) * 2020-06-15 2021-12-17 中国移动通信集团浙江有限公司 消息队列处理方法、装置及计算设备

Families Citing this family (21)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108984443A (zh) * 2018-06-27 2018-12-11 郑州云海信息技术有限公司 一种优先级实时调整装置及方法
CN110806925B (zh) * 2018-08-06 2022-08-23 成都鼎桥通信技术有限公司 音频播放方法及设备
CN109271897B (zh) * 2018-08-31 2023-10-24 平安科技(深圳)有限公司 人脸动作单元检测方法、装置、计算机设备及存储介质
CN109343943B (zh) * 2018-09-07 2021-08-03 华中科技大学 一种基于多外存设备多队列的i/o管理方法
WO2020078539A1 (en) * 2018-10-16 2020-04-23 Huawei Technologies Co., Ltd. Time based priority queue
CN109814806A (zh) * 2018-12-27 2019-05-28 河南创新科信息技术有限公司 Io调度方法、存储介质和装置
CN109768934B (zh) * 2018-12-28 2020-11-27 安徽皖兴通信息技术有限公司 一种路由器的纯phy接口板资源管理方法
CN109783028B (zh) * 2019-01-16 2022-07-15 Oppo广东移动通信有限公司 I/o调度的优化方法、装置、存储介质及智能终端
CN109818878A (zh) * 2019-01-25 2019-05-28 杭州天谷信息科技有限公司 多通道自适应流量控制方法和系统
CN110781145B (zh) * 2019-10-25 2022-04-22 浪潮电子信息产业股份有限公司 一种文件系统任务调度方法、装置、设备及可读存储介质
CN111208943B (zh) * 2019-12-27 2023-12-12 天津中科曙光存储科技有限公司 存储系统的io压力调度系统
KR20210099291A (ko) * 2020-02-04 2021-08-12 삼성전자주식회사 다중-호스트를 지원하도록 구성된 스토리지 장치 및 그것의 동작 방법
JP7337006B2 (ja) * 2020-03-03 2023-09-01 キオクシア株式会社 メモリシステムおよび制御方法
CN113377277A (zh) * 2020-03-09 2021-09-10 伊姆西Ip控股有限责任公司 管理存储器的方法、设备和计算机程序产品
US11494236B2 (en) * 2020-05-06 2022-11-08 EMP IP Holding Company, LLC System and method for sharing central processing unit (CPU) resources with unbalanced applications
CN114116526A (zh) * 2020-08-28 2022-03-01 美光科技公司 用于用嵌入式存储器系统进行受管理nand转译的技术
CN114489471B (zh) * 2021-08-10 2023-04-14 荣耀终端有限公司 一种输入输出处理方法和电子设备
CN114443240B (zh) * 2021-08-25 2022-11-15 荣耀终端有限公司 输入输出请求处理方法和电子设备
CN114706820B (zh) * 2022-05-18 2022-09-06 北京卡普拉科技有限公司 异步i/o请求的调度方法、系统、电子设备及介质
CN115277859B (zh) * 2022-09-28 2022-12-06 深圳华锐分布式技术股份有限公司 请求调度方法、装置、设备及介质
CN115718665B (zh) * 2023-01-10 2023-06-13 北京卡普拉科技有限公司 异步i/o线程处理器资源调度控制方法、装置、介质及设备

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1825288A (zh) * 2006-03-31 2006-08-30 浙江大学 嵌入式sram操作系统进程多队列调度的实现方法
CN102799487A (zh) * 2012-06-29 2012-11-28 记忆科技(深圳)有限公司 基于阵列/lun的io调度方法及装置
CN102831014A (zh) * 2012-07-30 2012-12-19 华中科技大学 一种利用多请求队列提升io并行性和减少小io延迟的方法
CN105320571A (zh) * 2015-11-27 2016-02-10 浪潮(北京)电子信息产业有限公司 一种进程调度方法
CN106293917A (zh) * 2016-08-09 2017-01-04 浪潮(北京)电子信息产业有限公司 一种IO调度cfq算法的优化方法及系统

Family Cites Families (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2522388B2 (ja) * 1989-04-21 1996-08-07 日本電気株式会社 タスクの制御方法
US7917903B2 (en) * 2003-03-27 2011-03-29 Hewlett-Packard Development Company, L.P. Quality of service controller and method for a data storage system
US8635376B2 (en) * 2006-02-22 2014-01-21 Emulex Design & Manufacturing Corporation Computer system input/output management
CN1851652A (zh) * 2006-05-23 2006-10-25 浙江大学 嵌入式sram操作系统进程优先级轮转调度的实现方法
CN101576831A (zh) * 2008-05-07 2009-11-11 万德洪 一种分布式计算系统及实现方法
US9325583B2 (en) * 2009-01-27 2016-04-26 Hewlett Packard Enterprise Development Lp Method and system for optimizing network input/output performance
US8413161B2 (en) * 2009-09-29 2013-04-02 International Business Machines Corporation Work queue selection on a local processor within a multiple processor architecture
US8893146B2 (en) * 2009-11-13 2014-11-18 Hewlett-Packard Development Company, L.P. Method and system of an I/O stack for controlling flows of workload specific I/O requests
EP2663920B1 (en) * 2011-01-11 2020-05-27 Hewlett-Packard Development Company, L.P. Concurrent request scheduling
US20130343398A1 (en) * 2012-06-20 2013-12-26 Redline Communications Inc. Packet-based communication system with traffic prioritization
GB201214432D0 (en) * 2012-08-13 2012-09-26 Lo Q Plc Queue management system
KR101583325B1 (ko) * 2014-08-12 2016-01-07 주식회사 구버넷 가상 패킷을 처리하는 네트워크 인터페이스 장치 및 그 방법
CN104360965A (zh) * 2014-12-09 2015-02-18 浪潮电子信息产业股份有限公司 一种cfq调度方法
US20180322431A1 (en) * 2017-05-05 2018-11-08 Walmart Apollo, Llc Predicting realistic time of arrival for queue priority adjustment

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1825288A (zh) * 2006-03-31 2006-08-30 浙江大学 嵌入式sram操作系统进程多队列调度的实现方法
CN102799487A (zh) * 2012-06-29 2012-11-28 记忆科技(深圳)有限公司 基于阵列/lun的io调度方法及装置
CN102831014A (zh) * 2012-07-30 2012-12-19 华中科技大学 一种利用多请求队列提升io并行性和减少小io延迟的方法
CN105320571A (zh) * 2015-11-27 2016-02-10 浪潮(北京)电子信息产业有限公司 一种进程调度方法
CN106293917A (zh) * 2016-08-09 2017-01-04 浪潮(北京)电子信息产业有限公司 一种IO调度cfq算法的优化方法及系统

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
See also references of EP3534255A4

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113806102A (zh) * 2020-06-15 2021-12-17 中国移动通信集团浙江有限公司 消息队列处理方法、装置及计算设备
CN113806102B (zh) * 2020-06-15 2023-11-21 中国移动通信集团浙江有限公司 消息队列处理方法、装置及计算设备

Also Published As

Publication number Publication date
CN108009006B (zh) 2022-02-18
EP3534255A1 (en) 2019-09-04
US10628216B2 (en) 2020-04-21
CN108009006A (zh) 2018-05-08
US20190258514A1 (en) 2019-08-22
EP3534255A4 (en) 2019-11-06

Similar Documents

Publication Publication Date Title
WO2018082570A1 (zh) I/o请求的调度方法及装置
JP5723968B2 (ja) 便宜的マルチタスキング
US10908954B2 (en) Quality of service classes
US10437639B2 (en) Scheduler and CPU performance controller cooperation
KR101702698B1 (ko) 적응형 프로세스 중요도
US9201693B2 (en) Quota-based resource management
CN110300328B (zh) 一种视频播放控制方法、装置及可读存储介质
CN109906437B (zh) 基于线程重要性的处理器核停止和频率选择
WO2018036505A1 (zh) 一种终端后台应用程序的管理方法及装置
KR20170045257A (ko) 메시지 대화 이력의 신속 내비게이션
WO2018041020A1 (zh) 一种广播消息的管理方法及装置
WO2018045934A1 (zh) 应用进程的管理方法和终端设备
CN107071284A (zh) 一种拍照方法及终端
KR20180004956A (ko) 전자 장치 및 전자 장치의 동작 방법
WO2022156612A1 (zh) 基于终端设备的调度方法、装置、存储介质及终端设备
US11385928B2 (en) System and method for priority orchestration and scheduling of different background operations
CN117999543A (zh) 分配计算设备资源
CN118051313A (zh) 进程调度方法及装置、计算机可读存储介质、终端
CN113918350A (zh) 垃圾回收方法、装置、存储介质及电子设备
AU2013205570A1 (en) Opportunistic multitasking

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 17866432

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

ENP Entry into the national phase

Ref document number: 2017866432

Country of ref document: EP

Effective date: 20190529