jari-developers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Jari-developers] smp question.


From: Dan Kruchinin
Subject: [Jari-developers] smp question.
Date: Tue, 5 Dec 2006 18:52:53 +0300

i want to get some offers from you about smp.
at current moment, i use global cpu's linked list, like this:
extern struct cpu {
  /* gdt */
  /* tss */
  /* idt */
  /* memory area or areas */
  struct cpu* next;
} cpus;

so, if we have, for example, 8 cpus, we can't get "atomic" access to needed one, in this case we must walk along cpus list.
this problem can be solved by using fixed array. in this case we have another minus, because array must be determined at compile time.
so, if we have only 2 cpu, we will have array size = 2. and if user, for example, add new 2 cpus, he has to recompile kernel to increment cpu array size from 2 to 4.

- linked list can detect number of cpus dynamically, but on nearly each major operation, we should to make searching of needed cpu.
- in fixed array we can fastly get needed cpu, this ds can't determine cpu's number dynamically.

so, how do you think, what approach is better.

10x for attention.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]