Let's say there is a fork and there are two valid blocks. How do the miners choose which block to work on if they receive both the valid blocks at the same time(Is this possible?)? After this decision, one block becomes the ommer block and won't be placed on the main chain. What parameters are considered during this decision?
Also, how long does it take (how many blocks) for a fork to generally get resolved in the Ethereum public blockchain network?