When you cast Ulamog, the Ceaseless Hunger, exile two target permanents.
Whenever Ulamog attacks, defending player exiles the top twenty cards of his or her library.
8/25/2015 Ulamog’s first ability resolves independently of Ulamog once they’ve both been put on the stack. If Ulamog is countered, that triggered ability will still resolve. That triggered ability will always resolve before Ulamog does.
8/25/2015 Cards exiled by Ulamog’s first and third abilities are exiled face up.
8/25/2015 If the player has less than twenty cards in his or her library, exile all of them. That player won’t lose the game until he or she has to draw a card from an empty library.