C
C
coder2022-03-10 09:28:23
Operating Systems
coder, 2022-03-10 09:28:23

How does the OS isolate processes from each other?

There is process 1 and process 2. Can process 1 read the address space of process 2. If so, if it starts modifying the address space of another process, will the OS just close this application?

This question arose after a superficial study of the principle of cheats in games. They change the value at the offset in the running program. It is also always said that cheats need to be run with administrator rights. Does this mean that administrator rights allow you to read, change values ​​in the address space of another running user process?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
res2001, 2022-03-10
@RomanSamets

Isolation is implemented using virtual memory. Those. those addresses to which the program refers internally are not actually addresses of real memory - these are virtual addresses. They are automatically converted by the processor into real addresses using special tables (TLB) and only after that the real memory is accessed. Each process has its own set of these tables. These tables are created by the OS when the process is created.
Thanks to the same mechanism, it is possible, incl. implement a memory swap to disk and subsequent memory recovery from disk.

Can process 1 read the address space of process 2.

Yes
if it starts modifying the address space of another process, will the OS just close that application?

If you just madly poke at arbitrary addresses, then most likely this will happen. But if you know which addresses you need to address and that the memory is exactly allocated there and it can be read / written, then it is quite possible to address.
Does this mean that administrator rights allow you to read, change values ​​in the address space of another running user process?

That's why he's an administrator. The administrator can usually do anything that the operating system allows you to do. It is the operating system mechanisms that allow access to the memory of another process. Processes are an abstraction of the OS.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question