memory hard drive management chapters 6 9 l.
Skip this Video
Loading SlideShow in 5 Seconds..
Memory & Hard Drive Management Chapters 6 & 9 PowerPoint Presentation
Download Presentation
Memory & Hard Drive Management Chapters 6 & 9

Loading in 2 Seconds...

play fullscreen
1 / 32

Memory & Hard Drive Management Chapters 6 & 9 - PowerPoint PPT Presentation

  • Uploaded on

Memory & Hard Drive Management Chapters 6 & 9 David Turton Conestoga College Institute of Technology & Advanced Learning Doon 1D17 x3610 Early Memory Decisions (DOS) "no-one needs more than 640KB of memory"

I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
Download Presentation

PowerPoint Slideshow about 'Memory & Hard Drive Management Chapters 6 & 9' - andrew

An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.

- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
memory hard drive management chapters 6 9

Memory & Hard Drive ManagementChapters 6 & 9

David Turton

Conestoga College

Institute of Technology & Advanced Learning

Doon 1D17 x3610

early memory decisions dos
Early Memory Decisions (DOS)
  • "no-one needs more than 640KB of memory"
    • early 20-line busses: max addresses 220=1,024K=1M
  • conventional memory: 0-640K
    • O/S, applications, data
  • upper memory: 640K to 1024K
    • BIOS, device drivers
    • eg: 640K to 768K for video (128KB … Pong in B&W?)
  • extended memory: above 1024K
    • >24 address lines in bus available
    • Needed an extended memory manager
    • Code/data was swapped down to conventional to execute
    • Aberration: 1st 64K un-allocated
      • "High Memory" – for parts of O/S (eg: mouse driver)
dos memory map
This is a map of memory addresses

Not physical RAM

Video/network cards

Responded to an assigned range of addresses

Physical RAM

Responded to a disjoint address range

DOS Memory Map
implications other than billg getting embarrassed
Implications(other than BillG getting embarrassed)
  • O/S, applications and data had to fit in 640K
  • programs cannot have contiguous data space
    • couldn't run past 640K because of video
    • video ROM hard-coded to fixed address range
  • finite number of devices
    • only so many address ranges available
    • device memory conflicts frequent: modem/COM ports, etc.
  • devices couldn't grow larger
    • video range is 128K, period.
  • some applications (Lotus123) had own memory manager
    • To manage data files 1M or larger
    • WordPerfect had to write own memory manager
windows 9x
Windows 9x
  • O/S lives in extended memory
    • conventional & upper memory available for 16-bit apps
  • Virtual Memory
    • swap file (or page file) on hard drive
    • used as an extension to memory
    • swaps 4K pages between physical memory & swap file
      • Unused code/data to disk, active code to memory
virtual memory problems
RAM is faster than hard drive, no seek time

SATA 1.0 150MB/sec

PC3200 (400MHz) 3.2GB/sec (20x faster)

the more paging you do, the slower you go.


RAM is continually full, continually paging

CPU wasting time, high disk usage, slow response


Close applications

Increase RAM

Page file to another hard drive

On another EIDE cable

Increasing RAM

Business app score

Mult. applications open

Multimedia score

Editing media files

128MB  256MB

Business: 33% gain

Multimedia: 50% gain

128MB  512MB

Business: 8% gain

Multimedia: 10% gain

512MB  1GB

Business: 5% gain

Multimedia: 7% gain

Virtual Memory: Problems
nt 2000 xp 2003 memory management
NT/2000/XP/2003 Memory Management
  • Eliminated fixed memory ranges
    • lost some backward compatibility
  • Each application has a virtual memory range
    • Each range starts at byte 1
    • Grows in allocations of 4K pages
  • Virtual Memory Manager
    • between application/driver & physical memory
    • pages in & out of virtual memory
    • app asks for address 256
      • VMM delivers: might actually be address 5285 in RAM

This is one reason programs can’t work in “REAL MODE” … Not enough memory for everyone.

“PROTECTED MODE” hides physical limitations, allows O/S to give everyone everything they need.

Windows NT+




memory space for application 1


Physical RAM

memory space for application 2



improving virtual memory
Improving Virtual Memory
  • should be 2.5x RAM size
    • or more
  • make max and min page file size same
    • prevents file growing on demand
      • …and fragmenting
  • move page file to another physical disk
    • I/O to memory simultaneous with I/O for data & apps
memory errors
Memory Errors
  • recurring errors/lockups
    • "General Protection Fault"
    • "exception fault 0E at >>0137:BFF9C0D"
  • causes:
    • virus
      • update & run AV, download patches
    • memory modules faulty
      • Run test utilities (memtest86)
      • Pull/swap DIMMs one at a time, retest
    • Not enough RAM
    • Not enough free space on system disk

Emergency Start-up Disksincludes utilities to troubleshoot a failed hard drive… or at least see if you can salvage something … outlook.pst?

  • Win 9x
    • Single bootable diskette
    • Utility programs: fdisk, format, extract, etc.
    • Compressed cabinet file (
      • Uncompressed to RAM drive at boot
      • Can pick individual programs w/ extract.exe:
        • extract /d list files
        • extract fred.txt extract single file fred.txt
      • control panel  add/remove progs  startup disk
  • Win 2000 - 4 diskettes, includes O/S kernel
  • Win XP - backup file & boot diskette
win 9x rescue disk
Win 9x rescue disk
  • If can boot to A: prompt
    • Motherboard, CPU, memory, floppy drive, power supply and video system are functioning
      • Check amount of memory: ensure it sees it all.
    • Problem is likely the hard drive
      • fdisk – is partition table OK?
        • No: can repair:
          • Win 9x fdisk /mbr
          • Win 2000+ fixmbr
  • Can be used on Win XP systems
    • But can't look into NTFS file system
file systems micro oft if the file system is not healthy cannot use drive

DOS/Win 95

limit 2-4GB


Win 3.11/95

limit 2-4GB

255-byte file names

16-bit FAT


Win 95 SP2

limit >32GB


Win NT

limit ??EB

File Systems (Micro$oft)if the file system is not healthy, cannot use drive
fat16 vs fat32
File Allocation Table

1 pointer for each cluster on disk

Points to next cluster for a file

All 1's means end-of-file

All zeros means cluster is free

Else: address of next location


16 bits per pointer

Max value 216 = 65,536

Can only be 65,534 clusters on disk

2GB disk …

2,147,483,648 bytes / 65,534 clusters

= 32,700 bytes/cluster

5-byte file uses 32KB on disk


32 bits per pointer

Max 232

= 4.2 billion pointers

80GB disk …

Still has spare pointers

Min physical cluster size:

1 sector or 512 bytes

Min cluster used:

2 sectors or 1KB

FAT16 vs. FAT32
disk error checks
chkdsk c: /f

check c: for errors and fix them

from DOS prompt

scandisk c:

older: only Win 9x

like chkdisk

better with windows up


only win 9x

defragment a drive


try it!

… well, try the help prompt for it first

Win XP facilities

chkdsk still works

need to disable some things

else chkdsk restarts

Disk error checks
clean boot for windows xp ms article 310353
chkdisk & defrag:

keep restarting

never finish

need to disable:

startup programs



reset from clean boot:

general tab  click Normal start-up

run  msconfig

general tab

 selective startup




startup items,

load system services

services tab:


Hide all Microsoft Services, Disable All

OK  restart

Clean Boot for Windows XPMs article 310353
partitioning disks
win 9x

fdisk /status

partition info, all drives


screens to display or modify partitions

fdisk /mbr

repairs a damaged MBR

win 2000/XP

Disk Manager

prep a drive for 1st use


similar to fdisk


similar to fdisk /mbr

Partitioning disks

formatting a disk with a file system: see format /?

disk inefficiencies
Disk Inefficiencies
  • fragmentation
    • files are written to first available clusters
    • larger files may be written to several groups of clusters
      • these may be spread throughout drive
    • files are still available
      • but read time slowed with head movement
  • cross-linked files
    • clusters with more than one file pointing to them
  • lost clusters
    • clusters marked as in use
    • but no file in FAT references them
Disk Defragmenter

Collect file fragments

rewrite in contiguous space

  • supported by all Windows versions
  • "repairs" cross-linked files & lost clusters
    • lost clusters become "file001.chk"
  • locates and flags bad sectors
  • XP also has graphical version
    • note: needs exclusive access
    • Clean boot or check before loading services
freeing space xp through properties on a disk driver
Freeing SpaceXP: through properties on a disk driver
  • Disk Cleanup
    • lists & deletes temporary files
  • Disk Compression
    • stores data in drive in one big file
    • compression algorithm uses less space
    • trade-off:
      • more data transferred per read or write
      • more CPU load to compress/decompress

many slow trips


hard drive





hard drive

few slow trips

many fast trips


  • RAM to hold data read from or written to hard drives
    • cache program reads ahead of CPU
    • faster from RAM than waiting for disk to move
  • Hardware cache
    • BIOS and RAM on drive controller
    • slower bus to CPU
  • software cache
    • uses systems RAM
    • faster bus to CPU
  • can recover data lost to system failure, virus, etc.
    • only if you plan ahead
  • full backup
    • every file – very large, very slow
  • incremental backup
    • files changed since last backup (full or incremental)
    • archive bit turned off
    • fastest – need to restore full backup and every incremental since
  • differential backup
    • files changed since last full backup
    • archive bit left on
    • fast – need to restore full backup and only last differential
  • Note:
    • XP's backup doesn't compress – commercial products do
scheduled tasks control panel scheduled tasks
Scheduled TasksControl Panel  Scheduled Tasks
  • schedule tasks to run
    • daily, weekly, etc.
    • used by Ms backup, Norton AV
  • can create a batch file
    • copy certain folders
    • schedule to run daily
troubleshooting hard drives
Troubleshooting Hard Drives
  • Norton Utilities
    • prevent drive damage, recover data, repair damage, improve performance
    • use version for your O/S
      • damage could result
  • Partition Magic
    • FAT16 to FAT32, create/resize/move partitions
      • without losing data
      • Great for clients that "shorted" c: drive space
    • hide partitions
  • SpinRite
    • DOS: small footprint, real mode from floppy
    • analyse drive surface, data recovery from corrupted files, recover file system information
resolving drive problems
Resolving drive problems
  • invalid drive or drive specification
    • Booting from C:
      • same message using XP boot diskette
    • Partition table damaged on hard drive
      • Win 9x: fdisk /mbr XP: fixmbr
  • Invalid media type
  • Non-DOS disk
  • Unable to read from drive C:
    • O/S boot record damaged
      • recover from backup copy, if have one
      • repair w/ Norton disk doctor or SpinRite
resolving drive problems cont d
Resolving drive problems cont'd
  • Sector not found reading drive C, abort, retry, Ignore, Fail?
    • FAT or root directory damage
    • try copying important files off drive
    • Norton Disk Doctor
      • to repair FAT or root directory
  • Non system disk or disk error
  • Invalid system disk
    • Win9x: to recover io.sys & msdos.sys:
      • sys C:
    • Win XP: copy, from another machine:
      • ntldr,, boot.ini