I am looking for an answer regarding the CPU read and write. We know there are two clocks that are working in the computer system, one is the peripheral clock and the other is the CPU own clock on which its control systems are working. I am familiar with the clock domain crossing but I dont understand how the CPU read and write data working on different clocks. For example the CPU sends the data to be written on the data bus and address on the address bus. Since the rest of the peripherals are working on their own clocks such as PCI or other standards, Now the CPU which is working on its own clock will execute the next instruction send the address again on the address bus and the data on the data bus to the same peripheral but data bits have still not been read by the peripheral so doesnt the data will be lost in this process or is there any mechanism of handling this situation ?
That's why buffers are used.
While the transfer is in progress the peripheral writes the data into a buffer and the cpu ignores it and just works on its own clock.
Then when the transfer to the buffer is complete the peripheral will issue an interrupt (or other toggle a transfer complete pin) and the cpu will read from the buffer and if applicable let the next transfer start.
The buffer used can be the RAM this is often referred to as Direct Memory Access. The peripheral is attached to the memory bus and can issue reads and writes to ram directly.