Chapter 24: Process Management Initial Release

News discussions

Moderator: Moderators

Chapter 24: Process Management Initial Release

Postby Mike » Sat Jul 28, 2012 9:40 pm

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.
User avatar
Mike
Site Admin
 
Posts: 463
Joined: Sat Oct 20, 2007 7:58 pm

Re: Chapter 24: Process Management Initial Release

Postby masonsbro » Sun Jul 29, 2012 12:22 am

I'm so excited that more chapters are being published! I've been waiting for this for so long!

Thanks!
masonsbro
 
Posts: 3
Joined: Sat Jun 13, 2009 4:19 pm

Re: Chapter 24: Process Management Initial Release

Postby djl12328 » Sun Jul 29, 2012 7:14 pm

Finally! I have been waiting for this tutorial for so long!

Thank you.
djl12328
 
Posts: 1
Joined: Thu Dec 29, 2011 3:08 am

Re: Chapter 24: Process Management Initial Release

Postby pathos » Mon Jul 30, 2012 1:25 pm

Thanks!!
pathos
Moderator
 
Posts: 97
Joined: Thu Jan 10, 2008 6:43 pm
Location: USA

Re: Chapter 24: Process Management Initial Release

Postby pathos » Mon Jul 30, 2012 9:24 pm

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

Re: Chapter 24: Process Management Initial Release

Postby Mike » Thu Aug 02, 2012 11:55 pm

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.
User avatar
Mike
Site Admin
 
Posts: 463
Joined: Sat Oct 20, 2007 7:58 pm

Re: Chapter 24: Process Management Initial Release

Postby HeinanXP » Wed Aug 08, 2012 8:02 am

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

Re: Chapter 24: Process Management Initial Release

Postby Mike » Fri Aug 10, 2012 1:14 am

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.
User avatar
Mike
Site Admin
 
Posts: 463
Joined: Sat Oct 20, 2007 7:58 pm

Re: Chapter 24: Process Management Initial Release

Postby halofreak1990 » Sat Aug 11, 2012 10:24 am

I recently migrated my code from Visual Studio 2005 to Visual Studio 2010, and now I get these undefined references:
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

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

Re: Chapter 24: Process Management Initial Release

Postby pathos » Mon Aug 20, 2012 1:24 pm

ETA on the demo for the new chapter?
pathos
Moderator
 
Posts: 97
Joined: Thu Jan 10, 2008 6:43 pm
Location: USA

Re: Chapter 24: Process Management Initial Release

Postby Mike » Tue Aug 28, 2012 3:22 am

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.
User avatar
Mike
Site Admin
 
Posts: 463
Joined: Sat Oct 20, 2007 7:58 pm

Re: Chapter 24: Process Management Initial Release

Postby pathos » Thu Nov 08, 2012 2:21 pm

Mike, any update on the next chapter or the chapter 24 demo?
pathos
Moderator
 
Posts: 97
Joined: Thu Jan 10, 2008 6:43 pm
Location: USA

Re: Chapter 24: Process Management Initial Release

Postby HeinanXP » Fri Jan 04, 2013 10:40 am

Hey Mike, any update on the chapter 24 demo?
HeinanXP
 
Posts: 19
Joined: Sun Jul 11, 2010 1:12 pm

Re: Chapter 24: Process Management Initial Release

Postby halofreak1990 » Mon Feb 25, 2013 10:04 pm

Sorry to just repeat the others, but... Any E.T.A. on the next chapter, or the current chapter's demo?
halofreak1990
 
Posts: 92
Joined: Thu May 27, 2010 8:54 pm
Location: Netherlands

Re: Chapter 24: Process Management Initial Release

Postby Mike » Tue Feb 26, 2013 2:31 am

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.
User avatar
Mike
Site Admin
 
Posts: 463
Joined: Sat Oct 20, 2007 7:58 pm

Next

Return to News Discussion

Who is online

Users browsing this forum: No registered users and 1 guest

cron