CN111158883A - Method and device for operating system task classification and computer - Google Patents

Method and device for operating system task classification and computer Download PDF

Info

Publication number
CN111158883A
CN111158883A CN201911411772.3A CN201911411772A CN111158883A CN 111158883 A CN111158883 A CN 111158883A CN 201911411772 A CN201911411772 A CN 201911411772A CN 111158883 A CN111158883 A CN 111158883A
Authority
CN
China
Prior art keywords
task
tasks
centroid
operating system
sample point
Prior art date
Legal status (The legal status 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 status listed.)
Granted
Application number
CN201911411772.3A
Other languages
Chinese (zh)
Other versions
CN111158883B (en
Inventor
尹德帅
刘洪源
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Qingdao Haier Technology Co Ltd
Original Assignee
Qingdao Haier Technology Co Ltd
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 Qingdao Haier Technology Co Ltd filed Critical Qingdao Haier Technology Co Ltd
Priority to CN201911411772.3A priority Critical patent/CN111158883B/en
Publication of CN111158883A publication Critical patent/CN111158883A/en
Application granted granted Critical
Publication of CN111158883B publication Critical patent/CN111158883B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The application relates to the technical field of computers and discloses a method for classifying tasks of an operating system. The method comprises the following steps: acquiring the execution time of a task and the creation time of the task in the operation process of an operating system; and classifying the tasks according to the utilization rate according to the execution time of the tasks and the creation time of the tasks. The method can classify the tasks according to the utilization rate based on the execution time of the tasks and the creation time of the tasks in the operation process of the operating system, realize more accurate classification of the tasks and facilitate directional optimization of the classified tasks. The application also discloses a device and a computer for operating system task classification.

Description

Method and device for operating system task classification and computer
Technical Field
The present application relates to the field of computer technologies, and in particular, to a method, an apparatus, and a computer for classifying tasks of an operating system.
Background
The time-sharing operating system serves a plurality of tasks at the same time, a time slice polling mechanism is used, and each task monopolizes the CPU in turn according to the priority and the weight of the task. And the scheduling and execution of the tasks are realized by the time of monopolizing the CPU, namely the time of dividing time slices.
In the process of implementing the embodiments of the present disclosure, it is found that at least the following problems exist in the related art: in the prior art, when an operating system creates a task, the task is classified based on an incoming fixed parameter so as to optimize the priority of the task and the size of an occupied time slice.
Disclosure of Invention
The following presents a simplified summary in order to provide a basic understanding of some aspects of the disclosed embodiments. This summary is not an extensive overview nor is intended to identify key/critical elements or to delineate the scope of such embodiments but rather as a prelude to the more detailed description that is presented later.
The embodiment of the disclosure provides a method, a device and a computer for operating system task classification, so as to solve the technical problem of how to make the classification of operating system tasks more accurate.
In some embodiments, the method comprises:
acquiring the execution time of a task and the creation time of the task in the operation process of an operating system;
and classifying the tasks according to the utilization rate according to the execution time of the tasks and the creation time of the tasks.
In some embodiments, the apparatus comprises: comprising a processor and a memory storing program instructions, the processor being configured, upon execution of the program instructions, to perform the method for operating system task classification described above.
In some embodiments, the computer comprises: the above-mentioned device for task classification of operating system
The method, the device and the computer for classifying the tasks of the operating system provided by the embodiment of the disclosure can realize the following technical effects: the tasks are automatically classified according to the utilization rate based on the execution time of the tasks and the creation time of the tasks in the operation process of the operating system, the classification of the tasks is more accurate compared with the classification of the tasks realized through preset fixed parameters, and meanwhile, the directional optimization is conveniently carried out according to the classified tasks.
The foregoing general description and the following description are exemplary and explanatory only and are not restrictive of the application.
Drawings
One or more embodiments are illustrated by way of example in the accompanying drawings, which correspond to the accompanying drawings and not in limitation thereof, in which elements having the same reference numeral designations are shown as like elements and not in limitation thereof, and wherein:
FIG. 1 is a schematic diagram of a method for operating system task classification provided by an embodiment of the present disclosure;
FIG. 2 is a flow chart of a clustering method provided by the embodiments of the present disclosure;
FIG. 3 is a flow chart of a practical application provided by the embodiment of the present disclosure;
FIG. 4 is a schematic diagram of an apparatus for classifying tasks of an operating system according to an embodiment of the present disclosure.
Detailed Description
So that the manner in which the features and elements of the disclosed embodiments can be understood in detail, a more particular description of the disclosed embodiments, briefly summarized above, may be had by reference to the embodiments, some of which are illustrated in the appended drawings. In the following description of the technology, for purposes of explanation, numerous details are set forth in order to provide a thorough understanding of the disclosed embodiments. However, one or more embodiments may be practiced without these details. In other instances, well-known structures and devices may be shown in simplified form in order to simplify the drawing.
The terms "first," "second," and the like in the description and in the claims, and the above-described drawings of embodiments of the present disclosure, are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It should be understood that the data so used may be interchanged under appropriate circumstances such that embodiments of the present disclosure described herein may be made. Furthermore, the terms "comprising" and "having," as well as any variations thereof, are intended to cover non-exclusive inclusions.
The term "plurality" means two or more unless otherwise specified.
In the embodiment of the present disclosure, the character "/" indicates that the preceding and following objects are in an or relationship. For example, A/B represents: a or B.
The term "and/or" is an associative relationship that describes objects, meaning that three relationships may exist. For example, a and/or B, represents: a or B, or A and B.
As shown in fig. 1, an embodiment of the present disclosure provides a method for classifying tasks of an operating system, including:
s101, acquiring the execution time of a task and the creation time of the task in the operation process of an operating system;
and S102, classifying the tasks according to the utilization rate according to the execution time of the tasks and the creation time of the tasks.
By adopting the method for classifying the tasks of the operating system, the tasks can be classified according to the utilization rate based on the execution time of the tasks and the creation time of the tasks in the operating process of the operating system, so that the classification of the tasks is more accurate, the priority of the tasks with higher utilization rate is higher, and the classified tasks are more convenient to perform directional optimization.
Optionally, classifying the tasks according to the usage rates according to the execution time of the tasks and the creation time of the tasks includes: obtaining a sample point corresponding to the task according to the execution time of the task and the creation time of the task; clustering the sample points to obtain a cluster set; the cluster sets are classified according to usage. Therefore, based on the execution time and the creation time of the task in the operating process of the operating system, namely the multi-dimensional characteristic value of the task, the tasks are classified according to the utilization rate through a k-means clustering algorithm, and the higher the utilization rate is, the higher the priority of the tasks is.
In some embodiments, the execution time of the task is the total time for executing the task after the task is created, and the creation time of the task is the time from the time of creating the task to the current time, for example, a task created at 8:00 a.m. is executed for 1 hour from 8:00 to 9:00 a day and for another 1 hour from 12:00 to 13:00 a day, and the execution time of the task is 2 hours until 13:00 a.m. the day, and the creation time of the task is 5 hours.
Optionally, the abscissa of the sample point is the execution time of the task, and the ordinate of the sample point is the creation time of the task; or, the abscissa of the sample point is the creation time of the task, and the ordinate of the sample point is the execution time of the task.
Optionally, classifying the cluster set according to usage includes: obtaining the utilization rate according to the ratio of the execution time and the creation time of the task; classifying the utilization rate; and classifying the cluster set according to the classified utilization rate. Optionally, randomly selecting a sample point from each cluster set, and classifying the selected sample point according to the utilization rate to obtain the type of the sample point; the set of clusters is classified according to the type of the sample point. Optionally, the type of any sample point is determined, and the cluster set is marked with the type, or all sample points in the set and their corresponding applications are marked. For example, a sample point is arbitrarily selected from any cluster set, and when the ratio of the execution time and the creation time of the corresponding task, i.e. the execution time of the task/the creation time of the task, is greater than or equal to a set threshold, the cluster set corresponding to the sample point is marked as a high utilization rate or the tasks corresponding to all sample points in the cluster set corresponding to the sample point are marked as a high utilization rate; when the ratio of the execution time and the creation time of the corresponding task, namely the execution time of the task/the creation time of the task, is smaller than a set threshold, the cluster set corresponding to the sample point is marked as a low utilization rate or the tasks corresponding to all the sample points in the cluster set corresponding to the sample point are marked as the low utilization rate. Through this kind of mode, only need to gather each and gather the collection judge once the type can, judge the number of times and gather the quantity of collection promptly the same, compare the prior art and all carry out the mode of judging to every sample point, very big saving the calculated amount, improved classification efficiency.
Optionally, clustering the sample points comprises: taking k sample points as a first centroid; and calculating the distance between each sample point and each first centroid, and dividing the sample points according to the distance between the sample points and each first centroid to obtain a cluster set, wherein k is a positive integer. Optionally, the euclidean distance is used to calculate the distance of each sample point from each first centroid.
Optionally, calculating the distance between each sample point and each first centroid comprises:
calculating labeli=arg min||xijThe | get and sample pointA distance from the first centroid; labeliIs the distance, x, from the ith sample point to the first centroidiFor the ith sample point, μjIs the jth first centroid, i is a positive integer, j is an integer and j is greater than or equal to 1 and less than or equal to k. When the distance from the sample point i to the jth first centroid is the closest, the sample point i belongs to the cluster set of the jth first centroid. For example, the 5 th sample point is closest to the 1 st first centroid, and the 5 th sample point belongs to the clustered set of the 1 st first centroids.
In some embodiments, if k is 2, 2 first centroids are taken, and division is performed according to the distance between the calculated sample point and each first centroid, so that a sample point close to the 1 st first centroid belongs to the 1 st first centroid set, and a sample point close to the 2 nd first centroid belongs to the 2 nd first centroid set, thereby obtaining two cluster sets, which respectively represent a high-usage task and a low-usage task. Optionally, the number of the first centroids is taken to be equal to the number of the obtained cluster sets.
Optionally, after the first partition of the cluster set, the method for classifying tasks of the operating system further includes: recalculating the second centroid of each cluster set; stopping the iteration when the distance between the second centroid and the first centroid of the set of clusters is less than a set threshold.
Optionally, recalculating the second centroids for the respective cluster sets comprises:
computing
Figure BDA0002350151350000051
Get the second centroid mu'j
cjIs the jth cluster set, xaIs cjInner a-th sample point, | cjJth cluster set cjThe number of sample points in the sample; j is an integer, j is more than or equal to 1 and less than or equal to k, and a is a positive integer.
And when the distance between the newly calculated centroid of each cluster set and the original centroid of the cluster set is smaller than a set threshold value, the position of the newly calculated centroid is not changed greatly and tends to be stable, namely convergence is realized, the cluster is considered to reach an expected result, and the algorithm is terminated.
When the distance change between the newly-calculated centroid and the original centroid is larger than or equal to the set threshold, the distance between each sample point and each first centroid is recalculated, then the clustering set is divided, and then the second centroid is calculated again until the distance between the newly-calculated centroid and the original centroid of the clustering set is smaller than the set threshold, namely the clustering reaches the expected result. The tasks of the operating system are classified dynamically for a long time through the independent learning of the k-means algorithm, so that the task classification of the operating system is more accurate.
Alternatively, a sample that is stable in a certain cluster for a long time is considered as a stable sample, and a sample with frequent cluster replacement records is considered as an active sample. When the number of times of cluster replacement reaches a set threshold value, the cluster is considered to be frequently replaced, and the sample is an active sample. The stable samples do not participate in the calculation of the centroid later, so that the sample amount of the centroid is reduced, the centroid calculation complexity is reduced, and an optimization effect is achieved. And after the set time, re-judging whether the stable centroid is still in the original cluster, and if the stable centroid is changed, re-adding the stable sample into the sample library. The scheme optimizes the k-means clustering algorithm, and achieves the effects of reducing the CPU load and reducing the power consumption in a mode of sacrificing the precision, and the system running in the embedded equipment needs to have the characteristics of low power consumption and stable system, so the scheme is more suitable for the application of the embedded equipment.
In some embodiments, the system is a time-shared operating system.
In some embodiments, further comprising: and optimizing according to the classification. The method for classifying the tasks of the operating system provided by the embodiment of the disclosure has the functions of long-term autonomous learning and task feature statistics, automatically classifies the tasks according to different feature dimensions, and is more convenient for the operating system to perform directional optimization on the tasks by utilizing classification.
As shown in fig. 2, a flowchart of a k-means clustering algorithm provided in the embodiment of the present disclosure includes the following specific steps:
s201, setting a k value to be 2, taking characteristic values of 2 dimensions of the execution time of the task and the creation time of the task, setting a horizontal coordinate to be the execution time of the task, setting a vertical coordinate to be the creation time of the task, and setting the k value to be 2, dividing the set into 2 cluster sets which respectively represent a high-utilization-rate task and a low-utilization-rate task;
s202, taking 2 sample points in the coordinates as a first centroid, wherein the number of the sample points is equal to the k value.
S203, calculating the distance between each sample point and each first centroid;
s204, judging whether each sample point is closer to the 1 st first centroid, if so, executing the step S205, and if not, executing the step S206;
s205, the sample point belongs to the 1 st first centroid set, and the step S207 is continuously executed;
s206, the sample point belongs to the 2 nd first centroid set, and the step S207 is continuously executed;
s207, judging whether the residual points exist, if so, returning to the step S203, and if not, executing the step S208;
s208, recalculating respective second centroids of the two cluster sets;
s209, judging whether the distance between the second centroid and the first centroid is smaller than a set threshold, if so, executing a step S210, and if not, executing a step S211;
s210, the algorithm is terminated, and the clustering reaches an expected value;
s211, the second centroid is retained, and then the step S203 is executed.
In this way, through 1 set of k-means algorithm, feature values of different dimensions are introduced, and classification of tasks is achieved.
In practical application, as shown in fig. 3, for an actual application scenario flowchart, the method for classifying tasks of the operating system provided by the above embodiment is finally used to classify the task utilization rate, so as to optimize the task priority and ensure the time slice of the high-priority task. The method comprises the following specific steps:
s301, a user runs an operating system, such as a time-sharing operating system;
s302, counting task characteristic values by the operating system, recording the characteristic values of all tasks by the background of the operating system, wherein the characteristic values include but are not limited to: the number of times of executing the task, the size of occupied stack space, the number of times of applying for heap memory, the execution time of the task and the creation time of the task;
s303, classifying the tasks according to the task utilization rate through a K-means algorithm, transmitting the execution time length of the tasks and the creation time length of the tasks into the K-means algorithm, setting the K value to be 2, and automatically counting 2 sets by the algorithm, wherein the sets are a high-utilization-rate task set and a low-utilization-rate task set respectively;
s304, judging whether the current task is high in utilization rate, if so, executing the step S305, and if not, executing the step S307;
s305, setting a high priority, and then performing step S306;
s306, distributing long time slices;
s307, setting a low priority, and then performing step S308;
s308, short time slices are distributed.
Therefore, the tasks are classified according to the utilization rate by counting the execution time and the creation time of the tasks in the running process of the system as the characteristic values, and the higher the utilization rate of the tasks is, the higher the priority is, so that the classification of the tasks is more accurate.
As shown in fig. 4, an apparatus for classifying tasks of an operating system according to an embodiment of the present disclosure includes a processor (processor)100 and a memory (memory) 101. Optionally, the apparatus may also include a Communication Interface (Communication Interface)102 and a bus 103. The processor 100, the communication interface 102, and the memory 101 may communicate with each other via a bus 103. The communication interface 102 may be used for information transfer. The processor 100 may call logic instructions in the memory 101 to perform the method for operating system task classification of the above embodiments.
In addition, the logic instructions in the memory 101 may be implemented in the form of software functional units and stored in a computer readable storage medium when the logic instructions are sold or used as independent products.
The memory 101, which is a computer-readable storage medium, may be used for storing software programs, computer-executable programs, such as program instructions/modules corresponding to the methods in the embodiments of the present disclosure. The processor 100 executes functional applications and data processing, i.e., implements the method for operating system task classification in the above embodiments, by executing program instructions/modules stored in the memory 101.
The memory 101 may include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function; the storage data area may store data created according to the use of the terminal device, and the like. In addition, the memory 101 may include a high-speed random access memory, and may also include a nonvolatile memory.
By adopting the device for classifying the tasks of the operating system, the tasks can be automatically classified according to the utilization rate based on the execution time of the tasks and the creation time of the tasks in the operating process of the operating system, the classification of the tasks is more accurate compared with the classification of the tasks realized through preset fixed parameters, and meanwhile, the directional optimization is convenient to be carried out according to the classified tasks.
The embodiment of the disclosure provides a computer, which comprises the device for classifying the tasks of the operating system. The computer can automatically classify the tasks according to the utilization rate based on the execution time of the tasks and the creation time of the tasks in the operation process of the operating system, is more accurate in classification of the tasks compared with the classification of the tasks realized through preset fixed parameters, and is convenient for performing directional optimization according to the classified tasks.
Embodiments of the present disclosure provide a computer-readable storage medium storing computer-executable instructions configured to perform the above-described method for operating system task classification.
Embodiments of the present disclosure provide a computer program product comprising a computer program stored on a computer readable storage medium, the computer program comprising program instructions which, when executed by a computer, cause the computer to perform the above-described method for operating system task classification.
The computer-readable storage medium described above may be a transitory computer-readable storage medium or a non-transitory computer-readable storage medium.
The technical solution of the embodiments of the present disclosure may be embodied in the form of a software product, where the computer software product is stored in a storage medium and includes one or more instructions to enable a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method of the embodiments of the present disclosure. And the aforementioned storage medium may be a non-transitory storage medium comprising: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes, and may also be a transient storage medium.
The above description and drawings sufficiently illustrate embodiments of the disclosure to enable those skilled in the art to practice them. Other embodiments may incorporate structural, logical, electrical, process, and other changes. The examples merely typify possible variations. Individual components and functions are optional unless explicitly required, and the sequence of operations may vary. Portions and features of some embodiments may be included in or substituted for those of others. Furthermore, the words used in the specification are words of description only and are not intended to limit the claims. As used in the description of the embodiments and the claims, the singular forms "a", "an" and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. Similarly, the term "and/or" as used in this application is meant to encompass any and all possible combinations of one or more of the associated listed. Furthermore, the terms "comprises" and/or "comprising," when used in this application, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof. Without further limitation, an element defined by the phrase "comprising an …" does not exclude the presence of other like elements in a process, method or apparatus that comprises the element. In this document, each embodiment may be described with emphasis on differences from other embodiments, and the same and similar parts between the respective embodiments may be referred to each other. For methods, products, etc. of the embodiment disclosures, reference may be made to the description of the method section for relevance if it corresponds to the method section of the embodiment disclosure.
Those of skill in the art would appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software may depend upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the disclosed embodiments. It can be clearly understood by the skilled person that, for convenience and brevity of description, the specific working processes of the system, the apparatus and the unit described above may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the embodiments disclosed herein, the disclosed methods, products (including but not limited to devices, apparatuses, etc.) may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the units may be merely a logical division, and in actual implementation, there may be another division, for example, multiple units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form. The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to implement the present embodiment. In addition, functional units in the embodiments of the present disclosure may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). In some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. In the description corresponding to the flowcharts and block diagrams in the figures, operations or steps corresponding to different blocks may also occur in different orders than disclosed in the description, and sometimes there is no specific order between the different operations or steps. For example, two sequential operations or steps may in fact be executed substantially concurrently, or they may sometimes be executed in the reverse order, depending upon the functionality involved. Each block of the block diagrams and/or flowchart illustrations, and combinations of blocks in the block diagrams and/or flowchart illustrations, can be implemented by special purpose hardware-based systems that perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.

Claims (10)

1. A method for operating system task classification, comprising:
acquiring the execution time of a task and the creation time of the task in the operation process of an operating system;
and classifying the tasks according to the utilization rate according to the execution time of the tasks and the creation time of the tasks.
2. The method of claim 1, wherein classifying the tasks according to usage rates based on execution time of the tasks and creation time of the tasks comprises:
obtaining a sample point corresponding to the task according to the execution time of the task and the creation time of the task;
clustering the sample points to obtain a cluster set;
and classifying the cluster set according to the utilization rate.
3. The method of claim 2, wherein the abscissa of the sample point is the execution time of the task and the ordinate of the sample point is the creation time of the task; or the like, or, alternatively,
the abscissa of the sample point is the creation time of the task, and the ordinate of the sample point is the execution time of the task.
4. The method of claim 2, wherein classifying the set of clusters according to usage comprises:
obtaining the utilization rate according to the ratio of the execution time and the creation time of the task;
classifying the usage rates;
and classifying the cluster set according to the classified utilization rate.
5. The method of claim 2, wherein clustering the sample points comprises:
taking k sample points as a first centroid;
and calculating the distance between each sample point and each first centroid, and dividing the sample points according to the distance between the sample points and each first centroid to obtain a cluster set, wherein k is a positive integer.
6. The method of claim 5, further comprising:
recalculating the second centroid of each cluster set;
stopping the iteration when the distance between the second centroid and the first centroid of the set of clusters is less than a set threshold.
7. The method of claim 6, wherein said recalculating the second centroid for each set of clusters comprises:
computing
Figure FDA0002350151340000021
Obtaining the second centroid mu'j
C is mentionedjFor the jth cluster set, the xaIs cjInner a-th sample point, | cjJth cluster set cjThe number of sample points in the sample; j is an integer, j is more than or equal to 1 and less than or equal to k, and a is a positive integer.
8. The method of claim 5, wherein calculating the distance between each sample point and each first centroid comprises:
calculating labeli=arg min||xijObtaining the distance between the sample point and the first centroid; labeliIs the distance of the ith sample point to the first centroid, the xiFor the ith sample point, the μjIs the jth first centroid, i is a positive integer, j is an integer and j is greater than or equal to 1 and less than or equal to k.
9. An apparatus for operating system task classification comprising a processor and a memory having stored thereon program instructions, characterized in that the processor is configured to carry out the method for operating system task classification according to any one of claims 1 to 8 when executing the program instructions.
10. A computer comprising an apparatus for operating system task classification as claimed in claim 9.
CN201911411772.3A 2019-12-31 2019-12-31 Method, device and computer for classifying tasks of operating system Active CN111158883B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911411772.3A CN111158883B (en) 2019-12-31 2019-12-31 Method, device and computer for classifying tasks of operating system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911411772.3A CN111158883B (en) 2019-12-31 2019-12-31 Method, device and computer for classifying tasks of operating system

Publications (2)

Publication Number Publication Date
CN111158883A true CN111158883A (en) 2020-05-15
CN111158883B CN111158883B (en) 2023-11-28

Family

ID=70560323

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911411772.3A Active CN111158883B (en) 2019-12-31 2019-12-31 Method, device and computer for classifying tasks of operating system

Country Status (1)

Country Link
CN (1) CN111158883B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102195813A (en) * 2011-05-04 2011-09-21 成都勤智数码科技有限公司 Method and device for intelligently creating operation and maintenance worksheet
CN103123575A (en) * 2011-11-18 2013-05-29 北京兴宇中科科技开发股份有限公司 Data write-in method
CN107067045A (en) * 2017-05-31 2017-08-18 北京京东尚科信息技术有限公司 Data clustering method, device, computer-readable medium and electronic equipment
CN109445936A (en) * 2018-10-12 2019-03-08 深圳先进技术研究院 A kind of cloud computing load clustering method, system and electronic equipment
CN110427256A (en) * 2019-07-23 2019-11-08 中南民族大学 Job scheduling optimization method, equipment, storage medium and device priority-based

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102195813A (en) * 2011-05-04 2011-09-21 成都勤智数码科技有限公司 Method and device for intelligently creating operation and maintenance worksheet
CN103123575A (en) * 2011-11-18 2013-05-29 北京兴宇中科科技开发股份有限公司 Data write-in method
CN107067045A (en) * 2017-05-31 2017-08-18 北京京东尚科信息技术有限公司 Data clustering method, device, computer-readable medium and electronic equipment
CN109445936A (en) * 2018-10-12 2019-03-08 深圳先进技术研究院 A kind of cloud computing load clustering method, system and electronic equipment
CN110427256A (en) * 2019-07-23 2019-11-08 中南民族大学 Job scheduling optimization method, equipment, storage medium and device priority-based

Also Published As

Publication number Publication date
CN111158883B (en) 2023-11-28

Similar Documents

Publication Publication Date Title
US20170149690A1 (en) Resource Aware Classification System
CN110969198A (en) Distributed training method, device, equipment and storage medium for deep learning model
CN103403699A (en) Estimating load shed data in streaming database applications
CN113312361B (en) Track query method, device, equipment, storage medium and computer program product
US9298807B1 (en) Techniques for dynamic partitioning in a distributed parallel computational environment
CN110414569A (en) Cluster realizing method and device
CN111984414B (en) Data processing method, system, equipment and readable storage medium
CN112367269A (en) Double-pointer-based sliding window current limiting method, device, equipment and storage medium
CN111625367B (en) Method for dynamically adjusting read-write resources of file system
CN105022668A (en) Job scheduling method and system
WO2017095439A1 (en) Incremental clustering of a data stream via an orthogonal transform based indexing
WO2017095413A1 (en) Incremental automatic update of ranked neighbor lists based on k-th nearest neighbors
CN109521970B (en) Data processing method and related equipment
CN112766390A (en) Method, device and equipment for determining training sample
CN116089477B (en) Distributed training method and system
WO2017065795A1 (en) Incremental update of a neighbor graph via an orthogonal transform based indexing
CN112817428A (en) Task running method and device, mobile terminal and storage medium
CN111158883A (en) Method and device for operating system task classification and computer
CN104050189A (en) Page sharing processing method and device
CN115238837A (en) Data processing method and device, electronic equipment and storage medium
CN101159663B (en) Interface scheduling method and interface scheduling device
US20170139595A1 (en) Storage Conditioning With Intelligent Rebuild
US20220178899A1 (en) Manufacturing a biologic pharmaceutical using causal models
CN111783869A (en) Training data screening method and device, electronic equipment and storage medium
CN111966478A (en) Custom task ordering method and device, electronic device and medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant