A thought I had...

Discussions on more advanced topics such as monolithic vs micro-kernels, transactional memory models, and paging vs segmentation should go here. Use this forum to expand and improve the wiki!
Post Reply
tkmk
Posts: 3
Joined: Fri Dec 26, 2008 6:56 pm

A thought I had...

Post by tkmk »

This is a little thing I thought of that *might* help...

Code: Select all

struct file{
  int exists;//boolean
  int isUsed;//To prevent deletion of critical parts and to avoid conflict
  int name;
  int location;//name is probably unnecessary with location...
};
struct folder{
  contents[];//not so sure of using an array for this
  int name;
  int exists;
  int isUsed;
  int location;//If it is a sub folder
  int isSubFolder;//Boolean
};
Hope this helps :D


P.S. i am a noob, so tell me if it has errors
User avatar
Love4Boobies
Member
Member
Posts: 2111
Joined: Fri Mar 07, 2008 5:36 pm
Location: Bucharest, Romania

Re: A thought I had...

Post by Love4Boobies »

Not trying to offend you by any means but... why did you post this?
"Computers in the future may weigh no more than 1.5 tons.", Popular Mechanics (1949)
[ Project UDI ]
tkmk
Posts: 3
Joined: Fri Dec 26, 2008 6:56 pm

Re: A thought I had...

Post by tkmk »

No particular reason. Just to see if this basic concept is correct. :)
User avatar
Love4Boobies
Member
Member
Posts: 2111
Joined: Fri Mar 07, 2008 5:36 pm
Location: Bucharest, Romania

Re: A thought I had...

Post by Love4Boobies »

Well this is basically how you would describe a filesystem based on your own observation of it, I guess. I suggest taking a look at JamesM's VFS (Virtual File System) tutorial. Enjoy! :wink:
"Computers in the future may weigh no more than 1.5 tons.", Popular Mechanics (1949)
[ Project UDI ]
tkmk
Posts: 3
Joined: Fri Dec 26, 2008 6:56 pm

Re: A thought I had...

Post by tkmk »

Thanks! I was thinking of adding type to the file structure, but I think its unnecessary
User avatar
Troy Martin
Member
Member
Posts: 1686
Joined: Fri Apr 18, 2008 4:40 pm
Location: Langley, Vancouver, BC, Canada
Contact:

Re: A thought I had...

Post by Troy Martin »

Adding a type descriptor isn't unnecessary, it's what MacOS did. They were normally 3 or 4 character strings to determine the type.

Also, that's a nifty idea, I should try converting it to NASM! :D
Image
Image
Solar wrote:It keeps stunning me how friendly we - as a community - are towards people who start programming "their first OS" who don't even have a solid understanding of pointers, their compiler, or how a OS is structured.
I wish I could add more tex
Post Reply