937 views
1 votes
1 votes
State true or false

A program to compute the sum of first 10000 numbers can be divided into 4 sub parts and executed on 4 CPUs using either forks/threads. The reason why we prefer threads is because  large portions of the data /code between the 4 subparts are very similar and need not duplicated.

A. True

B. False

1 Answer

1 votes
1 votes

A thread is a basic unit of CPU utilization; it comprises a thread ID, a program counter, a register set, and a stack. It shares with other threads belonging to the same process its code section, data section and other operating-system resources, such as open files and signals.

Hence, statement is true!

Related questions

1 votes
1 votes
1 answer
4