Ulamog, the Ceaseless Hunger

Oracle Text

When you cast this spell, exile two target permanents.

Indestructible

Whenever Ulamog, the Ceaseless Hunger attacks, defending player exiles the top twenty cards of their library.

Card Rulings

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 their library, exile all of them. That player won’t lose the game until they have to draw a card from an empty library.