Lecture No. 4

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

description

Lecture No. 4. Memory and its Management Operating Systems 2000 and XP. This 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 - PowerPoint PPT Presentation

Transcript of Lecture No. 4

Page 1: Lecture No. 4

CSE1720 Semester 1 2005 week 4 / 1

Lecture No. 4Memory and its Management Operating Systems 2000 and XP

Page 2: Lecture No. 4

CSE1720 Semester 1 2005 week 4 / 2

This 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

Page 3: Lecture No. 4

CSE1720 Semester 1 2005 week 4 / 3

Memory/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

Page 4: Lecture No. 4

CSE1720 Semester 1 2005 week 4 / 4

Memory/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)

Page 5: Lecture No. 4

CSE1720 Semester 1 2005 week 4 / 5

Memory/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 frameSlower than using extended memory.

Page 6: Lecture No. 4

CSE1720 Semester 1 2005 week 4 / 6

Memory/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

Page 7: Lecture No. 4

CSE1720 Semester 1 2005 week 4 / 7

Other 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, ….)

Page 8: Lecture No. 4

CSE1720 Semester 1 2005 week 4 / 8

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.

Page 9: Lecture No. 4

CSE1720 Semester 1 2005 week 4 / 9

Cache MemoryIf 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

Page 10: Lecture No. 4

CSE1720 Semester 1 2005 week 4 / 10

Cache Memory

The pattern of search is - 1. internal cache - 2. external cache - 3. main memory

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

Page 11: Lecture No. 4

CSE1720 Semester 1 2005 week 4 / 11

Memory Chips

2 Basic Types

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

SRAM (static RAM - refresh not necessary)

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

Page 12: Lecture No. 4

CSE1720 Semester 1 2005 week 4 / 12

Memory Chips

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

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

Page 13: Lecture No. 4

CSE1720 Semester 1 2005 week 4 / 13

Memory 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

Page 14: Lecture No. 4

CSE1720 Semester 1 2005 week 4 / 14

More Chip TypesDRAM - 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

Page 15: Lecture No. 4

CSE1720 Semester 1 2005 week 4 / 15

More 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

Page 16: Lecture No. 4

CSE1720 Semester 1 2005 week 4 / 16

SIMD

SIMD = Single instruction, multiple dataMostly 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

colourvolume of an object

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

Page 17: Lecture No. 4

CSE1720 Semester 1 2005 week 4 / 17

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

Page 18: Lecture No. 4

CSE1720 Semester 1 2005 week 4 / 18

Travelling 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

Page 19: Lecture No. 4

CSE1720 Semester 1 2005 week 4 / 19

Travelling 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 RAMto extend the data bus and to establish links with peripherals

Page 20: Lecture No. 4

CSE1720 Semester 1 2005 week 4 / 20

Travelling 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)

Page 21: Lecture No. 4

CSE1720 Semester 1 2005 week 4 / 21

More 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)

Page 22: Lecture No. 4

CSE1720 Semester 1 2005 week 4 / 22

Page 23: Lecture No. 4

CSE1720 Semester 1 2005 week 4 / 23

Page 24: Lecture No. 4

CSE1720 Semester 1 2005 week 4 / 26

Windows 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, …...

Page 25: Lecture No. 4

CSE1720 Semester 1 2005 week 4 / 27

Windows 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

Page 26: Lecture No. 4

CSE1720 Semester 1 2005 week 4 / 28

Windows 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 .docAn Excel file will have an extent of .xls (or a variation)A PowerPoint file will have an extent of .pptA MS Access database file will have an extent of .mdb

Other ‘data’ may be pictures or objectsTheir extents can be .jpeg, .pif, .wav, gif and so on (don’t

forget the html, and htm variations)

Page 27: Lecture No. 4

CSE1720 Semester 1 2005 week 4 / 29

Windows 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

Page 28: Lecture No. 4

CSE1720 Semester 1 2005 week 4 / 30

Windows 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’).

Page 29: Lecture No. 4

CSE1720 Semester 1 2005 week 4 / 31

Windows 2000 / XP

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

The Windows operating SystemSoftware installed on your computerHardware installed on your computerYou - the user

Page 30: Lecture No. 4

CSE1720 Semester 1 2005 week 4 / 32

Windows 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 ?

Page 31: Lecture No. 4

CSE1720 Semester 1 2005 week 4 / 33

Windows 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)

Page 32: Lecture No. 4

CSE1720 Semester 1 2005 week 4 / 34

Windows 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, devicesEnsures ‘no conflict’ of use of devices

Page 33: Lecture No. 4

CSE1720 Semester 1 2005 week 4 / 35

Windows 2000 / XP

Registry

Configuration Manager

Enumerator Arbitrator Device Driver

Bus Bus Bus

Device Device Device

Page 34: Lecture No. 4

CSE1720 Semester 1 2005 week 4 / 36

Windows 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

Page 35: Lecture No. 4

CSE1720 Semester 1 2005 week 4 / 37

Windows 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

Page 36: Lecture No. 4

CSE1720 Semester 1 2005 week 4 / 38

Windows 2000 / XP

Windows 2000 and XP are built around the concept of Domains

An Active Directory is structured fromDomainsTreesForestsOrganisational Units

A ‘Domain’ contains containers and objectsA security barrier handles access to resources‘Policies’ determine which users can do what

Page 37: Lecture No. 4

CSE1720 Semester 1 2005 week 4 / 39

Windows 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)

Page 38: Lecture No. 4

CSE1720 Semester 1 2005 week 4 / 40

Windows 2000 / XP

The Organisation Units in the Registry areRoot KeysSubkeysHivesEntries

A Root Key the major organisational unit in the RegistryHKEY_CLASSES_ROOTHKEY_CURRENT_USERHKEY_LOCAL_MACHINEHKEY_CURRENT_USERHKEY_USERS

Page 39: Lecture No. 4

CSE1720 Semester 1 2005 week 4 / 41

Windows 2000 / XP

An example of the Units

HKEY_LOCAL_MACHINE (Root Key)HARDWARE (Sub Key)

DESCRIPTIONSYSTEM

CENTRAL PROCESSORFLOATING POINT PROCESSOR

SECURITYSOFTWARE

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

TheHardware‘Hive’

Page 40: Lecture No. 4

CSE1720 Semester 1 2005 week 4 / 42

Windows 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 memoryAnd a page ? - It’s a small block of logical memory and is either 2Kb or 4Kb.

Page 41: Lecture No. 4

CSE1720 Semester 1 2005 week 4 / 43

A Few Extra Thoughts on XP

It’s Physically ‘BIG’It requires 2Gb of hard diskIt takes about 75 minutes to installIt 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 3DIt looks suspiciously like an Apple MacLots of goodies - accommodates digital camera, MP3 music player, online chat, MSN Messenger, ..

Page 42: Lecture No. 4

CSE1720 Semester 1 2005 week 4 / 44

A 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 PCThis 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 (???)

Page 43: Lecture No. 4

CSE1720 Semester 1 2005 week 4 / 45

Windows 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

Page 44: Lecture No. 4

CSE1720 Semester 1 2005 week 4 / 46

A Competitor to Windows - Linux

It is an operating system for serversIt runs on all modern computer architecturesIt runs on clusters and Cray machinesIt is free of licence costsIt appears to be a single, unifying platform with write-once,

run anywhere capabilitiesIt is not co-opted or owned by a single entity, corporation or

governmentSupport a number of graphical user interfacesIs available from several Web sites - Linux kernel, system

utilities, applications and an installerIt is known as ‘Open Source’

Page 45: Lecture No. 4

CSE1720 Semester 1 2005 week 4 / 47

Recent 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’

Page 46: Lecture No. 4

CSE1720 Semester 1 2005 week 4 / 48

Bank 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

Page 47: Lecture No. 4

CSE1720 Semester 1 2005 week 4 / 49

Moving 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

Page 48: Lecture No. 4

CSE1720 Semester 1 2005 week 4 / 50

Factors 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

Page 49: Lecture No. 4

CSE1720 Semester 1 2005 week 4 / 51

Registers

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

Uses of Registersgeneral purpose or scratch pad registerssegment registers (code, data, stack, extra)offset registers - Instruction register

- Stack - Base address - Memory address

Flag register

Page 50: Lecture No. 4

CSE1720 Semester 1 2005 week 4 / 52

CPU and I/O Devices

ALU

Control UnitInput Devices Output

Devices

Primary Storage Unit

CPU

Page 51: Lecture No. 4

CSE1720 Semester 1 2005 week 4 / 53

Instruction 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

Page 52: Lecture No. 4

CSE1720 Semester 1 2005 week 4 / 54

Instruction 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

Page 53: Lecture No. 4

CSE1720 Semester 1 2005 week 4 / 55

Page 54: Lecture No. 4

CSE1720 Semester 1 2005 week 4 / 56

How to settle errors

Just joking - of course !

Page 55: Lecture No. 4

CSE1720 Semester 1 2005 week 4 / 57

Some things to do duringthe (short) break !!