Discussions on more advanced topics such as monolithic vs micro-kernels, transactional memory models, and paging vs segmentation should go here. Use this forum to expand and improve the wiki!
I'm trying to find an alternate way to do spinlock without the chance of the computer of locking up. I thought of a way to use a process list with a field called cpuid. When a processor picks up a process it sets cpuid to its processor id and when the process is finished it clears cpuid. I would most likely have to put a little second cpuid check in it but that isn't the problem I need to find something thats different in the CPUID in multicore processors so I can check them. I would prefer to find a way to do it with CPUID but if i have to i would try to enumerate them but i wouldn't know where to begin there. So can anybody help.
typedef struct _h_process {
DWORD processid; //process ID
char name[256]; //name of the process
DWORD priority; //process priority(hi,medium,low)
DWORD status; //status of the process
DWORD syssize; //size of the system stack
processmem *meminfo; //memory locations
void *stackptr,*stackptr0; //stack pointers
char *parameters; //parameters passed to this process
char *environment; //environment variables
char *cpuid; //active cpuid
} h_process;
If you need a processor-specific value, try the task register.
"Certainly avoid yourself. He is a newbie and might not realize it. You'll hate his code deeply a few years down the road." - Sortie
[ My OS ] [ VDisk/SFS ]