- #1
FrostScYthe
- 80
- 0
Hiya :),
1). I understand that threads are like processes except that they share the state information, and memory.
So I would think they share the values of the registers, the memory heap, and the stack, right? would they also share global variables?
2). Also, could a multithread solution that uses multiple user threads get better performance on a multiprocessor system than on a system with only 1 processor? I think it could get better performance if indeed we assign a thread to each processor, but I’m not sure whether the user level thread can allocate this processors or not?
Thanks in advance for any help
Frost.
1). I understand that threads are like processes except that they share the state information, and memory.
So I would think they share the values of the registers, the memory heap, and the stack, right? would they also share global variables?
2). Also, could a multithread solution that uses multiple user threads get better performance on a multiprocessor system than on a system with only 1 processor? I think it could get better performance if indeed we assign a thread to each processor, but I’m not sure whether the user level thread can allocate this processors or not?
Thanks in advance for any help
Frost.