Although the U.S. (and allies) are currently reviewing military options for dealing with North Korea, a conflict that would ultimately result in the regime being eliminated, one must also consider what the reaction of China and Russia are likely to be. There are unconfirmed reports that both Russia and China have begun feeding additional troops & equipment into the border area with North Korea. If true, then it means that either A.) The troops are preparing to deal with the anticipated flood of refugees from American attacks or B.) that Russia and China would launch their own invasion of North Korea once American attacks started.
With the commencement of an American/South Korean invasion, it would be clear to military leaders in Moscow & Beijing that whatever else might happen, the North Korean regime as it has existed for the last 65-70 years is finished. This means from Beijing’s (and to a lesser extent Moscow’s) perspective that their buffer state against having an American friendly government sitting on their border (and perennial thorn in America’s side) is about to disappear. Consequently, one or both China and/or Russia may opt to invade North Korea on their own in order to keep U.S./South Korean troops from advancing all the way up to the Yalu River (the border with China). While this would not be a repeat of the original Korean War in which Chinese troops pushed America back and effectively reconquered North Korea, it would mean that an American advance in the North would be halted by the presence of Chinese/Russian troops. In order to advance further and take all of North Korea, the Americans would essentially have to go to war with China/Russia, which of course we will not do.
One goal of the invasion would be to the secure the nuclear sites, which are in the north of the country, before U.S. or South Korean troops arrive. The reason is that if South Korea seizes the nuclear facilities, China & Russia will effectively have an America-friendly nuclear power sitting on their doorstep. This would be the worst of all possible outcomes from the Chinese perspective. This will mean a shift in the balance of power in East Asia away from China and in America’s favor.
The second goal of the invasion would be to gain control of as much territory as possible. In other words, keep the U.S. and South Korean troops as far south as possible. While it is unlikely that China and Russia would believe that they could hold onto Korean territory (i.e. maintain a smaller buffer zone between their borders and the new, more northern, “South Korea” border), holding Korean territory would give them a say in post-war negotiations as to what the re-united Korean peninsula would look like (i.e. regarding future American military bases, etc. etc. etc).
China has been trying to prop up the North Korean regime because it acts as a buffer with South Korea and it causes the U.S. headaches. Faced with losing these advantages, China (and possibly Russia) is likely to take action to try and salvage as much as they can out of the situation. As ironic as it may seem, China and Russia could end up joining with the U.S. and South Korea in ultimately taking out the North Korean regime.
Of course, they could also sit tight and simply decide to deal with the inevitable stream of refugees. But faced with a collapsing regime, there would be many benefits that would accrue to Russia and China by joining in on the invasion. Therefore, I think that that this would be their likely course of action.