Lecture 03 - Pravin Shetty > Resume

Download Report

Transcript Lecture 03 - Pravin Shetty > Resume

Lecture No. 3
Software Systems, Memory Management
Throughput, Instruction Execution
CSE1720 Summer 2005 Lecture 03 /1
Objectives
• To look at Software
- Operating systems
- Applications Systems
• Microcomputer Operating Systems
• Commands and Command Structures
• Main Memory Considerations including Management
• Throughput Aspects
• Instruction Execution
And, some more on Excel
CSE1720 Summer 2005 Lecture 03 /2
Computer Software
Systems
SYSTEM
SOFTWARE
Software
Applications
APPLICATION
SOFTWARE
Software
Database
Management
Communications
Control
Operating
Systems
*
Business
Applications
Scientific
Applications
Other
Applications
Software
Packages
CSE1720 Summer 2005 Lecture 03 /3
Functions of an Operating System

An operating system is
software that controls the
computer by:



managing resources
providing services for
programmers
scheduling execution
End
User
Application
Programs
Utilities
Operating System
Computer Hardware
CSE1720 Summer 2005 Lecture 03 /4
Operating Systems
• Are a collection of systems programs
• Designed to co-ordinate and control the overall operation
of computer hardware and software
• An Interface between the Hardware and the Application
• Designed to manage RESOURCES: - C.P.U
- Input Devices
- Output Devices
- Storage Devices
(including Memory)
CSE1720 Summer 2005 Lecture 03 /5
Operating Systems
• Designed to communicate with the USER when necessary
- error in job
- no input device available
- no output device available
- insufficient storage/memory
- end of job
• Designed to boot the computer system
- start the computer operation
• Provides a means of Security
CSE1720 Summer 2005 Lecture 03 /6
Operating Systems
Control Programs
Processing
Programs
Job
Management
Language
Translators
Resource
Management
Service
Programs
Data
Management
Other
Processing
Programs
CSE1720 Summer 2005 Lecture 03 /7
Operating Systems -Additional Features
Overlapped Processing
Dynamic processing
Multiprogramming
Virtual memory
Virtual Machines
MODERN OPERATING SYSTEMS
INTERACTIVE BACKGROUND REMOTE COMMUNICATION
TASKS
TASKS
TASKS
TASKS
Conversational Scheduled
Remote Inquiry/Response
Computing
Jobs
Job
Entry
Interactive
Non-Scheduled
Timesharing
Programming
Jobs
CSE1720 Summer 2005 Lecture 03 /8
System Software Capabilities
• Multitasking : an operating system which handles more
than one program at a time
• Multiprocessing : an operating system which handles two
or more CPUs to process simultaneously
• Timesharing : an operating system which supports a
front-end processor to schedule and
control users’ processing requests
• Virtual Memory : an operating system element which
enables a computer to process as if it had
an unlimited supply of internal memory
CSE1720 Summer 2005 Lecture 03 /9
Microcomputer Operating System
Normally - A single user ( May be multiples on larger
units e.g. PS/2 with OS/2)
- System driven by user
- Functions Interactive
- User Controls
* File Usage
* Backup and Recovery
* Process functions
- User applies (develops) usage ‘standards’
- Assisted by the Operating System
CSE1720 Summer 2005 Lecture 03 /10
Microcomputer Operating System
Some Terms to Note
:
DIRECTORY - An Allocation of Disk Space
for user requirements
FAT
TOC
- File Allocation Table - An index
of disk contents with track and
sector addresses
- Table of Contents - Table of
disk contents
NOTE: Physical Handling of Diskettes
Storage of Diskettes
-
Formatting
CSE1720 Summer 2005 Lecture 03 /11
Systems Software Components
• Internal Command Instructions
• External Command Instructions
• Language Processors
Cobol, C, C++, Delphi, Oracle
Developer, Oracle Designer,
Java, JavaB , Powerbuilder,
Is SAP a ‘language’ ?
CSE1720 Summer 2005 Lecture 03 /12
Internal Command Instructions
Normally are resident in memory after Operating System
loads
• View a list of the files on your disk storage device
(Win NT / 2000 / XP Explorer)
• Copy files from one disk device to another
• Erase files
CSE1720 Summer 2005 Lecture 03 /13
External Commands
Are retrieved from secondary storage (disk) then executed
• Format disk
• Rename files
• Set the current date format (mm-dd-yy, dd-mon-yy
• Set the current time (12 hour, 24 hour, time zone)
• Print
CSE1720 Summer 2005 Lecture 03 /14
Command Structure
A ‘command’ sets up a process or a series of processes
A command must have
- a command code (dir, erase, copy, paste …..)
- one argument (for some commands - qualifies the
command e.g. Dir a: dir c:\studies\assignment1.doc
- a second argument (where necessary)
e.g. copy xxxxx to a:\yyyyy
add zzzzz to mmmm
CSE1720 Summer 2005 Lecture 03 /15
Microcomputer Operating Systems
• Apple DOS
• OS/2 and OS/2 Warp
MS-DOS (v6.22)
• SunOS
• HP-UX
• Unix, Ultrix, Linux
• Microsoft Windows95 Windows NT
Windows98 Windows2000 WindowsXP ? Windows2003 ?
Operating systems for Larger Installations
• VMS, MVS, OS390, OSF/2, VX24, ............
CSE1720 Summer 2005 Lecture 03 /16
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
CSE1720 Summer 2005 Lecture 03 /17
Selection of Systems Software
• Availability of compatible applications software and/or
systems
• The ease of use by users and programmers ( = help)
• Speed of operation
• Capability to support multitasking and multiuser needs
• Type and availability of compatible hardware
• Availability of trained and available technical staff
• Company size and market penetration
• Other users’ comments
CSE1720 Summer 2005 Lecture 03 /18
Applications Software
• General Business Management
• Industry Specific
• Specific Disciplines
• Education
• Personal/Home Management
• General Purpose software for the user
CSE1720 Summer 2005 Lecture 03 /19
Software Packages
Word Processing
Spreadsheets
Graphics and Multi Media
Database Management Systems
Integrated Software SAP, Oracle Financials
Application Enterprise Integration (probably with PCs
as clients)
CSE1720 Summer 2005 Lecture 03 /20
Internal Mechanisms
• None of this just ‘happens’
• Computers rely on a number of agents, devices,
processes, interpreters, flows and controls to operate
effectively, accurately and consistently
• So, let’s look at some of these aspects ---
CSE1720 Summer 2005 Lecture 03 /21
Some Thoughts on Chips
Computers rely on chips and chip technology for their
processing capabilities
storage capabilities
We will briefly look at some of their characteristics, function
and types in the following overheads
CSE1720 Summer 2005 Lecture 03 /22
Chips and Microprocessors
Every microprocessor’s system unit has a specific
microprocessor chip (as per the 1st lecture - Intel,
Motorola, Cyrix, AMD)
This microprocessor chip is embedded in a carrier package
The carrier is mounted on a system board - ‘motherboard’
Software is optimised to work on a specific chip (or family)
Software developed for a Pentium ll chip probably won’t work
on an 80386 or 80486 chip
What about Pentium 4 on a Pentium l or 2 CSE1720
?
Summer 2005 Lecture 03 /23
Chips
Word size:
A word is a group of bits (binary digits) - also called bytes which can be manipulated as a unit by a processor
The Pentium Pro has an internal bus designed for 64 bit
words (data moves in the chip in 64-bit blocks)
The Pentium Pro data bus also handles 64 bit words.
This means that the data path from the CPU to memory is 64bits wide - the benefit is faster processing
CSE1720 Summer 2005 Lecture 03 /24
Chips
• Most PC’s have specialised processor chips
• Numeric processors
• Graphic coprocessors
• Normally known as slave chips
– Their function is to free the CPU from some processing
tasks.
– The overall effect is improved system performance
CSE1720 Summer 2005 Lecture 03 /25
Chips
Now let’s look at the ‘data’ storage components
The normal term for this is ‘Main Memory’ - which infers
that there is a lower level of memory as well
The ‘memory’ chips - RAM (Random Access Memory) are
circuits etched onto silicon backed chips.
These also are mounted in carriers and are arranged onto
boards called single in-line memory modules - SIMMs
These units also plug into the system (mother) board
CSE1720 Summer 2005 Lecture 03 /26
Main Memory and Its Uses
• To store the main software which controls the general
operation of the computer system
• To store a copy of application program instructions
• To store data which has been input from an input device
• To store data which has been produced as a result of
processing
CSE1720 Summer 2005 Lecture 03 /27
Main Memory and Its Use
ROM
RAM
ROM
RAM
No memory contents
Operating System
Loaded
DOS/WINDOWS
ROM
RAM
Excel V5
DOS/WINDOWS
Operating System
and Application
Software Loaded
CSE1720 Summer 2005 Lecture 03 /28
Main Memory (Primary Storage)
Diagrammatic Representation
RAM
DRAM
SCRAM
FRAM
INPUT AREA
OUTPUT AREA
OPERATING SYSTEM
SPECIAL SOFTWARE
ROM
PROM
EROM
EPROM
Database Management System
Communications Software (Telnet,Netware)
(not to scale)
APPLICATIONS PROGRAM(S)
Spare / Work Area
Interrupt Storage Area (Stacks)
CSE1720 Summer 2005 Lecture 03 /29
Operating System Layout Hewlett Packhard PC
Operating system
RAM Images
Operating System Dynamic RAM Pool
User Access RAM Pool
Process 1
Process 2
(physical)
Internal RAM
15M
External RAM
8M
Process ....n
Memory Management Unit:
Disk
Keyboard
Graphics Processing
Beeper
Clock
Memory Control Registers
Plug In I/O Cards
Basic ROM
ROM DISK
Operating System ROM
16M
I/O
1M
ROM
CSE1720 Summer 2005 Lecture 03 /30
Tomorrow …...
We are going to continue with aspects of
Memory management
Memory storage
Cache
Chips
Buses
Windows NT, 2000 and XP
But now, we’re off for a bit more of Excel.
CSE1720 Summer 2005 Lecture 03 /31
Spreadsheet Solution
Some Hints
What is the problem ? What am I trying to solve ? Why ?
• What formulae are appropriate - necessary ?
• What is the data input - is it fixed ? Is it likely to vary ?
• Where is it ? In a file ? Via the keyboard, In a Range ?
• What is its definition ? - Text, label, date, formatted,
edited ?
CSE1720 Summer 2005 Lecture 03 /32
Spreadsheet Solution
Some Hints
• Is there an opportunity/need for cascade calculations ?
• How are the embedded formulae addresses to be used
• What is the degree of accuracy required e.g. 1 Decimal.
Place
• Do I know how to use the built in HELP ? And does it give
me sufficient to assist me solve my requirement ?
CSE1720 Summer 2005 Lecture 03 /33
Spreadsheet Solution
Some Hints
• Graphs /Charts: Is there an opportunity to display input
or output in graphical form ?
• Which Chart best represents the objective of the
spreadsheet
• What name should the Chart have ? What Axes names
are appropriate ? What scale ? Will 3 D and colour
enhance the presentation
CSE1720 Summer 2005 Lecture 03 /34
Spreadsheet Solution
Some Hints
• Should the chart be embedded in the spreadsheet or in a
separate sheet ? Why ? How should it be protected ?
• Are there some repetitive activities which can be made
automatic, or require less key strokes - or made user proof
? Is it worth while to create a Macro ?
CSE1720 Summer 2005 Lecture 03 /35
Spreadsheet Solution
Some Hints
• How should the spreadsheet best be stored ?
In the current Directory / Drive ?
• Should a copy be made ? If so, how will the copy be kept
up to date ( e.g. include in a Macro)
• Should more than 1 copy be made ? Where should it/they
be held for recovery and security reasons ?
CSE1720 Summer 2005 Lecture 03 /36
Spreadsheet Solution
Some Hints
• Who should be able to use the spreadsheet ?
• Who should be able to alter data / formulae ?
• How can access to the spreadsheet be made secure ?
• Who will be Managing the security aspects ? (and a
Deputy ?)
CSE1720 Summer 2005 Lecture 03 /37
Developing / Using Spreadsheets
•
•
•
•
•
•
•
•
•
•
•
Decide on the approach to the problem
Define Formulae
Define Cell Contents
Enter Data - CORRECTLY !! - labels, text, numeric ...
Manipulate data
Develop Output / Results
Produce Output
***************** ****************
Analyse Results
Refine, Re-Enter (Recursive)
Re-specify as necessary
Re-Evaluate
CSE1720 Summer 2005 Lecture 03 /38
Some Aspects of Using Spreadsheets
CSE1720 Summer 2005 Lecture 03 /39
Some Aspects of Using Spreadsheets
Some Commonly Occurring WEAKNESSES !
• Logic Mistakes
• Incorrect Ranges in Formulae References
• Incorrect Cell References
• Incorrect use of FORMATS and COLUMN WIDTHS
• Misuse of Built - In Functions
• Overwriting of Formulae
• Lack of Data Protection
• Undetected Access
• Data Integrity
• Input Errors - Error Detection
CSE1720 Summer 2005 Lecture 03 /40
Some Aspects of Using Spreadsheets
•
•
•
•
SPREADSHEET DESIGN
Requires some experience with a computing device
Requires an understanding of programming techniques
and disciplines
Requires testing - Strategy, Results Analysis
Documentation
OBJECTIVES OF DESIGN:
RELIABILITY
AUDIT CAPABILITY
CONTROL
CSE1720 Summer 2005 Lecture 03 /41
Spreadsheet Design Objectives
• All OUTPUTS GENERATED ARE
Correct
Consistent
• Results are RELIABLE
• There is an AUDIT Capability
meaning that the user
should be able to retrace the steps followed to generate
different outputs from the model - and be able to verify
results (see Precedents in Excel)
• The spreadsheet can be Modified without the
introduction of errors
• The spreadsheet is meaningful and understandable to
both the Designer and the User
CSE1720 Summer 2005 Lecture 03 /42
Typical Spreadsheet Applications
• Decision Support for ? ? ?
• Personal Productivity
• Mainstream Information Systems
Financial Statements
Budget Planning
Budget Control
Taxation
CSE1720 Summer 2005 Lecture 03 /43
SPREADSHEET DEVELOPMENT LIFE CYCLE
• 1 Problem Definition - Analysis
• 2 Define: Model
Outcome
Decision Variables
Calculations
Menus
Macros
• 3 Construct the model
CSE1720 Summer 2005 Lecture 03 /44
SPREADSHEET DEVELOPMENT LIFE CYCLE
• 4 Test
• 5 Document
• 6 Audit
• 7 Prepare User Manual
• 8 Train Users
• 9 Install
CSE1720 Summer 2005 Lecture 03 /45
Identify
Problem
Define Model
Outcome/
Decision Variables
Construct
Model
Test
Spreadsheet
Document
Audit Model and
Structure
Prepare User
Manual
Install
Train
CSE1720 Summer 2005 Lecture 03 /46
Model Format
AIMS
• 1 To identify the spreadsheet and its purpose
• 2 To clarify assumptions for users
• 3 To separate parts of a spreadsheet to reduce potential
for errors
• 4 To allow for progressive development
CSE1720 Summer 2005 Lecture 03 /47
Model Format
• Macros and Menus are ISOLATED from parameters and
Formulae to avoid interference from Delete/Insert of Rows
and/or Columns
• Map of Model This gives a description of the positioning
of the Blocks of the Spreadsheet -candidates are range
names, cell addresses,
•
Acts as a Table of Contents
• Parameter Block This contains variables used in the
spreadsheet formulae (e.g. Sales Prices, Cost Prices,
Hourly Rates, Maximum and Minimum, ..........
CSE1720 Summer 2005 Lecture 03 /48
Model Profile
* Identification
* Owner
* Developer
* User
* Date Revised
* File names (Spreadsheet, Backup,
Macros
Menus
Map of Model - Table of Contents
Parameters and Assumptions e.g. percentages are
dependent on the cpi.
Model - Formulae
Input Vectors
Output Vectors
Decision Variables
Parameter Vectors
CSE1720 Summer 2005 Lecture 03 /49
Monash Agri-Business
A
1
2
3
Nutrient
B
C
D
E
F
G
H
I
J
Percentage of Nutrient in
Minimum
Amount in
Feed 1 Feed 2 Feed 3 Feed 4 Required Amount Blend
Corn
30.00% 5.00%
5
Grain
10.00% 30.00%
6
20.00% 20.00%
7 Minerals
8 Kilograms to mix
9
(in 1,000's)
0
0
10
4
20.00%
15.00%
20.00%
10.00%
10.00%
30.00%
20.00%
15.00%
15.00%
0.00%
0.00%
0.00%
0
0
8
0
$320.00
$150.00
11
12
Cost per
1,000kgs
$250.00 $300.00
$0.00
CSE1720 Summer 2005 Lecture 03 /50
Spreadsheet Assignment Hints
1. Easy to read and accurate layout
The first page (screen) should have references to
Documentation : Spreadsheet Name
Developer’s Name and I.D.
Purpose of the spreadsheet
Date (completed or submitted)
Files Used ( ALL files and their
purpose AND their location - access
path)
CSE1720 Summer 2005 Lecture 03 /51
MONASH UNIVERSITY
2nd Semester, 1998
Student I.D
Student Name
Subject Code
Date Prepared
Spreadsheet Objective
Assumptions
Data Area
Results
Constraints
File names - Original
- Active
-Backup
CSE1720 Summer 2005 Lecture 03 /52
Spreadsheet Assignment Hints
2. Location of : Input Areas
Output Areas
Results
Charts or Graphs
Analysis report (if this is required)
Contents of Individual sheets
(These details may be combined with the First Screen)
CSE1720 Summer 2005 Lecture 03 /53
Spreadsheet Assignment Hints
3. Contents of Components
Input data area - tables
Output data area - tables
Chart(s)
Model
Formulae - any built in functions used
4. Any constraints - roundings, limitation of time series
Options used with built in functions - such as the
nomination of repayment at beginning or end of month
CSE1720 Summer 2005 Lecture 03 /54
Spreadsheet Assignment Hints
Presentation Of Charts
• Must have a meaningful name - not ‘results’
• Use legends, X and Y axes names
• Use colours
• Use an appropriate chart form
• Use multiple charts if necessary to better illustrate
results
CSE1720 Summer 2005 Lecture 03 /55
Excel Special Functions
CSE1720 Summer 2005 Lecture 03 /56
Spreadsheet Functions by Category
Database and List Management (dsum, dstdevp,
daverage..)
Date and Time (now, Month, Day, Datevalue ...)
DDE and External (upper, dollsr, floor, gcd..)
Engineering (radians, odd, Poisson,hypgeodist)
Financial ( PMT, PPMT, RATE, TBILLPRICE, NPV, ..)
Information ( Average, Min, Max, ..)
Logical (and, or, if, isodd, isref ...)
Lookup and Reference (index, vlookup, hlookup, lookup .)
Mathematics and Trigonometry (acosh, bin2oct, correl, log ..)
Statistical (dstdev, stdev, normdist, percentile , prob ....)
Text (char, code, concatenate, count, counta, N, right, left ..)
CSE1720 Summer 2005 Lecture 03 /57
Your Spreadsheet Skills
• INTERMEDIATE LEVEL
Load spreadsheet software
Set Directory Paths
File Functions - Save As, Save, Retrieve, Copy, Delete,
Inspect (File Manager functions)
Enter Text, Labels, Formulae
Alter column specifications - width, height on a Local and
Global basis
Insert / Delete Rows, Columns
Create / Name Cell Ranges
Copy Cell Range to Cell Range
Move Cell Ranges
Delete Worksheet
CSE1720 Summer 2005 Lecture 03 /58
Your Spreadsheet Skills
Function Key use - F4, F9, F1, F2 ......
Formulae Development and Embedding
Use of Special Keys - Control+Home, Ctrl+End, Tab, ...
Formatting
Editing
Close
Exit (and the dialog box responses)
Charting
Sorting
Data Base Functions
Combining Spreadsheets
Splitting Worksheets
Data Fill, Series, Frequency, ...........
CSE1720 Summer 2005 Lecture 03 /59
Compound Functions
CSE1720 Summer 2005 Lecture 03 /60
Assessment Rules
• The Rules for Assessment of student marks are:
1. A student must obtain an overall average of 50% to pass
the subject
2. A student must obtain a minimum of 40% in the
Examination or the Practical Assessment
3. The final mark shall be the lesser of the marks for the 2
Components , plus 10
CSE1720 Summer 2005 Lecture 03 /61
Spreadsheet Application
Assume that
The marks for the Examination are in cell A65
The marks for the Practical Work are in cell A66
The Total Mark is in cell A68
An Intermediate Cell is used to detect the 40% rule - cell A67
The FINAL ADJUSTED MARK is in cell A70
CSE1720 Summer 2005 Lecture 03 /62
Spreadsheet Application
The IF statement coupled with the OR option provides the
basis of preliminary assessment.
Part 1. To assess if the 40% rule has been met:
The Formula will be in Cell A67
IF(OR(A65<39.9,A66<39.9),1,0) - This puts a 1 in A67 if
there has been a result of <40% in either component,
and a 0 in A67 if there has not been a result of <40%
(what about the use of =<40% ??)
CSE1720 Summer 2005 Lecture 03 /63
Spreadsheet Application
Before we proceed we need to build a ‘decision table’ based
on results:
Prac Work
Examination Result
Grade
a
b
c
0
> 50
10
N
>50
0
10
N
30
> 50
40
N
42
> 50
52
P
50
60
55
P (Average)
60
90
70
C (Min + 10)
45
90
55
P (Min + 10)
CSE1720 Summer 2005 Lecture 03 /64
Spreadsheet Application
Prac Work
a
20
39
0
15
5
Examination
b
20
39
0
39
55
Result
c
Grade
20
N
39
N
0
N
25 or 39 ?
15
N
All other cases of > 50 are averaged.
CSE1720 Summer 2005 Lecture 03 /65
Spreadsheet Application
What is necessary is to combine these conditions into an
Excel command which will provide automatic computation
of the final mark and the appropriate grade (which I have
not included in this exercise)
The conditions are accumulative rather than optional, and
so the formula must be based on the AND operator rather
than the OR operator.
E.g. if a>b AND c>d AND e>f ... is TRUE, then do
something, and if FALSE, a default option is invoked.
CSE1720 Summer 2005 Lecture 03 /66
Spreadsheet Application
The format of the IF statement is
if ((argument), (action if TRUE), (action if FALSE))
The next few commands will illustrate the ‘building’ of the
complex command in cell A70:
IF(AND(A66=0,A65=0),0,IF(AND(A67=1,A65=0),10,A68))
*
* *
This covers the condition that the Practical Work Marks were
0,and the Exam Marks were 0, to give a result of 0, and the
case where the Prac Work Marks were 0 and the Exam
marks were >0 (result 10) and the default if these
conditions were not present which is the normal Total
Marks (A68)
CSE1720 Summer 2005 Lecture 03 /67
Spreadsheet Application
So what we have is the ability to extend the conditions, and
therefore the means of building a complex IF command
(also known as nested IF’s)
Without going through all of the build manoeuvres, the final
command looks like:
IF(AND(A66=0,A65=0),0,IF(AND(A67=1,A65=0),10,IF(AND(A
67=1,A66>0,A65>A66)A66+10,IF(AND(A67=1,A66=0)10,I
F(AND(A67=1,A66>0,A66>A65),A66+10,A70)))));
An extension is to include the case where for instance the
Prac Works marks are 55 and the Exam Marks are 90.
CSE1720 Summer 2005 Lecture 03 /68
More Information
Tutorials are in Laboratories
B 3.42
B 3.42B
B 3.43
B 3.45
and B 3.46
They run from 1.30pm to 3.00pm and are on
22/11, 23/11, 24/11 and 25/11
29/11, 30/11, 1/12 and 2/12
6/12, 7/12 and 8/12/2005
The examination is on Friday 10th December.
It will start at 9.30m.
CSE1720 Summer 2005 Lecture 03 /69
Be careful
Test extensively before putting into production use
CSE1720 Summer 2005 Lecture 03 /70
Tomorrow
• We’re off to have a deeper look at Windows NT / 2000 / XP
• and some chips and buses
And if you saw a headline ‘Eye Drops Off Shelf ’
what would you think ?
CSE1720 Summer 2005 Lecture 03 /71