Chapter 24: Process Management Initial Release
Moderator:Moderators
Hello everyone,
The first part of what might become a multi-part topic to cover process management, IPC, shared resources, and loaders has been released. This is an initial release -- an associated demo will be released soon for the chapter as well as possible updates. This chapter introduces IPC, process protection, user land process loading, threads, process address spaces, and more. It provides the framework for the scheduler which is to come in chapter 25.
The first part of what might become a multi-part topic to cover process management, IPC, shared resources, and loaders has been released. This is an initial release -- an associated demo will be released soon for the chapter as well as possible updates. This chapter introduces IPC, process protection, user land process loading, threads, process address spaces, and more. It provides the framework for the scheduler which is to come in chapter 25.
Re: Chapter 24: Process Management Initial Release
I'm so excited that more chapters are being published! I've been waiting for this for so long!
Thanks!
Thanks!
Re: Chapter 24: Process Management Initial Release
Finally! I have been waiting for this tutorial for so long!
Thank you.
Thank you.
Re: Chapter 24: Process Management Initial Release
Mike, which version of Visual C++ are you using? I recently started using 2010, and I'm unable to compile the most recent demo with it.
Re: Chapter 24: Process Management Initial Release
Hello,
We are adopting MSVC++ 2010 for the series but I believe that chapter demo was developed in the 2008 version. The demo can be built with minimal changes however -- it is the demo used as a base for the next chapter. Chapter 23's demo still contains some outdated broken code however so may fail during run time (specifically, the VMM is initialized prior to the PMM, and additional PMM bitmap regions should be marked as in-use, such as stack space, initial page directory & tables, and kernel itself.) These were fixed for the next chapter -- and is planned to be updated for chapters 21. 22. and 23.
If needed, please post the errors that you get when trying to build the demo.
We are adopting MSVC++ 2010 for the series but I believe that chapter demo was developed in the 2008 version. The demo can be built with minimal changes however -- it is the demo used as a base for the next chapter. Chapter 23's demo still contains some outdated broken code however so may fail during run time (specifically, the VMM is initialized prior to the PMM, and additional PMM bitmap regions should be marked as in-use, such as stack space, initial page directory & tables, and kernel itself.) These were fixed for the next chapter -- and is planned to be updated for chapters 21. 22. and 23.
If needed, please post the errors that you get when trying to build the demo.
Re: Chapter 24: Process Management Initial Release
Hey Mike,
I tried following chapter 24, and encountered a few errors:
First, in terminateThread you call a function called terminateProcess which does not exist, perhaps you missed it?
Second, in the process type, there is no such function as getCurrentProcess, again, perhaps if you can write it?
And, last thing, in the process type, there is no such thing as threadCount.
I tried following chapter 24, and encountered a few errors:
First, in terminateThread you call a function called terminateProcess which does not exist, perhaps you missed it?
Second, in the process type, there is no such function as getCurrentProcess, again, perhaps if you can write it?
And, last thing, in the process type, there is no such thing as threadCount.
Re: Chapter 24: Process Management Initial Release
Hello,
Thanks for the feedback.
Those are indeed errors. They will be fixed with possibly a few additional changes when the demo is released. If additional errors or suggestions are found, please let me know.
Thanks for the feedback.

-
- Posts:92
- Joined:Thu May 27, 2010 8:54 pm
- Location:Netherlands
Re: Chapter 24: Process Management Initial Release
I recently migrated my code from Visual Studio 2005 to Visual Studio 2010, and now I get these undefined references:
I have since run a more verbose linking phase, which showed that the linker doesn't link in the Hal and Lib projects, which I have specified as dependencies.
This leads me to believe that the linker options are somewhow incorrect.
Mike, could you post your linker options for the Kernel project, so I can compare them with my own?
Code: Select all
unresolved external symbol _exit referenced in function "void __cdecl kernel_entry(struct multiboot_info *)" (?kernel_entry@@YAXPAUmultiboot_info@@@Z) SysCore\Kernel\entry.obj Kernel
unresolved external symbol "bool __cdecl InitializeConstructors(void)" (?InitializeConstructors@@YA_NXZ) referenced in function "void __cdecl kernel_entry(struct multiboot_info *)" (?kernel_entry@@YAXPAUmultiboot_info@@@Z) SysCore\Kernel\entry.obj Kernel
unresolved external symbol "void __cdecl sleep(int)" (?sleep@@YAXH@Z) referenced in function "void __cdecl BootScreen(void)" (?BootScreen@@YAXXZ) SysCore\Kernel\main.obj Kernel
unresolved external symbol "void __cdecl sleep(int)" (?sleep@@YAXH@Z) SysCore\Kernel\flpydsk.obj Kernel
unresolved external symbol "void __cdecl sleep(int)" (?sleep@@YAXH@Z) SysCore\Kernel\cli.obj Kernel
unresolved external symbol "int __cdecl hal_initialize(void)" (?hal_initialize@@YAHXZ) referenced in function "void __cdecl init(struct multiboot_info *)" (?init@@YAXPAUmultiboot_info@@@Z) SysCore\Kernel\main.obj Kernel
unresolved external symbol _vsnprintf referenced in function _DebugPrintf SysCore\Kernel\DebugDisplay.obj Kernel
unresolved external symbol _memcpy referenced in function "int __cdecl TerminateThread(struct _THREAD *)" (?TerminateThread@@YAHPAU_THREAD@@@Z) SysCore\Kernel\Thread.obj Kernel
unresolved external symbol "void __cdecl register_interrupt_handler(unsigned char,void (__cdecl*)(struct _regs))" (?register_interrupt_handler@@YAXEP6AXU_regs@@@Z@Z) referenced in function "void __cdecl Init_Exceptions(void)" (?Init_Exceptions@@YAXXZ) SysCore\Kernel\exception.obj Kernel
unresolved external symbol "void __cdecl register_interrupt_handler(unsigned char,void (__cdecl*)(struct _regs))" (?register_interrupt_handler@@YAXEP6AXU_regs@@@Z@Z) SysCore\Kernel\flpydsk.obj Kernel
unresolved external symbol "void __cdecl register_interrupt_handler(unsigned char,void (__cdecl*)(struct _regs))" (?register_interrupt_handler@@YAXEP6AXU_regs@@@Z@Z) SysCore\Kernel\mmngr_virtual.obj Kernel
unresolved external symbol "void __cdecl register_interrupt_handler(unsigned char,void (__cdecl*)(struct _regs))" (?register_interrupt_handler@@YAXEP6AXU_regs@@@Z@Z) SysCore\Kernel\keyboard.lib(kybrd.obj) Kernel
unresolved external symbol "void __cdecl dma_set_write(unsigned char)" (?dma_set_write@@YAXE@Z) referenced in function "bool __cdecl dma_initialize_floppy(unsigned int *,unsigned int,bool)" (?dma_initialize_floppy@@YA_NPAII_N@Z) SysCore\Kernel\flpydsk.obj Kernel
unresolved external symbol "void __cdecl dma_unmask_channel(unsigned char)" (?dma_unmask_channel@@YAXE@Z) referenced in function "bool __cdecl dma_initialize_floppy(unsigned int *,unsigned int,bool)" (?dma_initialize_floppy@@YA_NPAII_N@Z) SysCore\Kernel\flpydsk.obj Kernel
unresolved external symbol "void __cdecl dma_set_read(unsigned char)" (?dma_set_read@@YAXE@Z) referenced in function "bool __cdecl dma_initialize_floppy(unsigned int *,unsigned int,bool)" (?dma_initialize_floppy@@YA_NPAII_N@Z) SysCore\Kernel\flpydsk.obj Kernel
unresolved external symbol "void __cdecl dma_set_count(unsigned char,unsigned char,unsigned char)" (?dma_set_count@@YAXEEE@Z) referenced in function "bool __cdecl dma_initialize_floppy(unsigned int *,unsigned int,bool)" (?dma_initialize_floppy@@YA_NPAII_N@Z) SysCore\Kernel\flpydsk.obj Kernel
unresolved external symbol "void __cdecl dma_set_external_page_register(unsigned char,unsigned char)" (?dma_set_external_page_register@@YAXEE@Z) referenced in function "bool __cdecl dma_initialize_floppy(unsigned int *,unsigned int,bool)" (?dma_initialize_floppy@@YA_NPAII_N@Z) SysCore\Kernel\flpydsk.obj Kernel
unresolved external symbol "void __cdecl dma_set_address(unsigned char,unsigned char,unsigned char)" (?dma_set_address@@YAXEEE@Z) referenced in function "bool __cdecl dma_initialize_floppy(unsigned int *,unsigned int,bool)" (?dma_initialize_floppy@@YA_NPAII_N@Z) SysCore\Kernel\flpydsk.obj Kernel
unresolved external symbol "void __cdecl dma_reset_flipflop(int)" (?dma_reset_flipflop@@YAXH@Z) referenced in function "bool __cdecl dma_initialize_floppy(unsigned int *,unsigned int,bool)" (?dma_initialize_floppy@@YA_NPAII_N@Z) SysCore\Kernel\flpydsk.obj Kernel
unresolved external symbol "void __cdecl dma_mask_channel(unsigned char)" (?dma_mask_channel@@YAXE@Z) referenced in function "bool __cdecl dma_initialize_floppy(unsigned int *,unsigned int,bool)" (?dma_initialize_floppy@@YA_NPAII_N@Z) SysCore\Kernel\flpydsk.obj Kernel
unresolved external symbol _strtoul referenced in function "void __cdecl cmd_chcolor(void)" (?cmd_chcolor@@YAXXZ) SysCore\Kernel\cli.obj Kernel
unresolved external symbol _atoi referenced in function "void __cdecl cmd_read_sect(void)" (?cmd_read_sect@@YAXXZ) SysCore\Kernel\cli.obj Kernel
unresolved external symbol "struct CPU cpu" (?cpu@@3UCPU@@A) referenced in function "void __cdecl cmd_sysinfo(void)" (?cmd_sysinfo@@YAXXZ) SysCore\Kernel\cli.obj Kernel
unresolved external symbol "void __cdecl gettime(struct _TIME *)" (?gettime@@YAXPAU_TIME@@@Z) referenced in function "bool __cdecl run_cmd(char *)" (?run_cmd@@YA_NPAD@Z) SysCore\Kernel\cli.obj Kernel
unresolved external symbol "void __cdecl gettime(struct _TIME *)" (?gettime@@YAXPAU_TIME@@@Z) SysCore\Kernel\fat12.lib(fat12.obj) Kernel
unresolved external symbol _memset referenced in function "void __cdecl ToDosFileName(char const *,char *,unsigned int)" (?ToDosFileName@@YAXPBDPADI@Z) SysCore\Kernel\fsys.obj Kernel
unresolved external symbol _memset SysCore\Kernel\mmngr_phys.obj Kernel
unresolved external symbol _strncmp referenced in function "struct _FILE __cdecl fsysFatDirectory(char const *)" (?fsysFatDirectory@@YA?AU_FILE@@PBD@Z) SysCore\Kernel\fat12.lib(fat12.obj) Kernel
unresolved external symbol _strchr referenced in function "struct _FILE __cdecl fsysFatOpen(char const *)" (?fsysFatOpen@@YA?AU_FILE@@PBD@Z) SysCore\Kernel\fat12.lib(fat12.obj) Kernel
unresolved externals A:\KRNL32.exe Kernel
This leads me to believe that the linker options are somewhow incorrect.
Mike, could you post your linker options for the Kernel project, so I can compare them with my own?
Re: Chapter 24: Process Management Initial Release
ETA on the demo for the new chapter?
Re: Chapter 24: Process Management Initial Release
Hello everyone,
There might be an error found in source written for earlier chapters that is currently delaying finalization of the demo. The demo will be released as soon as it is known to be error free. Apologies for the delay; error reports will be updated on the site when it is confirmed. This particular error appears to be a compatibility problem with certain emulator versions that may cause the system to fail to boot. The error is not yet confirmed at this time.
There might be an error found in source written for earlier chapters that is currently delaying finalization of the demo. The demo will be released as soon as it is known to be error free. Apologies for the delay; error reports will be updated on the site when it is confirmed. This particular error appears to be a compatibility problem with certain emulator versions that may cause the system to fail to boot. The error is not yet confirmed at this time.
Re: Chapter 24: Process Management Initial Release
Mike, any update on the next chapter or the chapter 24 demo?
Re: Chapter 24: Process Management Initial Release
Hey Mike, any update on the chapter 24 demo?
-
- Posts:92
- Joined:Thu May 27, 2010 8:54 pm
- Location:Netherlands
Re: Chapter 24: Process Management Initial Release
Sorry to just repeat the others, but... Any E.T.A. on the next chapter, or the current chapter's demo?
Re: Chapter 24: Process Management Initial Release
Hello,
Apologies for the constant delays for the chapter 24 demo. We are planning on releasing it soon with some updates to the series. We will try to push it out as soon as the next graphics article is completed which is planned for a pre-release this weekend.
Apologies for the constant delays for the chapter 24 demo. We are planning on releasing it soon with some updates to the series. We will try to push it out as soon as the next graphics article is completed which is planned for a pre-release this weekend.