LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 08-06-2002, 05:35 PM   #1
Half_Elf
LQ Guru
 
Registered: Sep 2001
Location: Montreal, Canada
Distribution: Slackware; Debian; Gentoo...
Posts: 2,163

Rep: Reputation: 46
Cool Wonderful Memory/Swap use?


How Linux can play a song, access a file, shows a movie if I delete the file during the process? I just discover I can move a mp3 and still listen to the song. Just a question: How?
 
Old 08-06-2002, 06:11 PM   #2
Thymox
Senior Member
 
Registered: Apr 2001
Location: Plymouth, England.
Distribution: Mostly Debian based systems
Posts: 4,368

Rep: Reputation: 64
You can move the MP3 file and it still plays (in xmms?) because the whole file has been dumped to memory and it's being played from there. Let's say, however, that you load a playlist (.m3u or whatever) and move one of the individual files (one that hasn't been played yet) in the list... when the player reaches that particular file, it'll throw a wobbly (or at least skip the file(s) and move onto the next valid file location).

Hope this helps.
 
Old 08-06-2002, 06:19 PM   #3
neo77777
LQ Addict
 
Registered: Dec 2001
Location: Brooklyn, NY
Distribution: *NIX
Posts: 3,704

Rep: Reputation: 56
Another observation, let say you have a huge mp3 file and you are playing it, memory gets filled with as much it can fit, lets say you removed the file after it started to play, the next page swap that occures in memory to free up/release unused pages and brin the new ones in you can have unpredictable outcome - you'd consider yourself lucky if it stops playing - I believe with linux memory management this is the case, in windows you'll get BSOD in the best case scenario.
 
Old 09-25-2002, 07:15 PM   #4
mkimball
LQ Newbie
 
Registered: Sep 2002
Posts: 1

Rep: Reputation: 0
Another possibility is when you move a file to another location in the same partition, you're not actually moving the file, you're just changing the directory information about that file. The operating system doesn't refer to that file by the directory name e.g. "/usr/data/mymusic/whatever.mp3", it refers to its inode. When you move a file, you don't change the inode, so when you move the file, the application that is currently reading the file has no idea about it because it doesn't track what the name, or directory location, of the file is (it only cares about the inode).
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Swap memory zero ??? lewkh Red Hat 2 07-23-2005 01:11 PM
Swap being used before memory gone bmiley_ncaa Linux - Hardware 2 09-29-2004 03:53 PM
no memory swap os2 Programming 2 06-11-2004 12:32 PM
Difference between Swap Virtrual memory and Swap Parition Nappa Slackware 4 11-27-2003 07:58 PM
Swap Memory in use or not? Qebex Linux - Hardware 5 09-21-2002 07:59 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 11:17 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration