algorithm - How to stop the virus-like program from corrupting memory -
i asked question in recent technical interview. suppose there program generates random memory addresses , manipulates contents. scheme should employ prevent happening. my answer having pre-shared key our processes , whenever process submitted there separate process asks psk. if correct entry pid made in hash table stored in memory marking legitimate process. dont know how far correct , scheme requires changes processes. how going achieve had no idea. think correct solution. the scheme called protected memory , implemented memory management unit inside cpu, programmed os.