BrokenThorn Entertainment - View topic - Chapter 24: Process Management Initial Release
It is currently Wed May 22, 2013 7:47 am




Post new topic Reply to topic  [ 17 posts ]  Go to page 1, 2  Next
Chapter 24: Process Management Initial Release 
Author Message
Site Admin
User avatar

Joined: Sat Oct 20, 2007 7:58 pm
Posts: 454
Post Chapter 24: Process Management Initial Release
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.


Sat Jul 28, 2012 9:40 pm
Profile E-mail WWW

Joined: Sat Jun 13, 2009 4:19 pm
Posts: 3
Post 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!


Sun Jul 29, 2012 12:22 am
Profile E-mail

Joined: Thu Dec 29, 2011 3:08 am
Posts: 1
Post Re: Chapter 24: Process Management Initial Release
Finally! I have been waiting for this tutorial for so long!

Thank you.


Sun Jul 29, 2012 7:14 pm
Profile E-mail
Moderator

Joined: Thu Jan 10, 2008 6:43 pm
Posts: 95
Location: USA
Post Re: Chapter 24: Process Management Initial Release
Thanks!!


Mon Jul 30, 2012 1:25 pm
Profile
Moderator

Joined: Thu Jan 10, 2008 6:43 pm
Posts: 95
Location: USA
Post 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.


Mon Jul 30, 2012 9:24 pm
Profile
Site Admin
User avatar

Joined: Sat Oct 20, 2007 7:58 pm
Posts: 454
Post 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.


Thu Aug 02, 2012 11:55 pm
Profile E-mail WWW

Joined: Sun Jul 11, 2010 1:12 pm
Posts: 19
Post 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.


Wed Aug 08, 2012 8:02 am
Profile E-mail
Site Admin
User avatar

Joined: Sat Oct 20, 2007 7:58 pm
Posts: 454
Post 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.


Fri Aug 10, 2012 1:14 am
Profile E-mail WWW

Joined: Thu May 27, 2010 8:54 pm
Posts: 88
Location: Netherlands
Post 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:
Code:
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

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?


Sat Aug 11, 2012 10:24 am
Profile E-mail
Moderator

Joined: Thu Jan 10, 2008 6:43 pm
Posts: 95
Location: USA
Post Re: Chapter 24: Process Management Initial Release
ETA on the demo for the new chapter?


Mon Aug 20, 2012 1:24 pm
Profile
Site Admin
User avatar

Joined: Sat Oct 20, 2007 7:58 pm
Posts: 454
Post 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.


Tue Aug 28, 2012 3:22 am
Profile E-mail WWW
Moderator

Joined: Thu Jan 10, 2008 6:43 pm
Posts: 95
Location: USA
Post Re: Chapter 24: Process Management Initial Release
Mike, any update on the next chapter or the chapter 24 demo?


Thu Nov 08, 2012 2:21 pm
Profile

Joined: Sun Jul 11, 2010 1:12 pm
Posts: 19
Post Re: Chapter 24: Process Management Initial Release
Hey Mike, any update on the chapter 24 demo?


Fri Jan 04, 2013 10:40 am
Profile E-mail

Joined: Thu May 27, 2010 8:54 pm
Posts: 88
Location: Netherlands
Post 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?


Mon Feb 25, 2013 10:04 pm
Profile E-mail
Site Admin
User avatar

Joined: Sat Oct 20, 2007 7:58 pm
Posts: 454
Post 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.


Tue Feb 26, 2013 2:31 am
Profile E-mail WWW
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 17 posts ]  Go to page 1, 2  Next


Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron

Powered by phpBB © phpBB Group.
Original Design by Vjacheslav Trushkin for Free Forums/DivisionCore.
Theme and forum modified by BrokenThorn Entertainment, Co.