What is the kernel mode

Topics: Compiler
Developer
Jun 13, 2013 at 9:26 PM
What type of kernel does cosmos use and is it 32 bit?
Coordinator
Jun 13, 2013 at 9:27 PM
On 6/13/2013 5:26 PM, clearosdev wrote:
Jun 13, 2013 at 10:40 PM
clearosdev wrote:
What type of kernel does cosmos use and is it 32 bit?
You could make a monolithic, or microkernel with Cosmos. It is essentially a native C# compiler with some extra libraries and a debugger. However since most users neglect to implement their own kernel and use the VSIP libraries it would be classified as a monolithic kernel since everything runs in kernel space
Developer
Jun 14, 2013 at 1:32 AM
Why i ask is because I'm trying to see if I could make task manager and other systems you see in the base of Linux. It's kinda hard giving that there's no support for threads and there's very little memory management.

Jun 14, 2013 at 2:04 AM
I got really close to multitasking, only thing messing me up was some weird glitch with the Cosmos IRQ Struct that was corrupting the value of the some registers which prevented me from running anything decent beyond custom assembly code that used a limited set of registers. Linux is a hybrid kernel, but Cosmos provides the tools to make a kernel, but it in its self is not a kernel (well it depends on how you use it). As I said though, you can make what ever type of kernel you want in Cosmos (well just as long as its 32 bit). The hacks required to write low level code in Cosmos (not just Cosmos though, .net languages in general) though are very messy and is why I no longer use Cosmos and am writing a new kernel in pure C.
Coordinator
Jun 14, 2013 at 6:14 AM
Grunt: the hacks you describe you need is something we purposely don't want to be easy: 100% of a users code should be c#/.net code, so the compiler can do thorough optimization later on...



Developer
Jun 14, 2013 at 10:17 PM
Grunt: I have tried to program an os with c and asm but I have a hard time with compiling and linking. If some only made a IDE for developing operating systems in c that would handle the command line stuff for you. I also notice that it harder to use windows when developing at that low of a level; it helps to use linux. Please let me how you are developing your c kernel so I can try.
Jun 14, 2013 at 10:58 PM
There are several tutorials out there on youtube (and OSDev.org). I am using the GNU C compiler, NASM assembler, and the GRUB Bootloader. Of course though, I have a script that compiles it. Essentially I compile the entry point (x86 assembly code) and the main kernel (written in C) separately and then use LD to link them both into a flat binary. From there I can install the bootloader ect ect. Of course, as I said earlier I use Linux as I lost faith in Windows and Micro$oft after Windows 8. However there are utillities out there like Cygwin and MinGW that offer a somewhat decent POSIX environment. However if you are using Windows the steps to compile/link will be a little different, because of the difference in executable formats. IDEs are for spoiled developers, and something that you must know how to live without. Text editors like Emacs and Vim offer syntax highlighting and can be configured to act sort of like IDEs if you know what you are doing.
Jun 14, 2013 at 11:01 PM
Developer
Jun 15, 2013 at 2:26 AM
That Ubuntu tutorial I tried but when I went to run it in qume nothing loaded. Plus I was hoping for a little more en detailed tutorial. Is there any good tutorials ether for windows or ubuntu that I can create a simple kernel with keyboard support and be able to use it in an iso?
Jun 15, 2013 at 2:50 AM
I briefly watched that Ubuntu tutorial, I will agree it is not the best tutorial.. There are not that many good OS development tutorials out there (besides acouple ones by some indian people who I can barely understand). If I ever get a mic I will make some, but there have to be some good text based tutorials out there. OSDev.org has alot of good information, you just have to search. I like to read random computer science topics on OSDev/Wikipedia, reading about stuff relating to OS development might help you too. I found this video on Youtube which might be good for you. Sadly I can not find any voice tutorials..

http://www.youtube.com/watch?v=Qit1civWf7Y
Jun 15, 2013 at 2:53 AM
Scrap that tutorial, its just assembly (which is still useful for you though and you still might learn something). I saw Visual Studio and immediatly though that guy was using it for C++/C. Anyways this guy has some pretty in-depth stuff.

http://www.youtube.com/user/chibicitiberiu2/videos
Developer
Jun 16, 2013 at 5:08 PM
That tutorial is a big help except grub doesn't load the kernel. When I boot the ios all i get is kernel/kernel.bin and then a whole bunch of stuff about the file then boot but not the string that suppose to display. When I open the bin with a hex editor I can see the string though.