Before I attempt to clarify, I quote your statement
I mean in miss rate we get every information about page table and valid/invalid bit
We do not get anything in miss rate. Miss rate is defined as number of times, a page could not be found in main memory. Suppose you access main memory 100 times for different pages and out of this, 90 times, you get a page in main memory while for other 10 times, you do not find a page in main memory. So, for 10 accesses you missed to find a page in main memory. This is 10% of the total accesses. So, miss rate here is 10%.
Now, that you are clear with miss rate, let me attempt to clarify miss penalty. When you missed to find a page in main memory, you would need to
- Find a page in secondary memory i.e access secondary memory
- Transfer a page from secondary memory to main memory
- Optionally, may need to save the page present in main memory to secondary memory if the page has to be replaced with the page currently obtained from secondary memory needs to be put at the same
Above operations were not needed had you found a page in main memory, as you would have directly accessed it. All above operations are costing you extra time (and yes a processing power). This means above operations are something extra that you are doing as you missed to find a page in main memory. This means you are being penalized for not being able to find a page in main memory, by the way of performing extra operations to get a page. This is called miss penalty.
Hope this helps !