Solved

linked lists and RAM

Posted on 2003-10-28
1
183 Views
Last Modified: 2010-04-15
I'm dealing with folder management. I should have clients which will have folders in tree structure which will in turn have list of records. Now, i should have 2 fields of the records in the RAM as interlinked pointers and do all my operations on them and this will correspondingly change the data in the secondary memory which it is pointing to. Once I power off my system, I will lose my pointers. But if i lose my pointers, that means I have lost my sorted list of reference also, as data in secondary memory won't be sorted and it is only the pointers which will undergo every operation. What should I do to get back my list of pointers with the latest modified status with the above mentioned requirements?
0
Comment
Question by:motian
1 Comment
 
LVL 45

Accepted Solution

by:
Kdo earned 130 total points
Comment Utility

Hi motian,

Are you writing an operating system where the process that you mention will be THE definitive entity that manages the folders, or are you writing a program that will run underneath another operating system to manage these folders?

If you are writing your own operating system, this data will have to be flushed back to disk on a regular basis to keep the "real" copy and your table synchronized.  I refer to the disk copy as "real" since it is the only thing that is preserved across boots.


In either case, whenever your program starts up, it needs to scan the directory and build your tables.

Kent
0

Featured Post

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

Summary: This tutorial covers some basics of pointer, pointer arithmetic and function pointer. What is a pointer: A pointer is a variable which holds an address. This address might be address of another variable/address of devices/address of fu…
This is a short and sweet, but (hopefully) to the point article. There seems to be some fundamental misunderstanding about the function prototype for the "main" function in C and C++, more specifically what type this function should return. I see so…
Video by: Grant
The goal of this video is to provide viewers with basic examples to understand and use for-loops in the C programming language.
The goal of this video is to provide viewers with basic examples to understand how to create, access, and change arrays in the C programming language.

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now