In my area we have something called "Goals of Care". People can choose from three levels of resuscitative care (everything, everything except chest compressions, or meds only - no chest compressions and no intubation), two levels of medical care (admit to hospital and treat active medical conditions but no resuscitation and no ICU admit; M1 allows for surgery while M2 allows surgery only as a comfort measure), and two levels of comfort care (treat symptoms only; C1 still allows for palliative surgery but C2 does not as C2 is most appropriate for patients who are actively dying). This takes into account the fact that a straight DNR is really very simplistic and doesn't include consideration of other treatments. Patients go over the Goals of Care with their provider during each admission and are given a copy to take home. They're told to put it on their fridge so that if they need to call EMS the staff can quickly and easily find the document.
Although strictly speaking age shouldn't be a determining factor, you do have to remember that in a very old person CPR isn't likely to be effective. (CPR works in people over 65 less than 1% of the time). Remember that it's not very common for someone to experience a sudden spontaneous arrest. They do happen, but usually the person already has pre-existing health issues and the arrest wasn't unexpected. In most cases the heart stopping is the last in a sequence of events in which the body progressively shuts down. By the time the heart stops there's no one left to save because the rest of the body is already gone.