What's new

memory resident

tylerbingham

New member
I have finished my .dll and I have figured out how to call all the functions in it . Thanx everyone who helped me with that stuff.

Now, I have a new question.....I have heard a lot about "programs going memory resident", what does are the benifits of a program being memory resident ?? and how would I make a simple program do it ??
 

Eagle

aka Alshain
Moderator
Memory Resident and Terminate and Stay Resident (TSR) programs continue to use memory or stay running after they have been executed. Anything in your system tray is Memory Resident. TSRs mean that the executable ends but the program leaves code to run in memory (these are old DOS things basically, I dont know of any Windows TSR programs) Memory Residents programs continue running all the time like a virus scanner in your system tray.
 

N-Rage

New member
The last time I heard about memory-resident programms was when I had an Amiga1200, AFAIK those arent even possible on a Windows( atleast not at those not based on MSDOS ).

A Memoryresident programm is a Programm that stays in Memory during a reboot. Was used for lowlevel drivers/fixes and for Viruzez.

All Programms( also those showing on Taskbar ) are "resident" in Memory during execution, but theyre lost after they Terminate.
 

Eagle

aka Alshain
Moderator
N-Rage said:
The last time I heard about memory-resident programms was when I had an Amiga1200, AFAIK those arent even possible on a Windows( atleast not at those not based on MSDOS ).

A Memoryresident programm is a Programm that stays in Memory during a reboot. Was used for lowlevel drivers/fixes and for Viruzez.

All Programms( also those showing on Taskbar ) are "resident" in Memory during execution, but theyre lost after they Terminate.

Nothing stays resident in memory after a reboot. Never. Now the program can be restarted after the reboot, but thats just like system tray programs like what I said. Not even an Amiga1200 would keep stuff in memory after a reboot. When a computer loses ALL power all memory is erased. Everything from a Calculator to a PC is affected by this rule. Thats why memory is called temporary storage.
 

Hacktarux

Emulator Developer
Moderator
Eagle said:
Nothing stays resident in memory after a reboot. Never. Now the program can be restarted after the reboot, but thats just like system tray programs like what I said. Not even an Amiga1200 would keep stuff in memory after a reboot. When a computer loses ALL power all memory is erased. Everything from a Calculator to a PC is affected by this rule. Thats why memory is called temporary storage.

Actually many devices have a little memory area where software/os can store data, it's kept when a soft reset occur (not a hard one). I didn't know that there was such area on a pc but it doesn't surprise me. Fortunately, the os should protect it, so that viruses doesn't use it for bad purpose :p
 

N-Rage

New member
Eagle said:
Nothing stays resident in memory after a reboot. Never. Now the program can be restarted after the reboot, but thats just like system tray programs like what I said. Not even an Amiga1200 would keep stuff in memory after a reboot. When a computer loses ALL power all memory is erased. Everything from a Calculator to a PC is affected by this rule. Thats why memory is called temporary storage.

Im referering to a reboot aka a resetting the Computer WITHOUT switching it off. For a initially diskbased computer like the Amiga it was necessary to reset it via a keycombination when You decided to play another game - compare it to pressing reset on a console. Now if you inserted a disk infected with a memory-resident Virus, it kept itself alive on a reset by altering the behaviour on a reset-interrupt. So it could spread to the next disk that you would insert.

You are even able to make resetproof RAMDisks on a Amiga - reboot - and the RAMDisk did startup( if you made it bootable ), so dont tell me it aint possible - its even supported by the OS & Kickstart( aka Bios on IMB-Compatibles ).

Its possible that such resident Regions are possible within MSDOS, but they certainly arent on Windows.

Your Systemtray-programms are nothing else than sleeping programms, theres ZERO difference to a Programm sporting a Windows thats waits for input.

But you`re right, nothing in main memory survives a powerloss - but that aint a reboot in my languages ;)
 

Flash

Technomage
N-Rage said:
Im referering to a reboot aka a resetting the Computer WITHOUT switching it off. For a initially diskbased computer like the Amiga it was necessary to reset it via a keycombination when You decided to play another game - compare it to pressing reset on a console. Now if you inserted a disk infected with a memory-resident Virus, it kept itself alive on a reset by altering the behaviour on a reset-interrupt. So it could spread to the next disk that you would insert.

You are even able to make resetproof RAMDisks on a Amiga - reboot - and the RAMDisk did startup( if you made it bootable ), so dont tell me it aint possible - its even supported by the OS & Kickstart( aka Bios on IMB-Compatibles ).

Its possible that such resident Regions are possible within MSDOS, but they certainly arent on Windows.

Your Systemtray-programms are nothing else than sleeping programms, theres ZERO difference to a Programm sporting a Windows thats waits for input.

But you`re right, nothing in main memory survives a powerloss - but that aint a reboot in my languages ;)


If computer starts after power loss - it's reboot - cold reboot and nothing can survive it unless you have ramdrive with battery but it's not real RAM anyway. On our mainframe if power supply will fail (main and secondary PSU + both of UPS dead ) one small processor and special drive will continue running on capasitors within 30 seconds - it's enough to dump all of 256 GB's
of RAM to drive - system will restore from this world's biggest save file :) But this is reincarnation :)

So residents can survive warm reboot and cannot survive cold (without special hardware IDDQD :) )
 

Azimer

Emulator Developer
Moderator
Hardware is only initialized on a Cold Boot (press reset button or turn power on). Otherwise, hardware remains initalized to its previous state and memory is not cleared. This does not imply the OS will use the memory for its next bootup. It's just simply saying it's still there, but for all purposes, unused. If you remember, Smart Drive, the disk cache tool for MS-DOS, was a TSR. TSRs worked by hooking themselves in to interrupts. When the computer requests I/O smart drive was involked. When the computer requested a reboot via CTRL-ALT-DEL an interrupt was called and smartdrive dumped its cache. I am unsure if it was capable of saving writethrough cache on power off/cold boot. It doesn't seem to apply here since a software interrupt was never generated.

Information can be false, but it was true for the 486. I tested the extended memory myself and my audio card could be loaded without its config tool/driver on warm reboot. So they are just assumptions for all PCs.
 

rob in london

amiga nut
on certain types of computer it is possible to leave a program in memory during a cold reset. the way memory works is every so often its sent a pulse of power which keeps the contents of the memory from decaying. how quickley this happens depends on the type of memory, there are several programs for the amiga500 that will stay in memory during a hard reset for the above reason. the computer had to be turned off for at least 20 seconds to allow the memory to decay.
i doubt this is possible on more recent pcs as the speed of the memory has greaty increased, but a pc bios memory works in a very similar way, you would have to leave the battery out for a while for the bios to 'forget' its settings.
 

Top