Solved

Force file write delay ( a special filesys using physical memory )

Posted on 1997-08-03
3
265 Views
Last Modified: 2013-12-26
Is there any way to force write delay for specical files in
UNIX system ? It should be something like
fopen(myfilename, rw, "Not_Write_To_HardDisk").

I meant if the system programmer know the file(s) is a frequently used, frequently changed ( not necessary to flash to HardDisk ) one, can he do something to interfere with the file system swapping ?

Or can we allocate a small physical memory area, setup a filesystem on it, then let several programs read/write data file from/to it. That will just like a RAM disk in PC, a small never_swap_out file system.

I think it will be a fast & easy way for several processes to share some public data. Those processes may be designed by different programmers, for different purpose. But no one need to worry about the share memory stuff,  and  file read/write/lock are easy to handle.

PS, it's very useful for hot imgs/pages in web server. Can proxy server do the job (cache specific file in physical memory) ?

Any sugguestion or successful story ?  Thanx.
0
Comment
Question by:sunjohn
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 

Author Comment

by:sunjohn
ID: 1294166
Adjusted points to 100
0
 
LVL 4

Accepted Solution

by:
jos010697 earned 100 total points
ID: 1294167
Have a look at mmap() and munmap(). Those functions
map a region of memory onto a file. The file is used as
swap space _whenever necessary_. If there' enough
memory available, all of the mapped region stays in core.

Simply map a (existent) file to memory and let all the processes
do whatever they want to do with it; they all treat it as if
it wrer just part of their (virtual) address space.

kind regards,

Jos aka jos@and.nl
0
 

Author Comment

by:sunjohn
ID: 1294168
Thanks a lot.
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction: Dialogs (1) modal - maintaining the database. Continuing from the ninth article about sudoku.   You might have heard of modal and modeless dialogs.  Here with this Sudoku application will we use one of each type: a modal dialog …
In this post we will learn different types of Android Layout and some basics of an Android App.
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
In this video, viewers will be given step by step instructions on adjusting mouse, pointer and cursor visibility in Microsoft Windows 10. The video seeks to educate those who are struggling with the new Windows 10 Graphical User Interface. Change Cu…

734 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