Register and join over 40,000 other developers!
Recent Topics
-
Tekken 7
IsrealJones - Mar 22 2021 07:21 AM
-
The Game You Are Waiting For?
WendellHarper - Dec 06 2020 01:21 PM
-
Quora and Reddit Backlinks
WendellHarper - Dec 06 2020 01:14 PM
-
Delete account
pindo - Jul 23 2020 01:33 AM
-
Print specific values from dictionary with a specific key name
Siten0308 - Jun 20 2019 01:43 PM
Recent Blog Entries
Recent Status Updates
Popular Tags
- networking
- Managed C++
- stream
- console
- database
- authentication
- Visual Basic 4 / 5 / 6
- session
- Connection
- asp.net
- import
- syntax
- hardware
- html5
- array
- mysql
- java
- php
- c++
- string
- C#
- html
- loop
- timer
- jquery
- ajax
- javascript
- programming
- android
- css
- assembly
- c
- form
- vb.net
- xml
- linked list
- login
- encryption
- pseudocode
- calculator
- sql
- python
- setup
- help
- game
- combobox
- binary
- hello world
- grid
- innerHTML

8 replies to this topic
#1
Posted 10 October 2009 - 01:55 PM
Hello all,
recently I've been working with a friend on what could be called an OS(no we do not want to make another Windows and become millionaires,we only want to have fun:thumbup1:)
So, we are now at a point where we need dynamic allocation, that is using xxalloc and free functions.
I've read alot about paging, virtual memory management, and other related topics.
But almost everytime, the author explains himself either considering the reader a newbie(i.e. osdev wiki) or an assembly/hardware expert, which I am not.
So, I have not found any suitable example (that works with djgpp), by suitable I mean, complex enough, but still understandable for a mid-range programmer.
I would like is not to copy someone else's work, and try to understand what is really happening.
So if you have any good links or tips, please share them.
recently I've been working with a friend on what could be called an OS(no we do not want to make another Windows and become millionaires,we only want to have fun:thumbup1:)
So, we are now at a point where we need dynamic allocation, that is using xxalloc and free functions.
I've read alot about paging, virtual memory management, and other related topics.
But almost everytime, the author explains himself either considering the reader a newbie(i.e. osdev wiki) or an assembly/hardware expert, which I am not.
So, I have not found any suitable example (that works with djgpp), by suitable I mean, complex enough, but still understandable for a mid-range programmer.
I would like is not to copy someone else's work, and try to understand what is really happening.
So if you have any good links or tips, please share them.
#2
Posted 10 October 2009 - 05:46 PM
Have you looked at the Linux kernel, or minix?
If you're making an OS, you have to be close to the hardware.
If you're making an OS, you have to be close to the hardware.
Programming is a branch of mathematics.
My CodeCall Blog | My Personal Blog
My MineCraft server site: http://banishedwings.enjin.com/
#3
Guest_h4x_*
Posted 11 October 2009 - 08:43 AM
then perhaps os writing is too much of a challange for you.or an assembly/hardware expert, which I am not.
my advice:
**** memory virtualization and protection, turn off everything to have pure flat memory.
all you use is exception handling, calls, and hardware interrupts.
this way you avoid mistakes they made in i386.
security in distributing files for it? no problem! make official HLL language, wich will compile app to have only certain access to your system. no assembly from outside. all protection software driven. or even **** debugger, you run everything via debugger and it check few system dependent things (like if memory its about to access was alloated by this process, if instruction is allowed, and some other customized stuff)
performance? sure, slow. but if you run a server, you dont use debug. if it crash (ok it wont crash, just random instruction executing untill it reach memory limit - then massive interrupt wich indicate exceed memory region /oh wait, we dont have that one, ****/) - **** it, you restart machine wich should take < 1 second and fix the bug. you run a web browser - it will be emulated by software and few times slower. but whatever, if you trust its flawless you run it in unprotected way and its much faster.
i plan writing that os, but... im not ready yes.
i would really like cpu that is so simple, that i dont have to worry about anything beside my code.
and this way we can expect many oses, and even hardware, wich give software full control over it.
computers should be blank, only what is really needed, all managment and protection should be done by software.
slower, yes, but better and affordable with tody tech.
#4
Posted 11 October 2009 - 08:57 AM
then perhaps os writing is too much of a challange for you.
my advice:
**** memory virtualization and protection, turn off everything to have pure flat memory.
The problem is in real mode you can address only 640 kB of memory and the segmantation complicates keeping structures larger than 64 kB. On x86 you must enter protected mode to get more.
#5
Guest_h4x_*
Posted 11 October 2009 - 09:41 AM
REAL MODE? Did i used that term? no? so skip ur thinking schemes and think of a grand one.
protected mode might be needed indeed, but let all run in ring0, without paging. untill someone build popular cpu supporting that.
protected mode might be needed indeed, but let all run in ring0, without paging. untill someone build popular cpu supporting that.
#6
Posted 11 October 2009 - 03:29 PM
h4x, I'm an op in #osdev and a mod on osdev.org. If I EVER see you post there, I'll delete your account so fast you won't even blink.
@manux: See the pedigree link in my signature. The repo is open source, you can see implementations for memory protection and allocation for several different architectures.
@manux: See the pedigree link in my signature. The repo is open source, you can see implementations for memory protection and allocation for several different architectures.
#7
Posted 16 October 2009 - 11:03 AM
I need to understand: where in the code is the difference made between virtual addresses and physical addresses? once I made a page table, where do I tell the computer how to translate the addresses according to my table?
#9
Posted 16 October 2009 - 01:55 PM
Thanks! thats the tiny asm code I needed...
Darn, how did I miss it.
Darn, how did I miss it.

Also tagged with one or more of these keywords: malloc
![]() ".exe has stopped working"Started by AkhileshJain, 22 Jul 2014 ![]() |
|
![]() |
||
Language Forums →
C and C++ →
malloc or not to mallocStarted by fyr, 23 Jan 2013 ![]() |
|
![]() |
||
Language Forums →
C and C++ →
Dynamic Arrays: Using malloc()Started by china, 11 Sep 2012 ![]() |
|
![]() |
||
Language Forums →
C and C++ →
Using malloc() and realloc() for a variable-length stringStarted by DarkLordCthulhu, 17 Mar 2011 ![]() |
|
![]() |
||
Tutorial Forums →
C/C++ Tutorials →
malloc(); in C [Short tutorial]Started by lionaneesh, 08 May 2010 ![]() |
|
![]() |
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download