یکی از بناهای تاریخی که خیلی دوستش دارم و آرزومه که یه روزی برم، colosseum واقع در ایتالیاس.
از وقتی که تاریخش و نحوهی ساختش رو خوندم، علاقهم بهش چند برابر شد.
اگر دوست دارید بیشتر بدونید راجب این بنا، پیشنهاد میکنم این ویدئو رو ببینید.
از وقتی که تاریخش و نحوهی ساختش رو خوندم، علاقهم بهش چند برابر شد.
اگر دوست دارید بیشتر بدونید راجب این بنا، پیشنهاد میکنم این ویدئو رو ببینید.
❤6💩2👍1👎1🔥1
امروز ۳بار توی دیباگ با یه مشتریمون حواسم نبود و گفتم عرض میکردید.
🤣8😁1🥱1
In modern CPUs, especially in the context of the amd64 architecture, the distinction between code and data is not made through segmentation but through a different mechanism called paging, which is part of the memory management unit (MMU).
Here's how the CPU identifies what is code and what is data:
1. Paging:
The MMU uses a page table to map virtual addresses to physical addresses. Pages can be flagged as executable or non-executable, which helps the CPU determine if the content at a particular address is code or data.
2. Protection Flags:
Each page in the page table has protection flags that indicate whether it contains code, data, or both, and whether it is readable, writable, or executable. The CPU uses these flags to enforce access controls.
3. Program Loading:
When a program is loaded into memory, the operating system loads the executable code into pages marked as executable. The data sections are loaded into separate pages with appropriate flags.
4.Instruction Pointer (IP):
The IP register in the CPU points to the next instruction to be executed. The CPU fetches instructions from the memory location pointed to by the IP. If the IP points to a non-executable page, an exception is raised.
5. Modern CPU Features:
Features like the NX (No Execute) bit are used to prevent execution of code from areas of memory marked as non-executable, which is typically where data resides.
In summary, while segmentation as a primary method for separating code and data is not used in the same way as it was in older architectures, modern systems use a combination of paging, protection flags, and CPU features to manage memory and distinguish between code and data effectively
Here's how the CPU identifies what is code and what is data:
1. Paging:
The MMU uses a page table to map virtual addresses to physical addresses. Pages can be flagged as executable or non-executable, which helps the CPU determine if the content at a particular address is code or data.
2. Protection Flags:
Each page in the page table has protection flags that indicate whether it contains code, data, or both, and whether it is readable, writable, or executable. The CPU uses these flags to enforce access controls.
3. Program Loading:
When a program is loaded into memory, the operating system loads the executable code into pages marked as executable. The data sections are loaded into separate pages with appropriate flags.
4.Instruction Pointer (IP):
The IP register in the CPU points to the next instruction to be executed. The CPU fetches instructions from the memory location pointed to by the IP. If the IP points to a non-executable page, an exception is raised.
5. Modern CPU Features:
Features like the NX (No Execute) bit are used to prevent execution of code from areas of memory marked as non-executable, which is typically where data resides.
In summary, while segmentation as a primary method for separating code and data is not used in the same way as it was in older architectures, modern systems use a combination of paging, protection flags, and CPU features to manage memory and distinguish between code and data effectively
👍6