Ubuntu :: Reading Data From Disk Into Memory

Jun 6, 2011

I have a simple C program that reads a 1 GB file from disk into memory.The first time I run this program, the process takes several seconds. But if I run this program again immediately after it finishes, the read happens almost instantly. What is going on here?My suspicion is that the operating system is realizing that the data I'm trying to read is still uncorrupted in memory (its been freed but not overwritten), so instead of reading it again, it just gives me the same block. I would really like to know what this process is called, or any Googleable keywords that would allow me to research it.

The reason I ask is because the size of my input data has increased. Now I need to read in a 6 GB file (my system has 12 GB of RAM), but I'm not observing the same behavior with the larger file. Each time I run the program the read takes an equally long time.

View 2 Replies


ADVERTISEMENT

Networking :: Serial Port : Read Data, Not Reading Complete Data?

Mar 5, 2010

I have an application where I am sending data via serial port from PC1 (Java App) and reading that data in PC2 (C++ App). The problem that I am facing is that my PC2 (C++ App) is not able to read complete data sent by PC1 i.e. from my PC1 I am sending 190 bytes but PC2 is able to read close to 140 bytes though I am trying to read in a loop.Below is code snippet of my C++ AppOpen the connection to serial port

Code:
serialfd = open( serialPortName.c_str(), O_RDWR | O_NOCTTY | O_NDELAY);
if (serialfd == -1)

[code]...

View 5 Replies View Related

Ubuntu :: Reading Encrypted Memory Stick ?

Mar 15, 2011

I've got a memory stick with encrypting software. How can I read (and write) this encrypted partition with my ubuntu 10.10? I'm sorry but i don't know what's the manufacture of this stick. I only know it looks like this (Of course no M$ -logo)There are sotfware named UFDutility.exe. Opening this I can read secured informations in Windows but in Ubuntu it only say: �The device is not plug-in�.

View 2 Replies View Related

Ubuntu :: Reading EXIF Data From TIFF Files

Aug 9, 2010

I'm having trouble reading EXIF data from TIFF files. Both 8 bit and 16 bit fail to load EXIF data via eye of gnome and GIMP and I'm not sure why. Neither files downloaded online nor rendered from Bibble 5 seem to work. Using Ubuntu 10.04 64bit and GIMP 2.7.2.

View 2 Replies View Related

Programming :: Reading Data From Multiple Files?

Mar 17, 2011

I have a folder which includes bunch of folders each having data files in them. [ Folder A has F1, F2 F3 ..... F1000 folders in it, and F1, F2, F3 ... each has about 10 different files named FILE 1, FILE2, FILE3 .... in them.

I am interested in File 1 of each Folder, because that contains the data I need in it. More specifically, that File1 s have a line "ANSWER=..." in them, and i need to get that value of the ANSWER from each file. So doing it by hand is so hard, so I need to write a script that will scan all folders and give me a list of values of eache ANSWERs.

View 4 Replies View Related

Programming :: Reading A File Of Data In An Array?

Feb 10, 2011

I have two files of data with different numbers of columns and rows. I want to read this two files in two arrays and then compare for example the second column of first data file with the third column of the other text file and if the difference between of two numbers is less than a threshold then the program print the information in the rows which fulfill this condition in the third text file. I have written below program but the problem is that it does not go through all rows of second file.

declare -a a
declare -a b
r=` awk '{n++} END {print n}' second.txt `
echo $r
awk '
{

[Code]....

Actually I have two data files one of them contains 44406 and the other one has 12066 rows and I want to check whether the difference between the components of two specific columns is less than a threshod but I have simplified it here. I had written this code and then I have realized that this code just goes through the number of rows as the same as the first.txt file and ignores the rest. I could not find the problem yet.

View 2 Replies View Related

Ubuntu Security :: Home Folder - Reading Data Encrypted With Old Version

May 17, 2010

If I wanted to transfer a home folder that was encrypted to another ubuntu computer could I? If I had a separate home partition that was encrypted, but I wanted to upgrade ubuntu to the latest version by doing a clean install is there an easy way so that I can still read the data encrypted with the old version?

View 5 Replies View Related

Fedora :: Reading A Data From CD / Dvd Is Very Slow After Change Motherboard

Mar 28, 2010

Recently changed my motherboard. The new board has the 790FX/SB750 chipset, and the old board used the 770/SB600 chipset. Prior to the change, I had never had any problems reading/writing CDs or DVDs. I now find that reading a data CD is very slow, it can take up to 30 secs before the icon appears on the desktop and a filer window appears. In my tests thus far, only data CDs written on Linux can always be read, albeit slowly. Data CDs written on Windows are variable. Some are never seen by the system, others may or may not be opened. That is I might be able to read it during one test, and next time I try I can't.

When a CD is not 'seen', there is an initial flurry of activity by the drive, but the drive icon (in "Computer' window) doesn't think a disc is in the drive. I can boot OK off a DVD, and data DVDs wrtten on Linux are opened and read quite fast. I am running Fedora 12 x86_64 with the latest Fedora kernel package (2.6.32.9-70), and the Motherboard bios is the latest available. The CD/DVD drive is a SATA Pioneer DVR-215. I have checked the bios settings, and have tried setting 'storage configuration' to IDE and to AHCI, each giving the same result.

I tried switching the SATA data cable from SATA-3 to SATA-2 and was able to open and read a Windows data CD that had previously not been seen, but subsequent attempts have failed to open and read that CD. I suspect the problem may have something to do with hardware drivers, but I really am guessing about this and have not been able to find any useful information on this.

View 6 Replies View Related

General :: Reading The Manufacturer Data / Device ID On A USB Drive?

Jun 28, 2011

I wish to read the Manufacturer data and other details such as Device ID, Serial number on a USB drive.

1. Could anyone help me out with information on the memory structure of a USB drive? (which location is the mnfr data stored?)

2. Are there are any commands in Linux that will help in reading/accessing this data?

View 3 Replies View Related

Software :: Block Driver Error While Reading Data

Jan 22, 2010

i am writing sample block driver while reading data i am getting below error

i am not getting what is this error

BUG: sleeping function called from invalid context at kernel/sched.c:4684 in_atomic():0, irqs_disabled():1

Pid: 5364, comm: test_buf Not tainted 2.6.27.42 #1
[<c041f1d4>] __might_sleep+0xae/0xb3
[<c063ae43>] wait_for_common+0x1f/0x117

[Code]....

View 5 Replies View Related

Programming :: Clearing Cache - Reading Data Upon Investigation

Apr 9, 2009

I have been saving an XML file wherein I shall be reading data, if and only if the XML is present on Hard Drive. If same is not present, the code shall generate first and next time it shall simply read and not jump into writing part again and again. The issue that I am facing is, I am deleting the file manually going to that location, and checking whether it is reading the data, upon investigation, I found that it is really reading the data although the file is deleted.

I suspected that there may be some cache issue from where it is picking values, hence it fired the command
"sync; echo 3 > /proc/sys/vm/drop_caches"
But it is still doing the same pattern.

View 2 Replies View Related

Programming :: Displaying I/O Possible When Reading Data From The Serial Port?

Aug 31, 2009

I have got a problem while reading from the serial port. I'm working on iMX-31 board and Eclipse IDE. Whenever I'm trying to read any data through the serial port, it's displaying I/O Possible and the application is being terminated. After reading I'm trying to write this data on a file. Here are the excerpts from the code:

# int main()
{
if (openport()<0)

[code]...

View 7 Replies View Related

CentOS 5 :: Redistribute A Disk Without Loss Of Data Namely It Is Necessary To Make / Boot And Two Equivalent On Disk Volume?

Aug 24, 2009

There is a disk 500 gb, it is broken on /boot and on /root and on /dev/sda1 and /dev/sda2. Whether prompt it is possible to redistribute a disk without loss of data namely it is necessary to make/boot and two equivalent on disk volume.

View 3 Replies View Related

Ubuntu :: Pc Acting Slow When Reading / Writing Files From _ Onto Disk - Is That Normal?

Sep 27, 2010

Whenever I am busy reading or writing large files, or large sum of files, my computer is unresponsive. Screens are getting greyed-out and I just can sit there and wait until the reading/writing is done.
This is not caused by the CPU which is overstressed because it is not. Look at the attachments and you will see the CPU is used for about 20%. When these pictures were captured the computer was using hellanzb to unrar a long list of rar-files.
When you look at my signature you see the computer is not bad at all, just disk-access is slow. I can transfer files with a maximum speed of 30MB/s. Is that normal or is it very slow? I don't know the numbers. I have 2 SATA disks.
O.S. is Mint 9-Isadora, based on Ubuntu 10.04 and I use the 64-bits version.

View 9 Replies View Related

General :: Live CD On A PowerMac G5 - Permissions Reading A Dir On HFS Mac Disk

Feb 2, 2011

We have G5 PPC with Mac OS 10.xx (panther?). I need files from it, but we don't have the passwords for the machine, and have no disks with which to recover data or reinstall the OS. So, I used an Ubuntu Jaunty Jackalope 9.04 disk and mounted the drives, but when I try and open the target dir, I get permission problems.

View 2 Replies View Related

Hardware :: Hard Disk: Not Reading Partitions Or Not Readable?

May 2, 2010

I've a faulty hard disk I'm trying to read data from before I send it to the professionals. The disk makes some "good" mechanical noise when plugged into an IDE-USB header into my machine, so I think it's spinning up OK.

Under Windows, the disk is seen in admin tools but I can't do anything to it; it's unreadable and unalterable.

Under Linux (Ubuntu), I see the sdb appear in /dev. No partitions though (no sdb0 etc). At first, I thought this implied that my MBR was bad and the partitions could not be found. But, using dd suggests it's a little worse that:

Quote:

sudo dd if=/dev/sdb
dd: reading `/dev/sdb': Input/output error

View 2 Replies View Related

Fedora :: RAMDISK: EOF While Reading Compressed Data ...Kernel Panic - Unable To Mount Root?

Jul 31, 2010

I was following this tutorial on How install the rpmfusion nvidia drivers in Fedora 13Here's the tutorial:Quote:Originally Posted by leigh123linuxF13 Howto for the rpmfusion nvidia drivers This is a Three-Step Process. If you don't follow all three steps, your install will fail!1. Install the nvidia driver. ( if you have 4Gb of RAM or more you will probably have a PAE kernel [32bit only] so follow the PAE part )For GeForce 6, 7, 8, 9, 200 & 300 series cards

Code:
su
rpm -Uvh http://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-

[code]...

View 2 Replies View Related

Software :: Reading And Writing SAC (Seismic Analysis Code) Data Files In Fortran Codes

Dec 2, 2008

I synthesized a seismogram by using Fortran codes, I need plot the synthesized seismogram and the data together, so I can verify the accuracy of code. Now I encounter a question: how to read the SAC data by Fortran code, I have searched some codes on Internet, the details as follow:the velr12a.sac is my data file.

Code:
c read sac file
PROGRAM RSAC
PARAMETER (MAX=1000)
DIMENSION YARRAY(MAX)
CHARACTER*10 KNAME

[Code]....

View 2 Replies View Related

General :: Sort All Data In Memory?

Jun 11, 2011

For Linux command sort, how do I force sort to load all input into memory and sort assuming I have enough memory? Or is it best to use a RAMDISK to store the input before feeding it to sort?

View 3 Replies View Related

Ubuntu :: Unmounting USB-drive (flash Memory) - Get Data Back?

Jan 6, 2010

I stupidly unplugget my USB-cable, which was connected to my Nokia music phone, just as if I were in Windows. What do I do? I've lost my music on the phone, or, it seems it may be there (the correct mass of data), but my phone now tells me there is no music... Can I recover this? And - what is the correct way to unplug a USB unit in Ubuntu? To make it work, and find the phone/drive - I just typed "sudo lsusb" in the terminal, and it found and opened the memory automatically... How should you unmount the USB, and maybe even how do I get my data back?

View 7 Replies View Related

General :: Program To View Data In Memory RAM?

Aug 5, 2011

I'm running a java program and to debug the program instead of using a debugger I would like to look to the heap and to the bytes in the memory of the process. I was hoping that the pointers would give me a snapshot of a moment of the application. It exists a program that allow us to look to the details of a process and to the memory ram?

View 2 Replies View Related

Software :: Writing Data Into A Memory Location?

Feb 1, 2010

I am using ARM9(S3C2440) board in which linux kernel 2.6.30.4 is ported and i need to write some 8-bit data(say 0xAA) into the memory location 0x08000000 and i need to trace the data written into the location is correct or not how to do this in linux.

View 3 Replies View Related

Programming :: Data Structure To Manage Memory?

Oct 1, 2010

I have a mxn matric (which is my simplified way of saying it is RAM with bytes on it) Some of the locations on this metric is filled with some data and some places are empty. The mxn are very big numbers in size. I am trying to make a program so that if a system call wants to write some thing on empty locations on this mxn metric it should be able to do so without any problem. The thing which I want to understand or logic of a data structure is what data structure do you people feel should I be maintaining so that I can allocate the requested space immediately from the above mxn matric when some system call requests for some (k) number of locations from above metrics.

The logic initially I thought was to maintain a hashtable

1bytes requested----------> location 1,location 2,location 3.........location n
2bytes requested----------> location 1,location 2,location 3.........location n
3bytes requested----------> location 1,location 2,location 3.........location n

[code]....

but the problem with above logic is size of the pointers where I will be writing this problem is unsigned 64 byte.So to know location of one free byte if I am maintaining one pointer of type u64 this is not a feasible solution.

View 6 Replies View Related

Software :: Memory Card Data Recovery Program?

May 18, 2009

A friend of mine asked me to try and recover some photos she deleted by accident on her SD memory card. Normally, I would flip over to my Windows box and do this, but I'm wondering if there is a Linux equivalent to a Windows data recovery program. I'm running Fedora 10.

View 2 Replies View Related

Ubuntu Servers :: Can't Graph Disk Io & Memory In Virt-manager?

Oct 6, 2010

I installed the latest 10.04.1 server minimal install and enabled the virtualisation option. I compiled enough X so that I could run virt-manager and I was able to create a couple of VMs and run them and manage them, but the problem is that in the graphs in manager, I can only get CPU usage, not Disk or Network IO. The options are greyed out. Am I missing something required for these graphs to work ?

View 1 Replies View Related

Hardware :: San Disk Memory Stick PRO Duo Reader?

Jan 16, 2010

I'm trying to get the built-in reader on my system working. It's one of those multi-slot ones on the front of the box. The card I have is specifically a "San Disk Memory Stick PRO Duo", this sucker here: [URL]

The light on the reader will light up, but there's zip in any of the kernel logs. I tried the obvious kmods to get it working - tifm_7xx1, tifm_sd, tifm_core, via_sdmmc, mmc_core, etc but no luck.

Nothing seems to be useful in lspci or lsusb:

Code:
00:00.0 Host bridge: Advanced Micro Devices [AMD] Unknown device 9601
00:02.0 PCI bridge: Advanced Micro Devices [AMD] Unknown device 9603
00:07.0 PCI bridge: Advanced Micro Devices [AMD] Unknown device 9607
00:0a.0 PCI bridge: Advanced Micro Devices [AMD] Unknown device 9609

[Code].....

View 1 Replies View Related

Programming :: Write() To Disk Causes Memory Leak?

Oct 26, 2010

I have encountered this problem of memory usage is increasing as the during the my program is being run until 1Mb is left then it stays at that.A part of the program is this:

Code:
#define WRITE_BUF_SIZE (1024*1024)
void post_data(const void *data, unsigned long size)

[code]....

View 3 Replies View Related

Ubuntu Networking :: Broadcom On 2.6.34 - Reinstall Error Code: Reading Package Lists ... Done Building Dependency Tree Reading State Information

May 20, 2010

i installed kernel 2.6.34 to fix my lid closing issue, and that went great. but now when i go to reinstall my broadcom i get this error. Code: Reading package lists... Done Building dependency tree Reading state information... Done bcmwl-kernel-source is already the newest version. 0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded. 1 not fully installed or removed. After this operation, 0B of additional disk space will be used. Setting up bcmwl-kernel-source (5.60.48.36+bdcom-0ubuntu3) ... Removing old bcmwl-5.60.48.36+bdcom DKMS files...

[Code].....

View 9 Replies View Related

Software :: Notepad Equivalent - Transfer The Data To Windows Desktop Regularly Via Memory Stick

Sep 27, 2010

I have just started to learn Java programming and need to be able to use a compatible notepad equivalent in Ubuntu i will need to save the data as is,in Ubuntu and be able to transfer the data from my Linux machine to the windows desktop regularly via memory stick i absolutely love Linux and don't want to have to go back to windows to do this.

View 5 Replies View Related

General :: Why Is Reading A FILE Faster Than Reading A VARIABLE?

May 4, 2011

I don't understand the results of a simple performance test I ran using two basic scripts (running on a high end server):

perfVar.zsh :

#!/bin/zsh -f
MYVAR=`cat $1`
for i in {1..10}

[code]...

Performance test result:

> time ./perfVar.zsh BigTextFile > /dev/null
./perfVar.zsh FE > /dev/null 6.86s user 0.32s system 100% cpu 7.177 total
> time ./perfCat.zsh BigTextFile > /dev/null
./perfCat.zsh FE > /dev/null 0.01s user 0.10s system 91% cpu 0.118 total

I would have thought that accessing a VARIABLE was way faster than reading a FILE on the file system... Why this result ?Is there a way to optimize the perfCat.zsh script by reducing the number of accesses to the file system ?

View 3 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved