Computer Archtechture
Book: Computer Systems
Chapter 1
Parts 1.1 and 1.2
- Levels of Abstraction
- Definition
- Abstraction is the supression of detail to show the essanceof the matter.
- An outline structure
- Division of responsibility through a chain of command
- Subdivision of a system into smaller subsystems.
- There are three graphical representations of levels of abstraction
- Level diagrams
- Boxes are arranged vertically
- Top box highest level of abstraction; bottom is least level of abstraction
- Nesting Diagrams
- Boxes inside each other
- Outer most box is most abstract, inner is least abstract
- hierarchical Tree
- Like the branches in a tree
- Top of tree is most abstract, bottom of tree is leastabstract
- Abstraction in Art
- Supression of details is an integral part of abstract art that carries over to computers
- This is shown by the art of solving the larger problems and working way to details later.
- Abstraction in documents
- The US Constitution shows examples of abstraction with levels of power
- You can see the level of abstraction by outlining the document.
- Abstraction in organizations
- In most organizations this will be a hierachcial structure
- Military organizations have a more direct chain of command
- Abstraction in Machines
- People relate to machines based on what they need to know to do their job
- Driver drives the car
- Mechanic knows how to fix the car
- Same is true with computers, you do not need to be a programmer to use a word processing program
- Abstraction in Computer Science
- There are seven levels of abstraction in computers
- Levels developed to make it easier to program/use.
- Levels are as follows
- Level 7 (APP7) Language dependant of application programs
- Where people first encounter computers
- Applications themselves
- Level 6 (HOL6) Machine independent Program Language
- Language use to make programs portable
- FORTRAN, BASIC, C++, Lisp, Java
- Level 5 (ASMB5) Assembler Language
- Specific for each computer type
- Saves us from having to program at a lower level
- Level 4 (OS4) Operating System Calls
- Specific to machine
- Allows for specific things to be done in the OS
- Level 3 (ISA3) Machine Language
- Language computer understands
- Tedious for people to use
- Level 2 (Mc2) Microinstructions and register transfer
- Important in the creation of handheld calculators
- Used on some computers for implantation of machine language
- Level 1 (LG1) Boolean Algebra and truthtables
- Original levels used to communicate with original
computers - Tedious and hard to do.
- Goal in book is to communicate with computers effectively
- Hardware
- Computers consist of Hardware and Software
- Hardware is physical part of the system
- Software is the set of programs that instructs the hardware
- Easier to modify
- Software allows computer to solve different types of problem.
- Computers have four basic components
- Input devices
- Output devices
- Main Memory
- Central processing unit (CPU)
- Computers are classified according to relative physical size.
- Small - Microcomputer
- Medium - Workstation
- Large - Mainframe
- Classifications are according to physical size as opposed to storage size
- Computer scientist are concerned with space (storage) and time (how long it takes to compute a problem).
- Input Devices
- Keyboards
- Standard typewriter style but produces electrical signals
- Stored as binary digits (BITs), eight of which is a BYTE
- Because of abstraction, user does not know how it works, just that it does
- Disk Drives
- Stores data on drive that can be later added to or read from
- Two types of disk drives
- floppy disks
- flexible oxide coated film
- capacity has improved greatly over the years
- Hard Disks
- Rigid, usually a metal like aluminium coated with oxide
- Most are permanent in computer but some are removable
- Third type that has become widely used is optical CDs
- Magnetic Tape Drives
- low cost makes good for storage use
- linear access (v. Random access for drives) makes it long to read in the data , especially if at end of tape
- Mouse Devices - used to move arrow around on screen
- Bar Code Readers
- UPC is classic example
- allows for quick and efficient entry of data
- Output Devices
- Disk Drives - talked about as input device
- Magnetic Tape Drives - talked about as input device
- Screens
- CRT - packaged separately from keyboard, works with microcomputer
- Terminal - keyboard and CRT, have to connect to a workstation or mainframe
- Early days were measured by lines of text, 24 lines by 80 character being the normal
- Not measured that way anymore due to graphical nature of operating systems
- Printers
- Vary in performance and cost
- Two main types are
- Ink Jets - spray ink on to a paper,print line at a time.
- Laser Printers - prints page at a time, burns information on to page
- Main Memory
- Sorts data being processed and programs
- It is volatile, looses its information when computer looses power
- Access method is random
- Central Processing Unit
- Controls all the other parts of the computer
- Has its own small set of memory called registers
- Machine instructions are hardwired into it
- Software
- Algorithm - a set of instructions that, when carried out in proper sequence, solve a problem in a finite amount of time
- Does not require a computer
- recipes are an example of algorithm
- Program - algorithm written for execution on a computer
- Must be in language of one the seven levels talked about earlier
- Programs are called software
- System Software
- Application Software
- Operating Systems - Program that makes the computer usable
- three functions
- File management - most familiar to user
- similar to storing files in an office
- Files are documents, programs or data
- Memory management
- Processor Management
- Software Analysis and Design
- Good programming has clarity, speed and memory constraints
- Writing a good program requires you to:
- Understand the problem
- Outline a solution
- Solve each part of your outlined problem
- test your solution by hand
- Test your solution on the computer
- Database Systems
- Most common of Level 7 Apps
- Program that lets users add, delete and modify records in a database
- Also permits a query - a request for information from a part of the database
- Come in three types
- hierarchical systems - fastest but most restrictive
- Network systems - more flexible, but harder to learn
- relational systems - most popular, flexible, easy to use, lowest speed
- Relations
- Store data in things that appear to be tables - called relations
- column is called a attribute and row is called a tuple
- Queries
- Requests for information from the database
- Results can be written in a table themselves
- This is a level APP7 language (Application)
- Examples of commands could be:
- select - takes rows that satisfy a condition
- project - takes columns from a given table that satisfy a condition
- join - creates new table from two other tables, twice as wide.
- Structure of the Language
- Reserve words - words that tell the database to do something
- identifiers - words that define the database and created by user.
- Common in all programming languages
No comments:
Post a Comment