First-come, first-served
That said, I almost always put my laptop backpack under the seat in front of me. The only exception is when I know I'll have one of those aisle seats where the space on the floor is limited (width-wise) by the seat supports. That's the only time I put both carry-ons in the overhead.