I put these questions to Ms. Gallagher and to one of the experts in her book, Robert Desimone, a neuroscientist at M.I.T. who has been doing experiments somewhat similar to my taxicab TV experience. He has been tracking the brain waves of macaque monkeys and humans as they stare at video screens looking for certain flashing patterns.

When something bright or novel flashes, it tends to automatically win the competition for the brain’s attention, but that involuntary bottom-up impulse can be voluntarily overridden through a top-down process that Dr. Desimone calls “biased competition.” He and colleagues have found that neurons in the prefrontal cortex — the brain’s planning center — start oscillating in unison and send signals directing the visual cortex to heed something else.

These oscillations, called gamma waves, are created by neurons’ firing on and off at the same time — a feat of neural coordination a bit like getting strangers in one section of a stadium to start clapping in unison, thereby sending a signal that induces people on the other side of the stadium to clap along. But these signals can have trouble getting through in a noisy environment.

“It takes a lot of your prefrontal brain power to force yourself not to process a strong input like a television commercial,” said Dr. Desimone, the director of the McGovern Institute for Brain Research at M.I.T. “If you’re trying to read a book at the same time, you may not have the resources left to focus on the words.”

Now that neuroscientists have identified the brain’s synchronizing mechanism, they’ve started work on therapies to strengthen attention. In the current issue of Nature, researchers from M.I.T., Penn and Stanford report that they directly induced gamma waves in mice by shining pulses of laser light through tiny optical fibers onto genetically engineered neurons. In the current issue of Neuron, Dr. Desimone and colleagues report progress in using this “optogenetic” technique in monkeys.

Newsletter Sign Up Continue reading the main story Please verify you're not a robot by clicking the box. Invalid email address. Please re-enter. You must select a newsletter to subscribe to. Sign Up You will receive emails containing news content , updates and promotions from The New York Times. You may opt-out at any time. You agree to receive occasional updates and special offers for The New York Times's products and services. Thank you for subscribing. An error has occurred. Please try again later. View all New York Times newsletters.

Ultimately, Dr. Desimone said, it may be possible to improve your attention by using pulses of light to directly synchronize your neurons, a form of direct therapy that could help people with schizophrenia and attention-deficit problems (and might have fewer side effects than drugs). If it could be done with low-wavelength light that penetrates the skull, you could simply put on (or take off) a tiny wirelessly controlled device that would be a bit like a hearing aid.

In the nearer future, neuroscientists might also help you focus by observing your brain activity and providing biofeedback as you practice strengthening your concentration. Researchers have already observed higher levels of synchrony in the brains of people who regularly meditate.

Ms. Gallagher advocates meditation to increase your focus, but she says there are also simpler ways to put the lessons of attention researchers to use. Once she learned how hard it was for the brain to avoid paying attention to sounds, particularly other people’s voices, she began carrying ear plugs with her. When you’re trapped in a noisy subway car or a taxi with a TV that won’t turn off, she says you have to build your own “stimulus shelter.”

Advertisement Continue reading the main story

She recommends starting your work day concentrating on your most important task for 90 minutes. At that point your prefrontal cortex probably needs a rest, and you can answer e-mail, return phone calls and sip caffeine (which does help attention) before focusing again. But until that first break, don’t get distracted by anything else, because it can take the brain 20 minutes to do the equivalent of rebooting after an interruption. (For more advice, go to nytimes.com/tierneylab.)

“Multitasking is a myth,” Ms. Gallagher said. “You cannot do two things at once. The mechanism of attention is selection: it’s either this or it’s that.” She points to calculations that the typical person’s brain can process 173 billion bits of information over the course of a lifetime.

“People don’t understand that attention is a finite resource, like money,” she said. “Do you want to invest your cognitive cash on endless Twittering or Net surfing or couch potatoing? You’re constantly making choices, and your choices determine your experience, just as William James said.”

During her cancer treatment several years ago, Ms. Gallagher said, she managed to remain relatively cheerful by keeping in mind James’s mantra as well as a line from Milton: “The mind is its own place, and in itself/ Can make a heav'n of hell, a hell of heav'n.”

“When I woke up in the morning,” Ms. Gallagher said, “I’d ask myself: Do you want to lie here paying attention to the very good chance you’ll die and leave your children motherless, or do you want to get up and wash your face and pay attention to your work and your family and your friends? Hell or heaven — it’s your choice.”