# Quality-of-Service-Linked Privileged Content-Caching Mechanism for Named Data Networks
## 4 QoS-Linked Privileged Content Caching  
The QLPCC manages the QoS traffic through dedicated QoS nodes. QoS nodes are embedded as intermediate NDN nodes between a consumer and a producer, specifically for handling QoS contents in terms of content caching and PIT management, as proposed in the QLPCC strategy. Other non-QoS NDN nodes do not differentiate between regular and privileged traffic, and handle them according to standard PIT and CS policies. This method benefits regular traffic, allowing it to obtain its fair share of network bandwidth. This proposal introduces the implementation of Flow Tables for PIT management and QoS Tables for content store management policies of content eviction and content-admission control, as novel proposals to be implemented in QoS nodes. The Flow Table identifies the content name, extracts the Flow ID, determines the equivalence class, and calculates the eviction score. For each traffic flow, a Flow ID is assigned to identify the content streams and to provide a continuous streaming path through the QoS node. The eviction score provides a measure of importance that the PIT entry has among the content of the same QoS privilege. This helps PIT eviction strategies to decide when there are overlapping candidates with the same degree of privilege. The PIT entry-eviction strategy is presented in Algorithm 1. A detailed description of the working of the Flow Table, along with the PIT entry-eviction algorithm, is provided in Section 4.1. ```
Evict all TTL-expired interest entries for Regular content names in PIT do  Evict the content name entry with the highest eviction score return evicted content name endfor  Reliable content names in PIT do  Evict the content name entry with the highest eviction score return evicted content name endfor for Prompt content names in PIT do  Evict the content name entry with the highest eviction score return evicted content name endfor
```  
**Algorithm 1** PIT entry-eviction algorithm. The QoS Table identifies the content name, extracts the Flow ID, monitors the content time stamp and expiry time, and documents the path of the QoS nodes where a given Flow ID is adopted. Content names are used to extract Flow ID and QoS privilege. The content-eviction algorithm examines the expiry time for evicting the obsolete content and freeing up the memory. QoS privilege provides the order in which the content has to be considered for eviction. The content-eviction strategy, presented in Algorithm 2, is called when the CS memory is exhausted and there is a need to free up the limited available memory. The content-admission-control strategy is presented in Algorithm 3. A detailed description of the working of the QoS Table, along with the content-eviction and admission-control algorithms, is provided in Section 4.2. ``` \begin{tabular}{l} \hline \hline \multicolumn{2}{l}{Evict all time-expired obsolete content} \\ \multicolumn{2}{l}{for Prompt content in content store do} \\ \multicolumn{2}{l}{Apply LFU} \\ \multicolumn{2}{l}{Apply LFF} \\ \multicolumn{2}{l}{Evict the content overlapped by LFU and LFF, followed by LFU content} \\ \multicolumn{2}{l}{return evicted content name} \\ \multicolumn{2}{l}{endfor} \\ \multicolumn{2}{l}{for Reliable content in content store do} \\ \multicolumn{2}{l}{Apply LFU} \\ \multicolumn{2}{l}{Apply LFF} \\ \multicolumn{2}{l}{Evict the content overlapped by LFU and LFF, followed by LFU content} \\ \multicolumn{2}{l}{return evicted content name} \\ \multicolumn{2}{l}{endfor \\ \hline \hline \end{tabular} 
``` ifContent Store memory full then  Call content-eviction procedure end if if ifFlow ID adopted by content store then  Cache the content else  Issue interest packet for QoS table update  Lookup the QoS table for the QoS node which has adopted the given Flow ID if FlowID adopted?