Runtime Systems for Persistent Memories