Songbun and the five castes of North Korea
The most important element in the social structure of Kim Il Sung's North Korea was the infamous songbun system. This system was established in the late 1950s and came into full power somewhere around 1967. It divides the population into groups, according to the actions and status of their paternal ancestor (and themselves, depending on their age) during the Japanese colonial period and the Korean War. Songbun determined, among other things, whether one was allowed to live in the capital or in special cities like Kaesong and later Rason, the workplace one is allocated and what kind of education one can receive.
While there have been some academic works related to songbun, they are, sadly, either outdated, incomplete or, usually, both: Academics do not have access to North Korean documents and instructions related to songbun are always classified. Fortunately, I have a friend who served in the North Korean police and had to deal with these documents often. Thanks to him I can now explain how songbun operates.