
user space - main and virtual adress space
"Virtual address space is the range of memory addresses given to a process by the operating system. These addresses are virtual, meaning they don't directly refer to physical RAM — they are managed by the system using actual RAM and sometimes disk (swap) in the background."
- It's a range of addresses the process thinks it can use.
- ❌ It's not in "virtual RAM" — because virtual RAM isn't a thing technically.
- ✅ It's part of virtual memory, which is a system combining RAM + swap.
- ✅ The OS and hardware handle the mapping from virtual addresses → real physical locations.
✅ Simplicity: Every program thinks it's the only one running and can use all memory from 0x00000000 to 0xFFFFFFFF.

- we open the file with permission and assign it return value to a file descriptor

- A file descriptor (FD) is a small integer (number) that a program uses to access a file or I/O resource like:each process gets it’s own filed descriptor table where the file they want to acess is given a number first 3 are reserved
- so basically whenever we open a file in a process in it procees unique file system we assign that file a number this number will be used bu=y other file operation fuctions to refer to this file
- and as it is process specific different processes can have overlapping file descriptors
- Example: If a process opens a file /home/user/data.txt, it might get file descriptor 3. The process uses 3 to read or write to that file.