Lecture 4

Document Sample
Lecture 4 Powered By Docstoc
					   Lecture No. 4
Memory and its Management
  Operating Systems
    2000 and XP




                       CSE1720 Summer 2005 Lect 04 / 1
                   This Lecture
Yesterday we started to look at some of the ‘internals’ of
PC (mainly) hardware and software - mostly at Operating
System and Hardware CPU level

Today, we are going to have a slightly deeper look




                                         CSE1720 Summer 2005 Lect 04 / 2
           Memory/Memory Management
Personal Computer Memory:
 - at DOS system prompt, key in mem/c
                     **************************
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
                                                  CSE1720 Summer 2005 Lect 04 / 3
          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)




                                       CSE1720 Summer 2005 Lect 04 / 4
       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 frame
Slower than using extended memory.



                                     CSE1720 Summer 2005 Lect 04 / 5
          Memory/Memory Management
 3Mb                        16,32,64,128 ... ? Mb



       Extended Memory
           (XMS)
           (2Mb)
                                 Expanded Memory

            HMA                      (EMS)
  1Mb Upper Memory Area              (1Mb)
          (384Kb)
640Kb Conventional Memory
          (640Kb)

                                      CSE1720 Summer 2005 Lect 04 / 6
                   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, ….)


                                                CSE1720 Summer 2005 Lect 04 / 7
                 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 Summer 2005 Lect 04 / 8
                        Cache 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




                                                CSE1720 Summer 2005 Lect 04 / 9
                    Cache Memory
The pattern of search is
 - 1. internal cache
 - 2. external cache
 - 3. main memory

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




                                      CSE1720 Summer 2005 Lect 04 / 10
                   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)




                                       CSE1720 Summer 2005 Lect 04 / 11
                   Memory Chips



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

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




                                         CSE1720 Summer 2005 Lect 04 / 12
                      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




                                          CSE1720 Summer 2005 Lect 04 / 13
              More Chip Types
DRAM         - dynamic RAM
FPM RAM      - Fast page-mode RAM
EDO RAM      - Extended Data Out RAM
BEDO RAM     - Burst Extended-data-out RAM
SDRAM        - Synchronous dynamic RAM
SRAM         - Static Random Access Memory
Async SRAM   - Asynchronous SRAM
Sync SRAM    - Synchronous (with the system clock)
PB SRAM      - PipeLine Burst SRAM
VRAM         - Video Ram
WRAM         - Windows RAM
SGRAM        - Synchronous RAM
DDR DRAM     - Double Density Read RAM
                                      CSE1720 Summer 2005 Lect 04 / 14
                       More Chips
• DDRSDRAM - Double Data Rate-Synchronous DRAM
  supports data transfers on the rising and falling edges of
  each clock cycle
• 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 Summer 2005 Lect 04 / 15
                         SIMD

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 Summer 2005 Lect 04 / 16
         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

                                            CSE1720 Summer 2005 Lect 04 / 17
           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 RAM
   to extend the data bus and to establish links with
   peripherals




                                              CSE1720 Summer 2005 Lect 04 / 18
           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)




                                             CSE1720 Summer 2005 Lect 04 / 19
                      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)


                                                CSE1720 Summer 2005 Lect 04 / 20
CSE1720 Summer 2005 Lect 04 / 21
CSE1720 Summer 2005 Lect 04 / 22
                     Windows NT / 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 Summer 2005 Lect 04 / 25
                    Windows NT / 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 Summer 2005 Lect 04 / 26
                     Windows NT / 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 Summer 2005 Lect 04 / 27
                    Windows NT / 2000 / XP

Windows NT, 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 Summer 2005 Lect 04 / 28
                   Windows NT / 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 Summer 2005 Lect 04 / 29
               Windows NT / 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 Summer 2005 Lect 04 / 30
                    Windows NT / 2000 / XP

Windows NT / 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




                                            CSE1720 Summer 2005 Lect 04 / 31
                  Windows NT / 2000 / XP
The Registry is a central repository for hardware-specific
information which is used by the Plug and Play system
components.

Windows NT/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 Summer 2005 Lect 04 / 32
                   Windows NT / 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 Summer 2005 Lect 04 / 33
             Windows NT / 2000 / XP


                Registry
             Configuration
              Manager

Enumerator        Arbitrator     Device
                                  Driver

 Bus                 Bus               Bus

 Device             Device            Device




                                  CSE1720 Summer 2005 Lect 04 / 34
                    Windows NT / 2000 / XP


       Root         PIC
                    ISA Bus      Plug and             CDROM
       BIOS         Display      Play SCSI
                    Controller                         Hard Disk

                    DMA
                    Parallel

Personal Computer
                    PCMCIA
Memory Card                      Net
                    Bus
International
Association           Serial
                                       DMA Direct Memory Access
                    Keyboard           SCSI Small computer system
                    Controller         interface
                    I/O

                                                 CSE1720 Summer 2005 Lect 04 / 35
                   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
                                              CSE1720 Summer 2005 Lect 04 / 36
                  Windows 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 Summer 2005 Lect 04 / 37
                  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)




                                          CSE1720 Summer 2005 Lect 04 / 38
                 Windows 2000 / XP

The Organisation Units in the Registry are
 Root Keys
 Subkeys
 Hives
 Entries

A Root Key the major organisational unit in the Registry
  HKEY_CLASSES_ROOT
  HKEY_CURRENT_USER
  HKEY_LOCAL_MACHINE
  HKEY_CURRENT_USER
  HKEY_USERS


                                        CSE1720 Summer 2005 Lect 04 / 39
                       Windows 2000 / XP

An example of the Units

  HKEY_LOCAL_MACHINE (Root Key)
    HARDWARE (Sub Key)
         DESCRIPTION                                               The
              SYSTEM                                               Hardware
                   CENTRAL PROCESSOR                               ‘Hive’
                   FLOATING POINT PROCESSOR
    SECURITY
    SOFTWARE

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


                                                  CSE1720 Summer 2005 Lect 04 / 40
                    Windows NT / 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 Summer 2005 Lect 04 / 41
         A 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 Summer 2005 Lect 04 / 42
             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 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 Summer 2005 Lect 04 / 43
                        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 - provided there is at
     least 256Mb memory.




                                           CSE1720 Summer 2005 Lect 04 / 44
        A 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 Summer 2005 Lect 04 / 45
             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 are also ‘interested parties’

                                           CSE1720 Summer 2005 Lect 04 / 46
     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 increase in scams in 2003/2004 ?
• E.g. customers being ‘asked’ to supply and confirm their
  account numbers and passwords ?
• Foreign exchange blowout ($A 360 million) – NAB
• ‘Common’ Internet Banking System for Global Operations



                                          CSE1720 Summer 2005 Lect 04 / 47
                       Moving On
We’ve spent some time on Windows NT/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 Summer 2005 Lect 04 / 48
         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
                                        CSE1720 Summer 2005 Lect 04 / 49
                         Registers
 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 Summer 2005 Lect 04 / 50
                CPU and I/O Devices


                         ALU




                        Control                  Output
Input Devices
                        Unit                     Devices




                   Primary Storage Unit

                         CPU



                                          CSE1720 Summer 2005 Lect 04 / 51
              Instruction Execution
               Setup and 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



                                      CSE1720 Summer 2005 Lect 04 / 52
             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
                                        CSE1720 Summer 2005 Lect 04 / 53
                           Ethics




and we’ll finish of this lecture with a few thoughts about


                            ethics

And there are some ‘case examples’ of ethics on the Web
  page




                                             CSE1720 Summer 2005 Lect 04 / 54
                          Ethics
• Ethics, noun
          – pertaining to right or wrong in conduct
• Ethical, adj
          – in accordance with the rules or standards for
             right conduct or practice, especially the
             standards of a profession
          – the rules of conduct recognised in a particular
             class of human actions




                                            CSE1720 Summer 2005 Lect 04 / 55
                     Ethics



The overriding principles are
   • fairness
   • integrity
   • openness
   • responsibility
   • commitment to accuracy and truth




                                        CSE1720 Summer 2005 Lect 04 / 56
                       Ethics
Members of a profession should act always for the
 maintenance for the community, rather than for
 sectional interests

This includes the exposure of hypocrisy, falsehoods or
  double standards

Members should seek to present fair, balanced and
 accurate material

Confidentiality must be protected at all costs


                                         CSE1720 Summer 2005 Lect 04 / 57
                      Ethics
Fair and honest means should be used to obtain material,
  including information. Misrepresentations and the user
  of concealed equipment or surveillance devices should
  be avoided

Members of an organisation should have equal
 opportunity to develop their skills

The employer organisation is obliged to provide a healthy
  and safe working environment




                                       CSE1720 Summer 2005 Lect 04 / 58
                       Ethics
Activities outside workhours may be seen to have an
  impact on the individual’s or the employer organisation

No person should be harassed or discriminated against
 on grounds of gender, colour, race, nationality, religious
 belief, impairment, age, height, weight, marital status,
 appearance or sexual preference

Managers or others with access to personal information
 relating to other members are required to treat such
 information as confidential, and not to disclose such
 information except in the course of discharging formal
 responsibilities
                                        CSE1720 Summer 2005 Lect 04 / 59
                          Ethics
• Members should not use their position to obtain private
  benefit for themselves or others

• Members should not be influenced by family or other
  personal relationships

• Members should be alert to conflict of interests which may
  arise and declare to a senior person or officer any real or
  perceived conflict of interest which arises or is foreseen




                                           CSE1720 Summer 2005 Lect 04 / 60
                          Ethics
• Members engaged in the development of software or
  hardware or communications or other Information
  Technology facility and who believe they have a interest
  on such development, maintenance, or installation should
  acknowledge such interest

• Members in doubt as to whether a conflict of interest exists
  should consult a senior officer

• No payment, gift or other advantage which may be seen to
  undermine accuracy, fairness or independence is to be
  accepted.


                                            CSE1720 Summer 2005 Lect 04 / 61
                          Ethics
• Other people’s material is not to be reproduced without
  reference and acknowledgement

• The source of material obtained form another organisation
  should be acknowledged




                                           CSE1720 Summer 2005 Lect 04 / 62
                          Ethics
  The Australian Computer Society has this to say :



• An essential characteristic of a profession is the need for
  its members to abide by a Code of Ethics. The Society
  requires its members to subscribe to a set of values and
  ideals which uphold and advance the honour, dignity and
  effectiveness of the profession of information technology




                                            CSE1720 Summer 2005 Lect 04 / 63
                         Ethics
• In keeping with this statement, a member must
   be honest, forthright and impartial
   serve the community
   strive to increase the competency and prestige of the
     profession
   use special knowledge and skill for the advancement of
     human welfare




                                          CSE1720 Summer 2005 Lect 04 / 64
                     Ethics - ACS
• Competence (part only of the Standards of Conduct)
   A member must endeavour to provide products and
     services which match the operational and financial
     needs of my clients and employers
   A member must give value for money in the services and
     products I supply
   A member must respect and protect the clients’ and
     employers’ proprietary interests




                                         CSE1720 Summer 2005 Lect 04 / 65
                      Ethics - ACS
• Social Implications
   A member must protect and promote the health and
     safety of those affected by her/his work
   A member must consider and respect people’s privacy
     which might be affected by a member’s work
   A member must respect employees and refrain from
     treating them unfairly

   The full statement of the code of ethics is available at
    www.acs.org.au/national/pospaper/acs131.htm




                                             CSE1720 Summer 2005 Lect 04 / 66
                      Ethics
Acknowledgements to

      – The Age Code of Conduct

      – The Australian Computer Society




                                     CSE1720 Summer 2005 Lect 04 / 67
CSE1720 Summer 2005 Lect 04 / 68
                 How to settle errors




Just joking - of course !




                                    CSE1720 Summer 2005 Lect 04 / 69

				
DOCUMENT INFO
Shared By:
Categories:
Tags:
Stats:
views:2
posted:9/8/2011
language:English
pages:67