CSE1720 Semester 1 2005 week 4 / 1 Lecture No. 4 Memory and its Management Operating Systems 2000...

Preview:

Citation preview

CSE1720 Semester 1 2005 week 4 / 1

Lecture No. 4Lecture No. 4

Memory and its Management Operating Systems 2000 and XP

CSE1720 Semester 1 2005 week 4 / 2

This LectureThis Lecture

Last week, we started to look at some of the ‘internals’ of PC (mainly) hardware and software - mostly at Operating System and Hardware CPU level

This week, we are going to have a slightly deeper look

CSE1720 Semester 1 2005 week 4 / 3

Memory/Memory ManagementMemory/Memory Management

**************************Conventional memory: Up to the first 640Kb of memory. All MS-DOS based programs require conventional memory

Upper Memory Area : 384Kb above the 640Kb of conventional memory Used by System Hardware (display adapter) UNUSED parts of upper memory are called upper memory blocks (UMB’s). Used for running device drivers and memory resident programs

Personal Computer Memory: - at DOS system prompt, key in mem/c

CSE1720 Semester 1 2005 week 4 / 4

Memory/Memory ManagementMemory/Memory Management

Extended Memory (XMS): Beyond 1Mb ( 286,386,486) Requires an extended memory manager (HIMEM.SYS)

Windows and Windows based applications require extended memory

High Memory Area : First 64Kb of extended memory. (MS-DOS is normally loaded here. Leaves more conventional memory available)

CSE1720 Semester 1 2005 week 4 / 5

Memory/Memory ManagementMemory/Memory Management

Virtual Memory: Space on the system hard disk which is used by Windows as if it were ‘normal’ high speed memory

Expanded Memory (EMS): Installed on the system expanded - memory board, uses an extended memory manager.

Available in 64K blocks - EMS page frame

Slower than using extended memory.

CSE1720 Semester 1 2005 week 4 / 6

Memory/Memory ManagementMemory/Memory Management

Extended Memory (XMS) (2Mb)

HMA

Upper Memory Area (384Kb)Conventional Memory

(640Kb)

Expanded Memory

(EMS) (1Mb)1Mb

16,32,64,128 ... ? Mb3Mb

640Kb

CSE1720 Semester 1 2005 week 4 / 7

Other Storage MattersOther Storage Matters

The amount of ‘high speed main memory’ is limited.

The limiting factors are size related to the volume of data required to be stored, addressing capability and of course, cost

One of the major aims of a computer is to provide fast processing/throughput

A limiting factor is the ‘retrieval’ of data from secondary storage (disks, CD-Rom, DVD, ….)

CSE1720 Semester 1 2005 week 4 / 8

Other Storage Matters Other Storage Matters

However, once data in is the ‘high speed storage’ area, there are a few ways of improving process capability

One method is to have ‘Cache Memory’ -

this is a copy of data which was• retrieved from secondary storage (disk or CD Rom),• placed in Random Access memory (RAM)• retrieved from RAM for process purposes by the CPU, • AND a copy of the ‘record’ or ‘data element’ is placed in

Cache Memory.

CSE1720 Semester 1 2005 week 4 / 9

Cache MemoryCache Memory

If the ‘data’ is required again, the first search is to Cache Memory

There are 2 major types of Cache Memory• Internal Cache - built into the CPU chip• External Cache - is located on SRAM chips close to the

CPU on the system board

• Cache Memory can be from 1Mb to 2Mb

CSE1720 Semester 1 2005 week 4 / 10

Cache MemoryCache Memory

The pattern of search is

- 1. internal cache

- 2. external cache

- 3. main memory

and then to secondary storage (disk, CD-Rom , DVD….)

CSE1720 Semester 1 2005 week 4 / 11

Memory ChipsMemory Chips

2 Basic Types

– 01. Random Access memory (RAM) (volatile)

SRAM (static RAM - refresh not necessary)

DRAM (dynamic RAM - needs refreshing - slower than SRAM)

CSE1720 Semester 1 2005 week 4 / 12

Memory ChipsMemory Chips

– 02. Read Only Memory (ROM) (non volatile)

Also, not able to be altered by the user (Other variations PROM, EPROM

CSE1720 Semester 1 2005 week 4 / 13

Memory ChipsMemory Chips

Another less obvious chip also exists:

• CMOS - Complementary metal oxide semiconductor

Requires only low power. Holds setup details - supplemented by Autoexec and Config data

CSE1720 Semester 1 2005 week 4 / 14

More Chip TypesMore Chip Types

DRAM - dynamic RAMFPM RAM - Fast page-mode RAMEDO RAM - Extended Data Out RAMBEDO RAM - Burst Extended-data-out RAMSDRAM - Synchronous dynamic RAMSRAM - Static Random Access MemoryAsync SRAM - Asynchronous SRAMSync SRAM - Synchronous (with the system clock)PB SRAM - PipeLine Burst SRAMVRAM - Video RamWRAM - Windows RAMSGRAM - Synchronous RAMDDR DRAM - Double Density Read RAM

CSE1720 Semester 1 2005 week 4 / 15

More ChipsMore Chips

• FPM DRAM – Fast Page Mode D Ram• PC133 SDRAM – Bus speed 133mhz• 1T-SRAM• Direct RDRAM – Read DRAM

• SDRAM is about 3 times faster than FPM RAM– And about twice as fast as BEDO DRAM

• SDRAM is replacing EDO DRAM in newer PCs

CSE1720 Semester 1 2005 week 4 / 16

SIMDSIMD

SIMD = Single instruction, multiple data

Mostly for multimedia

Relate to a single command which is executed on each piece of data in a set (for example, an image)

increasing/decreasing the

intensity

colour

volume of an object

or using comparator functions to determine equality/non-equality of 2 or more objects

CSE1720 Semester 1 2005 week 4 / 17

More Memory Detail More Memory Detail

• Wednesday 31st March (next week) is the HECS census date for Semester One

• It is also the last day to discontinue Semester one or full-year units without ‘WD’ showing on your Academic Record

• And it is the last day to discontinue Semester 1 or full-year units without incurring HECS or full-fees relevant to Semester 1

• It is the last day to discontinue all studies by candidates enrolled coursework programs and in single units to qualify for a full refund of the student course fee for Semester 1

• It is the last day for a 100% refund of student amenities fees relevant to Semester 1

CSE1720 Semester 1 2005 week 4 / 18

Travelling Around the ComputerTravelling Around the Computer

So, how does ‘data’ (in all of its various forms and meanings) get around the various devices ?

No problem

It takes a bus

So, what is a bus ?

It is an electronic path in a computer system which transmits bits - the binary digits which represents the atomic values of data

CSE1720 Semester 1 2005 week 4 / 19

Travelling Around the ComputerTravelling Around the Computer

There are a number of different varieties of ‘buses’

1. The Internal Bus - its function is to move data around the CPU chip

2. Data and Expansion Buses - their function is

to link the CPU and RAM

to extend the data bus and to establish links with peripherals

CSE1720 Semester 1 2005 week 4 / 20

Travelling Around the ComputerTravelling Around the Computer

3. Local buses - a special bus (or buses) which link peripherals requiring fast response times (display, disk, high speed local networks)

(GUI’s, Multimedia, scanners - all have high bit loads and require fast traffic lanes)

4. Universal Serial Bus - capability of linking many devices to a single or common port (such as the Zip drive, pluggable hard disk, CD-Rom)

CSE1720 Semester 1 2005 week 4 / 21

More on BusesMore on Buses

• PCI = Peripheral Component Interconnect (McIntosh)

• VESA = Video Electronics Standards Association

• MCA = MicroChannel Architecture (IBM PS/2)

• EISA = Extended Industry Standard Architecture

• ISA = Industry Standard Architecture

(ISA is 16 bit (binary digit). The others are 32 and 16 bit)

CSE1720 Semester 1 2005 week 4 / 22

CSE1720 Semester 1 2005 week 4 / 23

CSE1720 Semester 1 2005 week 4 / 26

Windows 2000 / XPWindows 2000 / XP

These are current microcomputer operating systems, and provide a user, like yourselves, with a graphics user interface (gui)

This interface lets you select

- an icon, which normally has a text box attached to it and which MAY initiate a program - Netscape

- a menu (and sub-menu) function or set of functions

- an application such as Word, Excel, …...

CSE1720 Semester 1 2005 week 4 / 27

Windows 2000 / XPWindows 2000 / XP

• An icon is a GUI macro - its selection causes the computer to start (or stop) a series of processes.

• These processes are supported by software, and this software is encapsulated in different types of files

Some of the common ‘active’ files are recognised by their extents:

.exe - executable .com command .bat batch

CSE1720 Semester 1 2005 week 4 / 28

Windows 2000 / XPWindows 2000 / XP

Data content file extents indicate to the ‘process’ function the way in which the data has been recorded

A Word file will have an extent of .doc

An Excel file will have an extent of .xls (or a variation)

A PowerPoint file will have an extent of .ppt

A MS Access database file will have an extent of .mdb

Other ‘data’ may be pictures or objects

Their extents can be .jpeg, .pif, .wav, gif and so on (don’t forget the html, and htm variations)

CSE1720 Semester 1 2005 week 4 / 29

Windows 2000 / XPWindows 2000 / XP

Windows 2000 and XP have a ‘Registry’

- also known as ‘Intelligence’

The Registry is the database for all system information.

The registry contents can be altered - but be very careful - and if you really have to alter the Registry, back it up first

CSE1720 Semester 1 2005 week 4 / 30

Windows 2000 / XPWindows 2000 / XP

Registry editors must be used - be very, very careful !

All of the GUI administration tools serve as ‘front-ends’ to the registry and store all their data in it.

An important and powerful feature of the Registry is the ability to read in Registry settings from datafiles. (‘Active’).

CSE1720 Semester 1 2005 week 4 / 31

Windows 2000 / XPWindows 2000 / XP

There are 4 primary ‘consumers’ or ‘customers’ of the Registry

The Windows operating System

Software installed on your computer

Hardware installed on your computer

You - the user

CSE1720 Semester 1 2005 week 4 / 32

Windows 2000 / XPWindows 2000 / XP

Windows 2000 and XP

• Have no Registry size restriction• Are hierarchically arranged• The Registry contains standardised values• User information is stored in HKEY_USERS keys• The Register can be remotely administered• System policies (e.g. upgrades) can be downloaded from a

central server each time a new user logs on

can this be correct ?

CSE1720 Semester 1 2005 week 4 / 33

Windows 2000 / XPWindows 2000 / XP

The Registry is a central repository for hardware-specific information which is used by the Plug and Play system components.

Windows 2000 and XP hold and maintain information about hardware components and devices which have been identified by processes known as ‘enumeration’ in the structure of the Registry

Adding new devices causes the system to check the existing configuration and determines what resources are available (I/O addresses,DMA channels..) so that the new device can be configured without clashing with an existing device

-- The ‘plug and play’ feature (PNP)

CSE1720 Semester 1 2005 week 4 / 34

Windows 2000 / XPWindows 2000 / XP

Virtual Device Drivers:

They are 32 bit, protected-mode drivers which manage a system resource (hardware device , software) so that more than one application can use the device at the same time

Configuration Manager :

Manages the ‘configuration’ process.

It has a number of sub-components which are directed at ‘specifics’ e.g. buses, devices

Ensures ‘no conflict’ of use of devices

CSE1720 Semester 1 2005 week 4 / 35

Windows 2000 / XPWindows 2000 / XP

Registry

Configuration Manager

Enumerator Arbitrator Device Driver

Bus Bus Bus

Device Device Device

CSE1720 Semester 1 2005 week 4 / 36

Windows 2000 / XPWindows 2000 / XP

Root

BIOS

PIC

ISA Bus Plug and CDROM

Hard DiskDisplay Controller

DMA

Parallel

NetPCMCIA Bus

Serial

Keyboard Controller

I/O

Play SCSI

DMA Direct Memory Access

SCSI Small computer system interface

Personal Computer Memory CardInternational Association

CSE1720 Semester 1 2005 week 4 / 37

Windows 2000 and XPWindows 2000 and XP

These have an Active Directory.

This is the repository for all information related to the network - (users, groups, devices ….)

The Lightweight Directory Access Protocol (LDAP) is also implemented in Novell Directory Services, Netscape Commerce Server, and the MS Exchange Server.

Active Directory Services Interfaces (ADSI) enables 3rd party vendors to integrate with the current major directory services on the market.

It’s getting larger and more powerful

CSE1720 Semester 1 2005 week 4 / 38

Windows 2000 / XPWindows 2000 / XP

Windows 2000 and XP are built around the concept of Domains

An Active Directory is structured from

Domains

Trees

Forests

Organisational Units

A ‘Domain’ contains containers and objects

A security barrier handles access to resources

‘Policies’ determine which users can do what

CSE1720 Semester 1 2005 week 4 / 39

Windows 2000 / XPWindows 2000 / XP

The Registry is organised into ‘branch’ and ‘leaf’ structure (if you have used Explorer you will have seen this dependency and subdependency)

The Branches are sections of the Registry (e.g. hardware registered on your PC)

The Leaves contain data such as the hardware interrupt assigned to a multimedia device (recognition pattern)

CSE1720 Semester 1 2005 week 4 / 40

Windows 2000 / XPWindows 2000 / XP

The Organisation Units in the Registry are

Root Keys

Subkeys

Hives

Entries

A Root Key the major organisational unit in the RegistryHKEY_CLASSES_ROOT

HKEY_CURRENT_USER

HKEY_LOCAL_MACHINE

HKEY_CURRENT_USERHKEY_USERS

CSE1720 Semester 1 2005 week 4 / 41

Windows 2000 / XPWindows 2000 / XP

An example of the Units

HKEY_LOCAL_MACHINE (Root Key)

HARDWARE (Sub Key)

DESCRIPTION

SYSTEM

CENTRAL PROCESSOR

FLOATING POINT PROCESSOR

SECURITY

SOFTWARE

Entries are contained at Root, Sub, and Hive level and contain the appropriate level details or data

TheHardware‘Hive’

CSE1720 Semester 1 2005 week 4 / 42

Windows 2000 / XPWindows 2000 / XP

And, a few words on Memory Paging

Demand paging virtual memory system is used - data (and code) are moved in pages from physical memory to a temporary file on disk.

When the information is required by a process, it is paged back into physical memory

The Memory Pager maps virtual addresses from the process address space to physical pages in memory

And a page ? - It’s a small block of logical memory and is either 2Kb or 4Kb.

CSE1720 Semester 1 2005 week 4 / 43

A Few Extra Thoughts on XPA Few Extra Thoughts on XP

It’s Physically ‘BIG’

It requires 2Gb of hard disk

It takes about 75 minutes to install

It is designed for ‘young’ high powered PC’s - less than 2 years old with a minimum of 128 Mb memory (256Mb ?)

Very stable - (no more ‘blue screens of death ?)

The taskbar and window borders are a ‘shimmering blue’

The icons are in 3D

It looks suspiciously like an Apple Mac

Lots of goodies - accommodates digital camera, MP3 music player, online chat, MSN Messenger, ..

CSE1720 Semester 1 2005 week 4 / 44

A Few Thoughts on XPA Few Thoughts on XP

Copy protected - one copy per person (not per device owned by that person)

It is suggested that XP should be installed on a new PC

This saves upgrading and the cost of an XP Home Edition upgrade kit

Can be upgraded from Windows 98, Me or 2000 - but NOT Windows95

Requires a minimum 300MHz processor (???)

CSE1720 Semester 1 2005 week 4 / 45

Windows XPWindows XP

But apart from that :

It is very robust (no stalls)

It loads quickly (much more quickly than Windows 2000) - it loads in segment mode

CSE1720 Semester 1 2005 week 4 / 46

A Competitor to Windows - LinuxA Competitor to Windows - Linux

It is an operating system for servers

It runs on all modern computer architectures

It runs on clusters and Cray machines

It is free of licence costs

It appears to be a single, unifying platform with write-once, run anywhere capabilities

It is not co-opted or owned by a single entity, corporation or government

Support a number of graphical user interfaces

Is available from several Web sites - Linux kernel, system utilities, applications and an installer

It is known as ‘Open Source’

CSE1720 Semester 1 2005 week 4 / 47

Recent Events with LinuxRecent Events with Linux

• April, 2004• Westpac and the National Australia Bank are seriously

considering Open Source• The Commonwealth Bank will stay with Microsoft• The ANZ Bank ? Still Considering the Pros and Cons• Westpac and NAB are evaluating Linux on the desk top,

and are also considering open source alternatives on their back-end operations

• Possibly ATM and Teller environments• Possibly Internet banking platforms running on Linux• Telstra, NSW Roads Authority and NSW Department of

Commerce which are also ‘interested parties’

CSE1720 Semester 1 2005 week 4 / 48

Bank Compliance Projects up to 2007Bank Compliance Projects up to 2007

• Money laundering legislation• New global accounting regulations• 2007 Basel 11 Accord deadline• Sarbanes-Oxley Act (US legislation)• Consumer concern regarding Internet Banking Security –

do you remember the incresing in phising scams in 2003/2004 ?

• Foreign exchange blowout ($A 360 million) – NAB• ‘Common’ Internet Banking System for Global Operations

CSE1720 Semester 1 2005 week 4 / 49

Moving OnMoving OnWe’ve spent some time on Windows 2000/XP Operating system facilities and components

And on some of the hardware

Hopefully you are more aware of the ‘insides’ of a PC - both hardware and software and of the interfaces used/required

There are a few more items to conclude this overview

CSE1720 Semester 1 2005 week 4 / 50

Factors Influencing ThroughputFactors Influencing Throughput

• Basic machine cycle rate • Memory size

• Instruction Cycle time

• Input/Output device transfer speeds

• Channel transfer rates

• Chip stack size

• Number of processors

• Registers : Number, size, speeds

CSE1720 Semester 1 2005 week 4 / 51

RegistersRegisters

These are special purpose (temporary) storage devices which are included in a computer to speed up processes

Uses of Registers

general purpose or scratch pad registers

segment registers (code, data, stack, extra)

offset registers - Instruction register

- Stack

- Base address

- Memory address

Flag register

CSE1720 Semester 1 2005 week 4 / 52

CPU and I/O DevicesCPU and I/O Devices

ALU

Control UnitInput Devices Output

Devices

Primary Storage Unit

CPU

CSE1720 Semester 1 2005 week 4 / 53

Instruction ExecutionInstruction Execution

Phase 1. INSTRUCTION CYCLE

1. Instruction fetched from PRIMARY STORAGE

Loaded into STORAGE REGISTER

2. OPERATION CODE ------> INSTRUCTION REGISTER

3. OPERANDS ------> ADDRESS REGISTERS

4. Next Instruction Set up

Setup and Execution

CSE1720 Semester 1 2005 week 4 / 54

Instruction ExecutionInstruction Execution

Phase 2 EXECUTION CYCLE

The actual steps are controlled by the nature of the instruction e.g. COPY, DIR, GOTO, CALC

These units would be used: • Storage Address Registers

• Arithmetic Accumulator Register

• ALU Adders

End of Process signal sent to Operating System

CSE1720 Semester 1 2005 week 4 / 55

CSE1720 Semester 1 2005 week 4 / 56

How to settle errorsHow to settle errors

Just joking - of course !

CSE1720 Semester 1 2005 week 4 / 57

Some things to do duringthe (short) break !!

Recommended