Dear Akhil,
Actually, it may not be so complicated.
1. The boot process requires a bit of careful design because you need to decide from what point (of time as well as
address) the second processor that shares the common memory (that is, non-boot) can start simultaneous execution.
The machine will have one boot processor and then the "second core" starts execution when the first core executes a "start" instruction.
Normally, there is also mechanism to initialize the IP value of the secondary when it starts (it could be a preset value - say instruction 256
in the boot ROM. The boot ROM can contain code to Jump to some OS that can setup the registers of the secondary and run say idle process - it
doesn't hurt if both run idle in parallel).
Thus the boot processor sets up the OS in memory and sets up the secondary so that it starts with the idle process.
2. Once that part is taken care of, then, the support from the architecture will be sufficient to synchronize execution. Basically, the idea
is the following:
The machine will have an instruction pair (sync, unsync) to support multiprocessor operation. When the sync instruction is executed by
one of the processors, the other waits till it executes unsync. (The hardware is capable of resolving race conditions arising out of both trying
to run synch at the same time).
With this support, now the simplest design is to have the rule "modify the OS so that whenever execution enters kernel mode, do "sync"
and do "unsync" when leaving kernel mode. Of course, this is not efficient. But the basic idea is already there.
3. The are some details. For instance, the state of a process must now indicate which core it has been scheduled
(Running-1, Running-2 etc. for idle, a state "Running-on-Both" might be needed!).
Generally one must ensure that the processors 'sync' before either one tries to run the scheduler.
Otherwise, it will be enough to 'sync' before acquiring a resource. Since the resource request sequence has been planned in a way
to avoid circular wait, deadlocks can't occur even with two processors.
4. A common hardware model with two core processors is to have I/O operations interrupt only the secondary.
That is, all interrupts (except timer) will interrupt only the secondary. This changes nothing, because our current design does not
require interrupts to execute in the context of the process which initiated the disk/console operation.
5. There will be some work at shut down time as well, basically to figure out "who should shut down..".