Categories
Linux Tutorial Series

Linux Tutorial Series – 6 – User space and system space – what is the difference?

Here is the video version, if you prefer it:

User space is the space that “normal” processes use. System space (aka kernel space) is the space that only the operating system can use.

See, every program has to be stored in random access memory (RAM). That means that the operating system also has to be stored in RAM. (Ward, 2014)⁠ So the operating system uses the RAM, user programs (your normal every day programs such as Mozilla Firefox) use the RAM, everyone uses the RAM! Now, the thing about the operating system is, because of security reasons and because of potential issues, it limits the user processes to a part of RAM called user space and the operating system resides in a different part of the RAM. If any process (process being another word for a program you have started on your computer) tries to access any part of the memory which is not its own, it can’t. The operating system makes sure of it. The figure below should help clarify things.

Figure 1 – System and user space (my own illustration)

Hope you learned something useful!

References

Ward, B. (2014). How Linux Works: What Every Superuser Should Know (2nd ed.). No Starch Press. Pages 8-9