How are shares allotted in an oversubscribed IPO?

How are shares allocated to investors during an oversubscribed IPO process?,