Economists say there may be other reasons for opening the door to high-skilled immigrants. In cities where there are large concentrations of such immigrants in science and engineering, overall wages tend to go up, especially among college-educated American residents, and eventually, so do housing prices, according to a study by Giovanni Peri, an economist at the University of California, Davis.
The Congressional Budget Office weighed in this week too, concluding that the growth in high-skilled immigration would lead to "slightly higher" productivity and in turn higher wages overall.
Already, the fight over high-skilled immigration has led to arguments and counterarguments on the Senate floor, with one side warning that jobs will go to workers from overseas and the other rallying for Americans first.
But Ardine Williams, the vice president for human resources at Intel, said that hiring Americans is not always practical. Asked about hiring unemployed engineers in this country, she said, "I encounter those folks as well. They are skilled and have expertise outside of an area where we need engineers. In some cases they haven't kept their skills current."
The debate over the effect of foreign engineers on American ones has obscured the critical issue of why more Americans are not going into the thriving technology sector. Students in the United States consistently rank low on global math and science tests, suggesting that relatively few are prepared to go into rigorous science and engineering programs.
(Read More: Senate Immigration Bill Boosted by Border Deal)
In engineering programs at American universities, a little more than 40 percent of all graduate students were from abroad, according to data from the National Science Foundation. Even among Americans who do graduate with computer science or engineering degrees, a third pursue careers outside the tech sector.
Mr. Doernberg is keeping his fingers crossed. A resident of Woodside, Calif., an upscale town south of San Francisco, he spends his days scouring online job boards and attending networking sessions at diners and church halls across Silicon Valley. One of them is a Thursday morning group that meets in a church in Saratoga, a short drive from his home.
It was set up years ago by Hamid Saadat, an electrical engineer who came to this country from Iran as a graduate student in 1978, worked at a series of semiconductor companies in the area, became a United States citizen and went through the same rite of passage as Mr. Doernberg.
In 2001, just as the technology industry slumped, he lost his job. He was 47 and he soon learned one lesson. In Silicon Valley, it may not matter where you were born, but when.
"As much as we like to believe there's no discrimination, being younger usually helps," Mr. Saadat said.
—By Somini Sengupta of The New York Times