Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6804191
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T19:26:09+00:00 2026-05-26T19:26:09+00:00

I currently have an assignment to create a filesystem in Java. I am trying

  • 0

I currently have an assignment to create a filesystem in Java. I am trying to implement it to be FAT-like. My concern is that I am not storing or reading each FCB efficiently. Each file has a FCB, which I currently have as:

 ___________________
|                   |
| size of file name |
|___________________|
|                   |
| file name         |
|___________________|
|                   |
| # of data pointers|
|___________________|
| data pointer #1   |
|-------------------|
| bytes to read     |
|-------------------|
| data pointer #2   |
|-------------------|
| bytes to read     |
|-------------------|
| ...               |
|-------------------|
| data pointer n    |
|-------------------|
| bytes to read     |
|___________________|

When I want to read the FCB, I do the following:

1. Get the first four bytes
2. Convert to int -> bytes in file name
3. Read that many bytes for file name
4. Read next four bytes
5. Convert to int -> number of pointers
6. Read 4 * number of pointers
    6a. Read address from pointer #1
    6b. Read number of bytes, starting from address

In the end, my filesystem will be stored as

 ___________________
| number of pointers|
|-------------------|
| FCB#1             |
|-------------------|
| ...               |
|-------------------|
| FCB N             |
|-------------------|
| Data              |
|                   |
|                   |
|___________________|

I am concerned that my overhead is going to be too expensive when storing the FCBs. Is this how I am supposed to do it, though, for FAT, or am I totally misunderstanding it?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T19:26:09+00:00Added an answer on May 26, 2026 at 7:26 pm

    I suspect you may have slightly mis-understood a couple of things, or just need a little guidance in how to better structure your data. I detect several different types of data mixed together, and from experience, that can lead to confusion.

    I’ve implemented a few file systems in my time, and I have found it very convenient to separate as much as possible the types of data into:

    1. File data : the file's data.
    2. File meta-data : tells you about the file data (where it is found, permissions, ...)
    3. File system meta-data : tells you what's free to use and what is not
    

    Depending upon the file system, there may be some overlap. For example, in a FAT based FS such as that used by DosFS, the disk is essentially divided into two parts–the File Allocation Table (FAT) and the data space. The FAT is simply a table of entries that identify which clusters (disk blocks) in the data space have been allocated. However, to help conserve memory it utilizes a couple of tricks …

    1. Each cluster in the data space maps to a unique entry in the FAT.
    2. The FAT entry contents identify the NEXT cluster that contains data (it's a linked list).
    3. Special FAT entry values are used to mark a free entry, and the end of the chain.
    4. Each cluster is the same size.
    

    Directories, can be thought of as special files that follow special rules. Depending upon the FS, directory entries may be of fixed size, or variable size. In the case of the FAT based DosFS using the classic 8.3 naming convention, each entry is the same size. A directory entry must provide you with the means to discover the file name, where to begin finding its data as well as where to find its property data (such as file size and permissions). Some will store all this information directly as part of the entry, others will tell you where to start to find it.

    I hope this helps.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I currently have a school assignment that involves both PHP and asp.net. Now the
I currently have a class and I'm trying to create an easy GUI to
I am currently working on a homework assignment where I have to create a
So I have an assignment for school that requires me to create a fixed
I have an assignment that I need to create a custom C type string
I currently have an MS Access application that connects to a PostgreSQL database via
We currently have code like this: Dim xDoc = XDocument.Load(myXMLFilePath) The only way we
The goal of the assignment that I'm currently working on for my Data Structures
I'm trying to create a program that reads in a .txt file with multiple
I am currently doing a uni assignment as a fresher so I'm not very

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.