Drop priviledges only after using them.
Neither scheduling nor memlock() wishes are successful when not root.