In an extract from her new book Crazy Age, the 77-year-old author takes a stark – and very personal – look at the realities of growing old in the 21st century

A statistic from nowhere, or nowhere I remember, but it has the ring of truth: if most of us can look forward to living for about 10 years longer than our parents, we can also expect to spend the equivalent of eight of those years in hospital or doctors' waiting-rooms. When, at nearly 80, Gore Vidal was asked to explain why he had left Italy for California, he spoke of his future as "the hospital years".

My local hospital is ugly on the outside and beautiful within, though both the outside and the inside seem differently determined to masquerade as something that is not a hospital. Its modern facade was meant to fit into the shops it sits among, and tucked into it are a post office, a cafe, a mobile phone shop and another shop that sells the unhealthiest snacks and fizzy drinks known to the western world. Desperate smokers – patients on crutches, in wheelchairs and dressing-gowns, nurses, doctors, visitors – cough and cluster outside.

Inside, however, there are constant and changing exhibitions of sculpture, pictures and mobiles. The building itself is curiously ship-like, constructed to seem open to the sky. There are wards from which you might gaze out across the roofs of London with a telescope to one eye, and walkways like gangplanks, and a chapel suspended in space, a kind of crow's nest from which to survey the turbulence below.

In this surprising building, I have now been in receipt of two new knees and weeks of physiotherapy in a hot pool and a gym. Twice a year I have my eyes tested for glaucoma and for mysterious "drusen" growths at the sides of my eyes, which must be stopped from putting pressure on the optic nerve. Also twice a year I go less happily through the endoscopy department to emerge bloated and suffering after a "procedure" I shall decently leave to the imagination. I have had x-rays of most bits of me and MRI scans, and tests for heart and lungs on a machine that simulates running uphill. I have been asked to count backwards in sevens and remember the name of the prime minister (part of a somewhat cursory test for Alzheimer's).

Only my teeth fail to interest anyone in this glorious NHS galleon, and for their sorry state I travel by three forms of public transport to north London, sometimes once a week. All that doesn't quite add up to four-fifths of my life, but it is mounting up.

I'm not sure this new familiarity with the inside of a large teaching hospital is especially cheering or enlightening, but it is intrinsic to contemporary experience. Philip Roth's book Everyman springs brilliantly out of the new knowingness – no doubt partial and amateurish, but full of relish for the language and the detail – that we all now exhibit about disease and treatment and dying. Here, for instance, is Roth's hero talking on the telephone to the wife of his old friend, who died suddenly at home while she was out to lunch: "Was it a stroke or was it a heart attack?" he asked.

"It was a myocardial infarct."

"Had he been feeling ill?"

"Well his blood pressure had been – well, he had a lot of trouble with his blood pressure. And then this past weekend he wasn't feeling so great. His blood pressure had gone up again."

"They couldn't control that with drugs?"

Roth's unnamed hero, his Everyman, is understandably interested in the manner of his friend's dying. He probably owns his own blood-pressure gauge too.

I should add that in general I am in remarkably good health. I hardly ever get colds or flu. I can now walk for miles with my new knees and stand for quite long stretches at bus stops or in exhibitions. I hardly ever sleep in the day (but don't sleep nearly enough in the night) and I eat and drink as much and as indiscriminately as I ever did.

My natural competitiveness let me down badly when I was assessed at the town hall for a temporary disability parking badge for my car. It was before I'd had my knees replaced, and I was having difficulty walking. There, in a tiny office, with an old-fashioned games teacher checking me for any tricks I might get up to, I found myself unable to resist showing her that I could still touch my toes, with my hands flat on the ground. Proving, I suppose, that I have long arms, short legs and little in the way of persuasive gifts. I was denied the badge.

Old people are often told they're "marvellous" for simply being there and not complaining much. As though our longevity or our susceptibility to disease were entirely up to us, were choices we make: pain and illness the outward signs of weakness, vacillation, lack of character; health the well-earned consequence of courage and the right amount of moral fibre. The man or woman who meekly submits to illness and death rather than "fighting" it, "putting up a struggle", is unlikely to figure gloriously in obituary columns.

What are we allowed to say about pain? The hardest aspect of it is the difficulty of describing it, measuring it, knowing if it is better or worse, more or less, than anyone else's or, indeed, our own on another day. When a doctor's report from the endoscopy department included the words "low pain threshold" I felt accused and slandered. How could he know that? How can any of us know? Perhaps the pain was beyond anyone's threshold. We'll never know.

This is all the more important now that the sinister word "triage" has been reintroduced into medical practice, reminiscent of Florence Nightingale and her nurses patrolling the tents in the Crimea in order to decide which of the wounded were worth treating, which should be attended to first and which were not worth bothering about because they were bound to die anyway. It may no longer be wise to show fortitude under stress if we want our ailments to be taken seriously.

I woke this morning with an ominous pain on the right side of my chest. There are some good things about new, sharp pains: they tend to blot out the older, more persistent ones. So, unusually, I had no cramp in my legs, nor could I feel the sharp agony and intractable stiffness in the small of my back that greets me on other mornings. The pains of old age are often undiagnosed and perhaps undiagnosable. Since they are usually produced by the gradual, or occasionally sudden, wearing out of bits of our minds and bodies, they are often less frightening than new and inexplicable pains were in one's youth, because for the most part they don't herald serious illness or catastrophe but simply remind us of our general and increasing debility. The bad thing about them, however, is that by and large they are going to get worse.

If I find it painful getting out of bed in the morning, I am likely to find it harder still in five years' time. Then you have to add that, though that is undoubtedly so, it is also quite possible that you won't be there in five years. And given that it's pain you're thinking about, you're faced with a dilemma. Do you really want to be there having a much worse version of the pain that's bothering you now? Might it possibly be a relief not to be there?

When Vidal talks of "the hospital years", he means his last years, not just a passing phase. And when we talk of our state of mind or health nowadays we probably aren't alluding to a temporary state, but to the present and the future and to a continuous, declining, but finite condition, and all of it hurtling along at great speed.

In his Nothing to Be Frightened Of, a meditation on his lifelong fear of dying, Julian Barnes divides people into those who fear death and those who fear the incapacities of old age, with subheadings for those who do or don't believe in God or an afterlife. "I'm sure my father feared death, and fairly certain my mother didn't: she feared incapacity and dependence more," Barnes writes. I don't think much about my own death or even fear it, I suppose because I am unable to imagine it. But I did catch myself hoping the other day that I might have most of my teeth when I'm dying, if only to spare the sensibility of an onlooker, should there be one. It is a hope all too likely to be thwarted, I'm sorry to say.

I can imagine all too easily, on the other hand, the stretch of life preceding death, and its potential for misery, weakness, dependence, though I don't think about that very much either, probably because I can't bear to. I am terrified of having nothing to do and no one to talk to. I avoid all articles and programmes advising me to insure myself now for dementia and other debilities, book a place in a home or negotiate a granny flat, let alone join EXIT or look into the fees, legality and conditions of death-delivering doctors in Switzerland.

I should come clean. I'm not sure that I really believe that I will be dead one day, any more than I entirely believe that I'm as old as I am. I would like to think that everyone has moments when they think of themselves as the exception to the rule. Writing about my own old age is a way of convincing myself that I really am old and that I really will die.

There are people who see old age as a time of peace, acceptance and the end of strong feeling. I do know old people who seem to have reached a plateau of that sort. They are amused, interested, calm, and they appear to have accepted the inevitability of their distance from a great deal of what goes on in the world. Yet in their desire both to live a good old age and to control the manner of their dying I doubt whether many of them would go quite as far as the old or ill adherents of Jainism in India sometimes do. William Dalrymple talked to a nun about the Jain custom of gently starving yourself to death, a process she firmly distinguishes from suicide.

"Sallekhana is a beautiful thing. There is no distress or cruelty. As nuns our lives are peaceful, and giving up the body should also be peaceful . . . First you fast one day a week, then you eat only on alternate days: one day you take food, the next you fast. One by one, you give up different types of foodstuffs. You give up rice, then fruits, then vegetables, then juice, then buttermilk. Finally you take only water, and then you have that only on alternate days. Eventually, when you are ready, you give up on that too. If you do it very gradually, there is no suffering at all. The body is cooled down, so that you can concentrate inside on the soul and on erasing all your bad karma."

There is an entirely different version of old age: the old person who is angry, impatient, full of regrets, nostalgia, distrust of the young; and there's a particular bitterness and resentment such a person may go in for, stored up from the past and sharpened now by powerlessness and by embarrassing and ineffectual efforts to garner and maintain dignity. Dylan Thomas was 37 when he wrote Do Not Go Gentle Into That Good Night with its injunction that "Old age should burn and rave at close of day." It was advice I approved of in those days, even though the poor fellow died two years later, when he was not yet 40. It would be hard for most of us to keep up all that burning and raving in our 70s.

My old friend Anne Wollheim had a really bad month or two at the end of her life and was known to wonder aloud, "Where is Dr Shipman now?" In fact, she had more than a year of knowing she was going to die and refusing to have the treatment which would probably not have lengthened her life by much. She filled that year with children and grandchildren and family and friends and travel, so that I find myself hoping that only the last two months or so were intolerable.

If it is true that we have 10 extra years of life nowadays, but that eight of them bear more than a shadow of decrepitude and the complicated moral choices inflicted on us by medical advances, we will need to work out how to get more control over the ways there may be of ending it all.

© Jane Miller 2010. This is an edited extract from Crazy Age, published by Virago at £14.99 on 2 September. To order a copy for £11.99 with free UK p&p, go to theguardian.com/bookshop or call 0330 333 6846