After attempting to unload a terminate-and-stay-resident (TSR) program, you receive an error that newer TSRs were loaded after it. Which command shows the current load order and memory allocation of resident programs and device drivers?

Difficulty: Easy

Correct Answer: MEM /C

Explanation:


Introduction / Context:
TSRs load into conventional or upper memory and remain resident, often in a Last-In, First-Out order. Unloading a TSR requires that no other TSRs loaded after it still depend on its services or occupy memory above it. DOS provides a memory reporting utility that can display resident programs and drivers so you can understand the load order before attempting removal.


Given Data / Assumptions:

  • You are working in a DOS environment where multiple TSRs and device drivers are present.
  • An attempt to unload one TSR failed due to load order constraints.
  • You need a built-in command to list memory consumers by name and type.


Concept / Approach:
The MEM command reports memory usage. With the /C switch, it provides a detailed breakdown of conventional and upper memory, including loaded TSRs and drivers, typically in the order they occupy memory. This helps identify which TSRs were loaded later and must be removed first. Other switches or tools either only paginate output or tune memory but do not show the needed allocation detail for immediate troubleshooting.


Step-by-Step Solution:

Step 1: At the prompt, run: MEM /CStep 2: Review the list of programs and drivers with their sizes and regions (for example, UMBs).Step 3: Determine the newest TSRs sitting above the target and plan the correct unload order.Step 4: Use each TSR's documented unload command in reverse load order when possible.


Verification / Alternative check:
After unloading the upper TSRs, run MEM /C again to confirm they are gone and that the original TSR can now be removed cleanly.


Why Other Options Are Wrong:

  • MEM /P: Adds paging to MEM output but does not specifically display the allocation breakdown you need alone.
  • MEMMAKER: An optimizer that reconfigures memory; it is not a quick view of current TSR order.
  • SYS:: Used to transfer system files; unrelated to memory listings.
  • None of the above: Incorrect because MEM /C provides the correct listing.


Common Pitfalls:
Attempting to unload TSRs out of order, not recognizing device drivers that are not unloadable, and forgetting that some TSRs lack a safe unload capability.


Final Answer:
MEM /C

Discussion & Comments

No comments yet. Be the first to comment!
Join Discussion