Quality of Service Classes(QoS) is an API with the help of which you can tell the Operating System what kind of work you are doing with what priority. This API is used in situation when you run out of CPU s to perform tasks and can't set priority of tasks i.e. in which order they will execute. Quality of Service Classes(QoS) are nothing more than flags which you will be feeding to dispatch objects to communicate to OS. Different four types of QoS are stated below:
1.) User Interactive(UI)
2.) User Initiative(IN)
3.) Utility(UT)
4.) Background(BG)
Each of these classes performs different functionality and have a particular priority and are used for resource control to effectively execute your code. Resource control means managing CPU Scheduling, I/O priority, CPU throughput , CPU efficiency etc.