The Type of Service field in the IP header was originally defined in RFC 791. It defined a mechanism for assigning a priority to each IP packet as well as a mechanism to request specific treatment such as high throughput, high reliability or low latency.
In RFC 2474 the definition of this entire field was changed. It is now called the "DS" (Differentiated Services) field and the upper 6 bits contain a value called the "DSCP" (Differentiated Services Code Point). Since RFC 3168, the remaining two bits (the two least siginficant bits) are used for Explicit Congestion Notification.
The most signficant three bits of the DSCP (corresponding directly to the IP Precedence) are referred to as the Class Selector.
Chapter from "Traffic Engineering with MPLS"