问题 单项选择题

关于线程,下列叙述正确的是______。

A.线程本身也是一个程序,它自己能独立运行

B.多个线程中,每一个线程都有自己独立的一块内存空间、一组系统资源

C.线程就是一个程序内部的顺序控制流

D.多线程就是多次启动一个程序

答案

参考答案:C

解析: 线程本身并不是程序,而是一个程序内部的顺序控制流,它自己本身并不能运行,必须在程序中运行,所以选项A错误。对于进程而言,每个进程都有自己独立的一块内存空间、一组系统资源。而线程不同于进程,多个线程共享一块内存空间和一组系统资源,所有选项B错误。多线程指在一个程序中可以定义多个线程并同时运行它们,每个线程可以执行不同的任务,即在同一个程序中多行语句同时执行,而不是多次启动一个程序,所以选项D错误。多线程是针对一个程序而言的,代表着一个程序内部可以同时执行的线程个数。只有选项C叙述正确。

填空题
单项选择题

Passage Three

Immigrants are consumers as well as producers, so they create jobs as well as taking them. And the work they do need not be at the expense of native workers. Immigrants often hold jobs that natives are unwilling to accept at any feasible wage.
Also, immigrants sometimes help to keep industries viable (能存活的) that would otherwise disappear altogether, causing employment to fall. This was the conclusion of a study of the Los Angeles garment industry in the 1970s and 1980s. And when immigrants working for low wages do put downward pressure on natives’ wages, they may raise the (real) wages of natives in general by keeping prices lower than they otherwise would be.
In theory, then, the net effect of immigration on native wages is uncertain. Unfortunately, most of the empirical (经验主义的) research on whether immigrants make natives worse off in practice is also inconclusive except the effect, one way or the other, seems small. Most of this research has been done in America: if there were any marked influence on wages, that is where you would expect to find it, given the scale of immigration and the tendency of the newcomers to concentrate in certain areas. But most studies have compared wages and employment in areas with many immigrants to wages and employment in areas with few. For instance, one examined the impact of sudden and notorious inflow of refugees to Miami from the Cuban port of Mariel in 1980. Within the space of a few months, 125 000 people had arrived, increasing Miami’s labor force by 7%. Yet the study concluded that wages and employment among the city’s natives, including the unskilled, were virtually unaffected. Another study examined the effect of immigration on wages and employment of those at the bottom of the jobs ladder—unskilled blacks and Hispanics. It found that a doubling of the rate of immigration had no detectable effect on natives.
The most recent work, admittedly, has tended to question these findings. Using more detailed statistics and more sophisticated methods than the earlier studies, this work has tended to find that immigrants’ wages take longer to rise to the level of the natives’ wages than has been supposed. This implies a more persistent downward pressure on the host economy’s labor market.
Typically these studies find that immigration does depress unskilled natives’ wages to a small extent. But nearly all economists would agree that the effects of immigration are insignificant in relation to other influences.

According to the most recent study, ______.

A.immigration only depresses unskilled natives’ wages to a large extent

B.immigration puts a longer downward pressure on the natives’ wages

C.immigrants’ wages can rise to the level of natives’ very quickly

D.immigrants tend to be in unemployment for a long time