![]() |
![]() |
#1 |
CON: artist
Join Date: Feb 2006
Location: Poland
Age: 43
Posts: 1,250
![]() |
Making commands resident.
Here are a couple of simple questions for the experts out here:
How does making a command resident differ from copying to ram: and running it from there? Does it somehow prep the executable (loads the required hunks)? Thanks ![]() |
![]() |
![]() |
#2 |
Moderator
Join Date: Jun 2001
Location: I'm behind you!
Posts: 3,763
|
I may be wrong, but I think it means only one copy is needed to run multiple processes involving that command.
Hence why Execute and Assign are made resident in the standard startup-sequence as they are called for many times during boot. If you execute the command from RAM, it's less efficient and uses more resources/reads/copies of the command for multiple calls and processes. The "pure"/P flag identifies commands that can be made resident. Someone will probably have a technical explaination soon enough! ![]() Last edited by Bloodwych; 22 June 2009 at 21:07. |
![]() |
![]() |
#3 |
CON: artist
Join Date: Feb 2006
Location: Poland
Age: 43
Posts: 1,250
![]() |
But is it just that? Some programs cannot be made resident (self-modifying code?) but still can be run from RAM:.
Maybe someone can shed more light on this ![]() |
![]() |
![]() |
#4 |
Registered User
Join Date: Jan 2002
Location: Germany
Posts: 7,025
|
Get a computer lexicon and learn about terms like reusable and reentrant. A program which can be made resident must be reentrant.
|
![]() |
![]() |
#5 |
Registered User
Join Date: Sep 2007
Location: Las Cruces, USA
Age: 71
Posts: 351
|
Making a command resident simply loads it into memory and sets it up the same way typing the command at the prompt does, except no process is created to run it. Then everytime you type the name of the command at the prompt the system knows that's it's already set up so it only creates a process to run it. This is faster and uses less memory, but the program has to be reentrant because more then one process can run the code at the same time.
If you run a non resident command more then once at the same time it's loaded and setup in memory each time, using more memory. Running from ramdisk doesn't change that, it's no different then loading the program from disk, other then being possibly faster loading. It's mostly useful when using batchfile commands like 'if' because they're already loaded and setup so they're faster. I've used the resident command when doing sound effects for plays. The last one I did I loaded 8 audio players with different Arexx port names, each player doing a different sound file. Instead of loading the audio player 8 times using the 'run' command and using up all that memory, I first made it resident, and then loaded the audio player 8 times using the 'run' command. 8 process were created all running the same code, and yes, the audio player is reentrant. ![]() |
![]() |
![]() |
#6 |
CON: artist
Join Date: Feb 2006
Location: Poland
Age: 43
Posts: 1,250
![]() |
|
![]() |
![]() |
#7 |
Registered User
Join Date: Sep 2007
Location: Las Cruces, USA
Age: 71
Posts: 351
|
|
![]() |
![]() |
#8 |
In deep Trouble
Join Date: Sep 2004
Location: Manchester, Made in Norway
Age: 51
Posts: 841
|
I always made the E-compiler resident via "resident E:bin/EC PURE" in startup-sequence due to me not fancying to write the whole path everytime I compiled my test projects way back when
Dirty trick, I know.... on the other hand, it saved me from having non-system files on the sys: partition *sigh* (offtopic) too bad my HD went byebye in '96.... I had just about started to get the hang of AmigaE when it happened ![]() |
![]() |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Resident Evil Demo | XDelusion | request.Old Rare Games | 6 | 29 March 2016 22:47 |
Zip help commands | mickolite | support.Apps | 5 | 16 June 2011 21:00 |
What is required of a resident application? | Leffmann | Coders. General | 6 | 03 April 2010 22:50 |
Resident magazine module | mailman | request.Modules | 4 | 26 December 2009 14:56 |
ROM resident HRTMon | Toni Wilen | Coders. General | 24 | 09 January 2008 09:33 |
|
|