Linux Process Priority and nice value, linux priority nice
After learning the complete Fair Scheduling Algorithm (CFS) of linux, record the learning track
This article mainly describes how the scheduling algorithm works and some scheduling knowledge.
Three scheduling strategies for the Linux kernel:1,sched_other time-sharing scheduling strategy,2,sched_fifo Real-time scheduling strategy, first-come-first service. Runs continuously once the CPU is occupied. Keep running until a higher priority
The prioritization needs to be considered in the following situations:1, the I/O process, let it into the highest priority queue, in time to respond to the process requiring I/O interaction. Typically, a small time slice is executed, in which the
1. What is process schedulingIn both batch and time-sharing systems, the number of user processes is generally greater than the number of processors, which will cause them to compete with each other for the processor. In addition, the system process
1. What is process schedulingIn both batch and time-sharing systems, the number of user processes is generally greater than the number of processors, which will cause them to compete with each other for the processor. In addition, the system process
Linux Process Priority 1. How to query the PID and pri value of the crond program [root @ localhost ~] # Ps-lfC crondF s uid pid ppid c pri ni addr sz wchan stime tty time CMD1 S root 3847 1 0 78 0-1621? 00:00:00 crond [root @ localhost ~] # Run www.
# # #进程优先级 (an app can have multiple processes, such as processes with activity and service,)* Five types of foreground processes* A process that has an activity (Onresume call) that is interacting with the user* A process that has a service bound
1. Foreground process2. Visible process3. Service Process4. Background process5. Empty processDifferences between new and direct threads in the service:The new thread will be the background process directly in the activity.Service in the new thread
View priority levelsPS-E-O Class,rtprio,pri,nice,cmdManually adjust the priority level100-139:niceNice N COMMAND program starts with this priorityRenice-n PID sets priority on already running programs1-99:Chrt-f-P PID adjustment of FFChrt-r-P POD
Linux because the number of processes to run more than the actual number of physical core, so it uses the time slice technology, operating system process through the scheduling on each single core CPU fast process task switching, because this switch
There was a phone interview a few days ago, and was asked about the priority of the Android process, which almost didn't come back at the time, fortunately, when the interviewer was about to skip the problem.Android divides the process into priority
The activity's OnPause () method is called, but the OnStop () method is not called). Typically, a dialog box pops up while the activity is running, but it is still visible when the activity is not the foreground activity.B. The process contains the
Recently, I want to run the ahrd of the entire pineapple genome to do a lot of blast, but some people are using the CPU, and my task is very important, so I want the CPU to run my process first.
Priority value (smaller value) = priority coefficient
CPU resource allocation by a process refers to the priority of a process ). Processes with high priority have the right to execute first. Configuring process priority is useful for linux in multi-task environments and can improve system performance.
I read the official documents of Android just now, and I understand more about the process priority and service. In order to manage memory and release limited space, Android will kill some processes based on their priorities, and the process with
The process priorities in Android are as follows:1. Foreground process: the activity that interacts with the user in the foreground, or the service bound with the foreground activity, these two processes are called foreground processes.2. Visible
The priority range that can be adjusted by the nice value is 100~139, which corresponds to -20~19When the process starts, its nice value defaults to 0, which translates to a priority of 120NiceRun the command with the specified nice valueThe default
1. In the service override the following method, this method has three return values, Start_sticky is the service was killed after the automatic override created
@Override
public int Onstartcommand (Intent Intent, int flags, int Startid)
Process classifications in Linux systems:Interactive process (IO-intensive)Batch process (CPU intensive)Real-time process (daemon)Balanced process IO-intensive and CPU-intensive methods:High priority for IO-intensive: Short CPU time slicesFor
Abstract: By setting and changing the priority of a process, the process obtains the required run time segment.1 Overview
This article will help you lay a solid foundation in the following aspects:
(1) Understanding Process Priority
(2) set
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.