SMP - Scheduler can assign process to a cpu

- machine information contains the number of cpus and the bsp id

- a dummy SMP scheduler which keeps all system processes on BSP and
  all other process on APs. The scheduler remembers how many processes
  are assigned to each CPU and always picks the one with the least
  processes for a new process.
This commit is contained in:
Tomas Hruby
2010-09-15 14:10:33 +00:00
parent 9e12630d75
commit 1e273f640e
7 changed files with 81 additions and 1 deletions

View File

@@ -124,7 +124,9 @@ struct machine {
int pc_at;
int ps_mca;
int processor;
int padding; /* used to be protected */
unsigned processors_count; /* how many cpus are available */
unsigned bsp_id; /* id of the bootstrap cpu */
int padding; /* used to be protected */
int vdu_ega;
int vdu_vga;
int apic_enabled; /* does the kernel use APIC or not? */