Você está na página 1de 34

Introduction to Computing XX00AA02 - TI13S1 & TJ13S1

Course Syllabus - Fall 2013

| HOME | SYLLABUS | CALENDAR |

Content

Course Description | Course Topics | Learning Materials

Learning Methods | Assessment | Grading and Administration

Instructor

Jaana Holvikivi, DSc. (tech)


Email: jaana.holvikivi@metropolia.fi

Course Description

The goal of the unit is to give the student an understanding of information technology including basic
concepts of computer science and a networked study environment. This includes:

data and file formats,


directory structures,
character encoding,
networks: LAN and internet,
main parts of a computer and their functions,
software categories, and
operating systems.

After completing the unit, the student has acquired the ability to use computers and information
networks as efficient tools in basic and professional studies. The student has the capability to apply
requirements for information security, the ability to use main PC applications software, and the ability
to apply knowledge and strategies to enhance information technology related skills.

Course Topics

Core knowledge:

Basic concepts of information technology and computer science.


The information processing environment at Metropolia.
Principles of computers and their operation: hardware and operating systems
Introduction to main PC applications (word processing, spreadsheets, presentatations,
graphics)
Computer networks and security requirements
Internet as information source and communication medium (WWW, e-mail, HTML language)
Basic operation of the Linux operating system

Additional knowledge

Data base management basics.


Algorithmic thinking and programming logic.
Using different types of graphics software for image processing.
Binary and hexadecimal numbers, logical operations.

Learning Materials

Books:

Long, Larry: Computers, 12th (or earlier) edition, Prentice-Hall, 2005. Chapters 1-10.

"Computers" Internet Bridge http://www.prenhall.com/long

David Reed: A Balanced Introduction to Computer Science, 2/E

Reed's site: http://dave-reed.com/book/, contains useful demonstrations and codes

Snyder, Lawrence: Fluency with Information Technology. Skills, concepts, capabilities. Pearson 2011.
site: http://www.aw.com/snyder

Brookshear, J. Glenn: Computer science. An overview. Addison-Wesley. site: http://aw-


bc.com/brookshear

Suggested reading (some part of these lecture notes is not up-to-date, please compare with the
material presented in the class and distributed through the Tube portal):

Lecture notes, introduction


Lecture notes, hardware
Lecture notes, programs and networks
Lecture notes, hexadecimal and binary numbers
Lecture notes: security

Web Resources:

Office 2010 tutorials and help:

Microsoft starting page for Office products support


http://www.word-2010.com/ tutorials

http://www.electricteacher.com/

Learning methods

Learning in the course is achieved through

1. Lectures: lecture assignments and a report


2. Completing laboratory work
3. Self study with the help of the course book and through the Web

For advanced students who have previous studies, a pre-course test is optional. This has to be
completed by 16 September.

Class Procedures

Attendance to the lectures is highly recommended. Sessions in the laboratory are devoted to practical
exercises. All work has to be completed and handed in to the teacher by posting it on the student
home page, and if asked, showing it on a PC. Two students can work together, but also in that case,
both names have to appear in all documentation and both submit all the work. Make sure your work is
registered by the teacher! Keep all your work until you have received the credits.

Please, get yourself a USB memory stick for the exercises, in order to have backups. Note: labs may
have different versions of some software from what you have on your home computer. You are
allowed to use Microsoft office or LibreOffice but check the versions for compability, especially if you
do part of the work home.

Assessment

The course work is assessed based on the quality of laboratory work, and the report and learning log.
All deliverables have to be handed in before you can get credit. Weight of different components is as
follows:

Assessment
Max points
component

Powerpoint presentation 5

Word basics, Linux 1+1

15 (10 content, 5 formatting


Word report
and timeliness)
Excel 4

Program design 5+5

Home page 5

CSS 2

Mind map & lecture


7
assignments

Grading

Your grade will be calculated on the basis of total points from assignments. All components must be
passed to get credit for the course (one may be exempted). 20 points are required for a 1, and 37 for
a 5.

Administration

Due Dates

Deliverables which are late or missing will be penalized. This applies to the assessed components as
well as all the other exercises.

Due dates may be changed on request for compelling reasons like illness or late arrival to Finland. The
students are responsible for making change of arrangements with the instructor before the work is
due.

Academic Integrity

Dishonesty is not part of academic and professional work. Dishonesty includes e.g.:

claiming the work of another as your own


stealing someone else's work.

Students are adviced to pay close attention to the intellectual property rights in their work, also when
creating home pages. Copyright can be violated e.g. through plagiarism (i.e. intentional or
unintentional presentation of another person's text, findings, or interpretations as one's own), or
copying proprietary images, animations, video clips or sounds.

If caught for academic fraud, you will receive 0 in this course and a referral to the disciplinary board of
the Institute.

Schedule
The preliminary weekly schedule is indicated in the table below. The practice work for the whole term
is available, but some changes may still take place.

Please remember that you hand in all work through Tuubi and by posting it on your home pages, not
by email! We discuss the work in the classroom, not through email (unless you are not able to come
to the school for some weeks).

Week Lecture Laboratory 1 Laboratory 2

35 Course objectives Workstation demonstration & File Internet


Introduction to management practice & Metropolia Presentation graphics,
learning methods resources PowerPoint design
Our LAN WWW browsers & Learning resources
environment and the WWW

36 Internet and HTML Web design work HTML


basics

37 Lecture starts at Linux practice Secure file transfer (FTP) and


11:45 home page installation
Linux OS Home page work continues,
fundamentals additional materials:
Software: CSS lecture Optional: CSS
Operating systems practice

38 History of Excel basics: tables and graphs Excel continues: formulas and
computing references (loan table);
Data and encoding Linear regression and Signal
analysis

39 Software and Programming with Scratch Programming


programming with Scratch continues

40 Computer Word processing basics, Writing Report practice


architecture texts and creating mathematical
expressions
Document formatting

41 Networks Programming with Scratch Programming with Scratch

42 Examination week,
no classes

43 "Project week", no
classes

EVTEK Introduction to Computing


| HOME | SYLLABUS | CALENDAR AND EXERCISES |

Lecture notes: Introduction

PREHISTORY OF AUTOMATIC DATA PROCESSING

Calculating devices:

Pebbles, cowrie shells, bamboo sticks 'chou'


Calculation tables (Medieval Europe)
Abacus and its counterparts in China and Japan

Computing machines were designed based on the technology of gears:

Blaise Pascal, 17th century, permanent algorithm

G.W. Leibniz, 17th cent., a choice of built-in algorithms

Charles Babbage, 19th century,

programmable "Analytical Engine"

Jacquard's loom 1801: weaving loom was controlled by paper cards with holes in them.
Hollerith: punched card machines for US census 1890, electromechanical, start of calculation
machines and IBM

- addition and counting

- 1928 subtraction

- 1931 multiplication

HISTORY OF AUTOMATIC DATA PROCESSING : hardware

1940s

ENIAC: first modern computer, vacuum tubes

hexadecimal and binary systems

cryptography during World War II

Von Neumann architecture:

both commands and numerical data were expressed and processed in the same
form and in the same devices

General purpose computer

technologies: electro-mechanical relays, punched tape

new technologies: magnetic drum (max capacity 500 characters or 50 numbers)

early 1950s

magnetic tape storage

ferromagnetic cores in central memory

stand-alone computers

1956

first computer made of transistors

magnetic disks

1960 SSI: small scale integrated circuit (100 transistors)

1966 MSI: medium scale integrated circuit (1,000 transistors)

1969 LSI: large scale integration (up to 10,000 components)

VLSI and so on
HISTORY OF AUTOMATIC DATA PROCESSING: software and systems

1950s

Machine and Assembler language programming

1960s

Multitasking operating systems, time-sharing, batch-processing

Mainframe computers: terminals, on-line use

Statistics, calculations, accounting

Cobol, Fortran, Algol programming languages

1970s

minicomputers, distributed systems, networks

Basic, APL, Pascal and other specialized programming languages

databases

division of labor: operators, systems analysts, data analysts, data entry clerks, programmers, output
handlers

1980s

Link: 25 years of IBM PC

supercomputers and microcomputers

mainframes and minicomputers, workstations

office automation: text processing and spreadsheets

robotics

C programming, client /server databases, SQL and relational model

graphics, CAD, CAE, color printing

integration of use, end-users, from programming to applications

1990s and onwards

Links:
Web history timeline, BBC

History of the World wide web


LANs (local area networks), electronic mail

WANs (wide area networks), global integration of systems

high-power workstations, GUIs (Graphical user interface)

object-oriented model, C++ and Java

integration of applications

multimedia

Personal workstation, PC

general purpose computer

word processing
calculations
graphics, image processing
voice processing
telecommunications: network workstation

Computer system, basic parts

Input:

1. Commands and data are entered from the keyboard.


2. Programs and data are read from a disk drive.
3. A pointing device like a mouse is used to give instructions.
4. Data are transferred through a cable and a serial port to the system from other systems.

Output:

Monitor or display
Printer
Disk
Other systems through network.

hardware

software, programs, operating systems, applications

How computer works, example: writing a letter

Start the computer: load operating system to memory (RAM)


Processor directs all operations
With mouse, input: start an application (program);
send a signal to the processor to request the program file from storage to RAM and start its
execution
Write the message: keyboard input, stored in RAM, processing
Output: soft copy on the screen
Save to the disk: from memory to permanent storage

Send instruction to print (output on hard copy), or to send as email

Types of computers

Process control, special purpose computers

General purpose computers:

PC, Macintosh
Workstation
terminal
Main frame (statistics, insurance, banks)
Host computer
Supercomputer (Physics, Airplane design, Meteorology)

PC varieties:

Palmtop
Laptop (portable)
Desktop
Tower, Server

A personal workstation consists of several parts which are connected:

a computer which usually accommodates 2 or 3 disk drives,


a CD/ DVD drive
a hard drive
a display monitor,
a keyboard, a mouse and a microphone
a printer, and other devices
a communications unit (modem card, LAN card).

The metal case of a PC, contains several parts, e.g.


a main unit called motherboard/ system board:
o the processor (the CPU),
o RAM memory,
o a ROM chip, and other chips
o a bus for data transfer
o several connections
a power supply and a cooling fan
slots for controller cards for disk drives, for the monitor and printer interfaces plus other
expansion cards.

Starting your computer

1. switch power on to the main unit and display unit


2. follow-up the starting - any errors?

BIOS (basic input output system) is read; the CPU is initialised


display driver starts
memory test (POST)
hardware checks are performed: mass memory and I/O ports
BIOS gives instructions how to load the operating system into the memory (RAM);
parts of operating system are loaded from disk to RAM; (OS could be selected)
additional software modules e.g. device drivers are loaded from the disk C: and device
connections are checked;
the operating system command processor starts;

3. other programs are started, network connection, virus tests, etc

4. finally you see a dialogue box for logging onto the LAN

5. the Windows desktop is on the screen

The status of programs is often saved on the disk during execution, that's why it is important to close
all programs properly before quitting

Problem situations, error messages and how to cope

the computer does not start: check all connections and power
File not found From time to time you may lose files or you have saved them elsewhere than
you believed. Use the Find property, or check the default directory for saved files in your
software. To be prepared for loss of files, always remember back-ups!
When a program hangs (it is stuck with an operation) or the system locks up: press Ctrl-Alt-
Del to get the task list, in Close Program dialogue, select the application and click End Task.
if a network connection is not created, you may have entered a wrong user ID/ password; or
there is a network problem
if something really odd goes on e.g. during the start, there may be a virus
to avoid viruses: never download programs from unknown source, never use pirated software,
use only checked diskettes
printer does not print: check the default printer, check network connection, sometimes it is
needed to restart the printer to create a network connection
finally some error jokes: poetic error messages

Data in the computer

a bit, byte, word/ character, file


File

Any set of information saved on the computer's disk is called a file:

programs,
documents,
images
data bases

Technically, files contain characters of information. Size of a file is expressed in bytes: one byte is 8
bits long (8 zeroes and ones). Also hexadecimal system is used in PC addressing and character
names. 1 KB is actually 1024 bytes: 1 k = 1000, but 1 K = 1024.

1 b (bit)

1 B (byte) = 8 b

1 KB (kilobyte) = 210 B = 1024 B = ca 1000 B

1 MB (megabyte) = 220 B = 1 048 576 B = ca 1000 KB

1 GB (gigabyte) = 230 B = ca 1000 MB

1 TB (terabyte) = 240 B =ca 1000 GB

One page of text takes basically 2 KB, but the codes of the software need extra space, e.g. a short
Word file takes 19 KB

Data is organized in

files
directories, folders, which make a tree structure

File names

old DOS: 8 characters plus an extension of 3 characters; No spaces are accepted, no special
characters; You can select any file name except reserved DOS words.
Windows XP, 2000, 98, 95: 255+4 characters, also spaces
choose descriptive, unique names
file names are not case sensitive in Windows, but in Unix they are!
remember compatibility!

extension is for file type, usually selected by the application

BAT a batch file which contains DOS commands


COM program
EXE executable program
DOC Word-text
XLS Excel worksheet
BMP bitmap image
HTML WWW format file (text)

Most programs like Excel, Word, and Paint automatically give the extension to file names.
DOS calls disk drives by letters: for diskettes A: and B:, from C: onwards hard drives, D: or F: for a
CD drive. In a network, F: is usually the first drive located on servers.

When a file is called and saved, a complete specification is used to identify it. A file specification
includes the letter of the drive and the directory path, like

E:\QUEST\QUESFORM.FRM.

Attributes define a file read-only R, archive A, hidden H or system file S


"wild card search":
*.jpg => find all files with extension jpg
rap*.doc => finds all doc-files beginning with rap..

Disks and diskettes

Disks and diskettes are the means of permanent storage.

A hard disk is installed inside the case of the computer and it has a capacity starting of 60 GB
(thousands of millions of characters)

Diskette types (PCs with diskette drives are rare):

3" DS/DD 720 kB; very old ones (but not the oldest)
HD 1.44 MB or 2.88 MB

CD ROMs (700 MB)

DVD

ZIP disks (100 or 250 MB); was used at EVTEK at one point

USB memory devices or PC cards emulate disk storage, capacity starting from 256 MB to 6 GB, USB
disks even over 200 GB

Formatting

the surface of the disk is organized in tracks and sectors


cluster size (allocation unit) different in FAT16 and FAT32: address space.
OS writes a boot record and
an address area called FAT (file allocation table) on the 0 track of the disk where the
information about disk space is stored, and
creates the root directory.

Formatting wipes the contents of the disk. It also checks disk for bad sectors. It can be used
to clear a disk, as well.

Computers and Operating systems

PC s
Year Processor word RAM OS Speed
bits MHz

1981 i 8088 8 256 kB PC DOS 4.77

1983 i80286 16 640 kB DOS 6, 8

1988 i80386 32 2 MB DOS/Win 16,33

1994 Pentium 32 16 MB Win 3.11 25, 50

1999 P II, III 64 64 MB Win 98 500

2001 Pentium 4 64 256 MB Win 2000/XP 1,4, 2 GHz

1981 IBM Personal Computer, with Intel 8088 processor & PC DOS, MS DOS
clones

MS-DOS + Windows 95, Windows 98


Windows NT, 2000, XP, server 2003
UNIX: Linux, Solaris

Macintosh

Motorola 68000-processor etc.


Graphical user interface MacOS

Signals & Codes

Electronic signals:

analog
digital

Encodings

ASCII American Standard Code for Information Exchange


7 bit 2 7 = 128
examples A = 100 0001
a = 110 0001
9 = 011 1001
space = 010 0000

ANSI, ISO Latin-1: 8 bit codes


28 = 256 , including control characters
A = 0100 0001

Unicode (IBM, Microsoft, Sun)


16 bit encoding: 216 = 65 536 characters, includes most of world's contemporary scripts

Problem: exchanging information between systems e.g. email


Image files

Raster graphics, bit map

BMP, TIFF
pixel
number of colours RGB (B/W, 16, 256, 24-bits)
compressed:
o GIF (interlaced, animated)
o JPG

Vector graphics

Postscript, EPS
WMF
CMX (Corel)
HPG
Bezier curves

EVTEK Introduction to Computing


| HOME | SYLLABUS | CALENDAR AND EXERCISES |

Lecture notes, part 2: hardware


System board (or motherboard, main board)

processor (CPU):
ALU arithmetic- logic unit
control unit
registers
Cache: internal and external
memory RAM (SIMM, DIMM)
BIOS (Basic Input Output System), ROM, PROM or Flash BIOS
Buses: within the processor and external
ISA, PCI, USB
expansion slots
connectors
battery

Connections and drivers

parallel
serial
USB (up to 127 devices chained, fast, 12 Mbps)
infrared
firewire IEEE 1394
Bluetooth
SCSI (max 15 devices)
Hard disk connection: IDE, SCSI, ATA/33, Ultra ATA/66
AGP, accelerated graphics adapter
PCMCIA card in portable computers

Installation:

Expansion card, cable, connectors; software


Before installation, check the compability from manuals of the device and system
board, capacity requirements, empty slots
Take back-ups
If needed, update the OS and utilities (updates downloaded through internet)
Switch off the computer and disconnect power
Make sure you are grounded before opening the computer case
Insert the card firmly, and tighten screws
Close the case and connect cables
Installation of drivers (or Plug 'n Play) from the installation CD, possibly you'll
need the OS CD as well
Installation of applications
USB enables on the fly connection (hot plug)

Capacity requirements, example home multimedia workstation

Processor 1.8 GHz


Memory 1 GB
Fast hard drive connection Ultra ATA/66
Disk space 100 GB or more
Operating system Windows XP (or Macintosh)
Good display adapter with 256 MB RAM and high quality sound card
DVD, 19" display unit, modem, loudspeakers

Processor, CPU

Parts: ALU (Arithmetic Logic Unit) and Control Unit

ALU: performs computations and logic operations

Control unit's functions:

to read and interpret program instructions


to direct the operation of internal processor components
to control the flow of programs and data in and out of RAM
The machine cycle: the cycle of operations performed by the processor to process a
single program instruction:

fetch (from RAM to Control unit),


decode instruction (in control unit),
execute (by the arithmetic and logic unit), and
place result in memory (from ALU to RAM).

The instruction time includes: fetch and decode; the execution time includes execute,
and place result in memory.

Machine instructions

Adding values stored in memory

Step 1: Get the value from memory location 6C and place it in a register. =LOAD

Step 2: Get the other value to be added from memory location 6D and place it in another register. =LOAD

Step 3: Activate the addition circuitry with the registers used in steps 1 and 2 as inputs with another register
designated to store the result. =ADD

Step 4: Store the result in memory location 6E. =STORE

Step 5: Stop. =HALT

Other examples of basic instructions:

MOVE, OR, AND, ROTATE, JUMP

Code:

Step 1: 156C

Step 2: 166D

Step 3: 5056

Step 4: 306E

Step 5: C000

Note: Data and programs are contained in memory, thus the machine alone has no way of knowing what is data and
what is program. It allows one program to manipulate other programs as it would data.

Machine architectures

CISC complex instruction set computer

RISC reduced instruction set computer


PERIPHERAL DEVICES
Communication between a machine's CPU and its peripheral devices:

physically through plugs and cables


conceptually data flow through ports
data transformation between electric form and magnetic/ optical/ acoustic/ mechanical form

I/O alternatives:

1) separate I/O machine language instructions

2) memory mapped I/O: ports are disguised as memory cells; data is read from ports with LOAD-instruction and
written with STORE

Communication control:

e.g. CPU produces data faster than peripheral device (printer) can receive: handshaking allows the
peripheral device to transmit its status back to the computer
duplex (two-way) communication lines:
half-duplex, only one direction of communication at a time
full-duplex, both directions at the same time (telephone)

Controllers (channels)

several devices can be connected to one port


direct memory access (DMA)
buffer: a memory area reserved for the information which is transferred from one device (e.g. CPU) to wait
that the next device (controller) moves it further
types: built-in controller in the peripheral device or separate I/O card, interface card
bus interface, expansion slot in the computer, device driver program

Parallel communication

all bits of a character transferred at the same time, each on a separate line, connector wide (36, 50 pins)
used for printers, short distance, simple, LPT1

Serial communication

one bit a time


speed 2,400 to 56,600 bps (bits per second)
connection standard RS-232-C: two device types, terminal and modem (often 9 pins, "narrow")
parameters: speed, parity, number of data bits, stop bits, retry
COM1, COM2, etc.

USB Universal serial bus

high speed connection, up to 127 devices


"on the fly" installation

Input devices:
keyboard, mouse, pointing pen, touch screen, joystick, finger pad, bar code reader, scanner, microphone,
digital camera, video camera

Output devices:

Visual images expressed with matrix method: character matrix and bit map for graphics.

Printers: laser, ink jet, dot matrix, plotter, thermal, line printer, daisy wheel

Display monitors, speech synthesizer, audio generator

Display

Pixels and colours

Colours: R = Red, G = Green and B = Blue


Black light = no light to the eye
White light = all wavelengths
RGB-co-ordinates

red = (255, 0, 0)
purple = (255, 0, 255)
light yellow = (255, 255, 128)
black = (0, 0, 0)
white = (255, 255, 255)
grey = (196, 196, 196)

Each colour is repainted or refreshed (R, G, B) separately


Refresh rate of 70 to over 100 Hz
Non-interlaced is flicker-free
More colours: 24-bit

Printers

Laser printer

Resolution of 300, 600, 1200, 2400dpi (dots per inch).


10-1000 pages per minute
colour

PostScript, PS page description language (vector graphics)

Modem

Transfer time for a text file of 1 MB (about 500 A4- pages) with some modems:
Modem speed (bps) 1 MB file

2400 Ca 1 hour

9600 Ca 15 min

14 400 Ca 10 min

19 200 Ca 7 min

33 600 Ca 4 min

Evitech Introduction to Computing


| HOME | SYLLABUS | CALENDAR | TOPICS | EXERCISES |

Lecture notes, part 3: programs & networks

Algorithm

a sequence of steps that directs the execution of a task


sheet of music
operating instructions for a washing machine
instructions for constructing model aeroplanes

Mathematics

study of algorithms in order to find a single set of directions that would


describe how any problem of a particular type could be solved

algorithms in computers

programs
the intelligence required to solve a problem or to perform a task is
encoded in the algorithm
to follow the directions of an algorithm is merely mechanical
Computer science

study of algorithms
which problems can be solved by algorithmic processes?
how can the discovery of algorithms be made easier?
how can the techniques of representing and communicating algorithms
be improved?
how can our knowledge of algorithms and technology be applied to
process better machines?

Programming Languages

Machine Language
Assembler (mnemonic)
Procedure-Oriented Languages
o Fortran, Pascal
o Cobol
o BASIC
Object-Oriented and Visual Languages

C ++
Java, C#
Visual Basic
Visual C etc.

The Fourth Generation

Delphi
Oracle

Natural Languages
Operating systems

The Operating System

Coordinates all software activity within a computer system: The master


control program that runs the computer.

The first program loaded when the computer is turned on, its main part, the
"kernel," resides in memory at all times.

The operating system sets the standards for all application programs that run
in the computer. The applications "talk to" the operating system for all user
interface and file management operations.

Our interaction with the OS is through the graphical user interface


Examples: DOS, Windows, Unix, Linux, Mac OS, IBM mainframe OS/390
and the AS/400's OS/400

Functions:

1) Control data (incl. programs) and its access.


Each such item resides in the computer system as a collection of records
called a file. OS takes care of manipulation of files and keeps track on storage
of files. Execution of programs.

2) Provide for efficient device access. Includes routines needed to use the
peripheral devices attached to the machine. To facilitate communication
among computer system components, and to maximize throughput.

3) Manage resources and optimize their use: memory area, peripheral


devices, programs.

4) Control access to the machine (access codes, passwords), and to provide


an envelope of security for the computer system.

5) Standardization of the human/ machine interface (same OS, many


machines).

Virtual versus real characteristics of a computer system:

Virtual Real characteristics

Software generated Hardware level

Data stored in logical blocks Data stored in physical blocks

Presence of only one user's data Data belonging to all users

Ability to understand commands in Understands only machine language


human compatible form

Same internal characteristics as other Significantly different from other


machines machines

Batch processing
- execution of jobs which are collected together with their data in a single
batch without interaction with the user

- job queue: jobs waiting before being executed. FIFO (first-in-first-out) and
priorities

Interactive processing

- dialogue with the user, immediate response

- real-time processing: response to the environment

- multitasking systems

- time-sharing

Operating system architecture

Command processor

monitors input devices (keyboard, mouse) and interprets commands

Scheduler

arranges for the execution of the program

File manager

- management of bulk storage

- users' access rights

Resource allocator

Dispatcher

- coordination of time-sharing, switching of jobs

Utility software

various routines for device control, file manipulation, etc, editors (for
programming)
library

Interrupt handling

Interrupt signal:

1) CPU stops executing the current program

2) CPU saves its position in the program (= program's state)

value in the program counter


information in the registers
information in the memory cells used by the program

3) start another program from memory: interrupt routine

update program counter


start fetch phase in machine cycle

Interrupt requests:

allowed only at the end of machine cycle, before fetching the next
instruction

control of peripherals (e.g. keyboard)


error situations in the processor (e.g. division by zero)
timed hardware signals
memory management
operating system (e.g. dispatcher)

Time-sharing

- programs waiting in memory

dispatcher executes a jump to next program's location (reload


registers) & starts timer circuit

- time slice for program execution 10 to 100 milliseconds

- creates a virtual machine for each user / program

- slower than real machine


- priorities: longer time slices or more time slices

time-sharing within batch processing (mix of jobs, more even load on


resources)

Resource allocation

- shareable: disk units

- non-shareable: tape units, printers

all requests handled by resource allocator; no direct program -


peripheral communication allowed

EXAMPLE: Multitasking in Windows NT

"Let's review a little how multitasking works: At any time, there may be
multiple threads of execution running under the system. (A thread is a series
of sequential machine code instructions that are associated with a unique
CPU register state and stack.) The operating system periodically receives a
hardware timer interrupt. Under Windows NT, the timer interrupt is
programmed to occur every 15 milliseconds. When the system receives a
timer interrupt, it is then free to switch execution from one thread to another;
this procedure is known as time slicing.

Every thread of execution has a certain priority which governs how NT divides
the time slices among the threads. Threads can also be suspended for
various reasons, such as waiting on keyboard input or waiting on a
semaphore (a flag for a memory unit)."

Starting of an operating system

RAM (random access memory): volatile, contents disappear when system is


turned off

ROM (read-only memory): permanent contents

When computer is switched ON or restarted:

1) start signal: all controllers, starting registers and program counters are set
in start-state, initialized
2) program counter reads the pre-determined address from memory (ROM
program, bootstrap) before starting its first machine cycle

3) the boot program knows where operating system is located on disk:

- OS is loaded into memory (RAM)

- jump into beginning of operating system

Unix

Bell laboratories, 1970's, universities


Open System software (collective effort)
Many versions (AIX, HP-Unix, Linux, Solaris)
User interface: character based or GUI X-Window
Coded in C- language
Hierarchical file system

Kernel

Memory allocation
timing
I/O
File system management

Shell

C Shell, Bourne shell, Korn shell


Pipes and filters
I/O redirection
Timing of commands
Contains a programming language
Properties can be changed
Management of background and foreground processes

Commands

ls -f list all files including files starting with a dot (.login .forward etc)

ls -l (or ll) list all files, types and access rights


ls *.txt list files with extension txt
ls m*.* list files starting with m

chmod change access rights (+ more, - less)

Groups: user, group, others, all;


Rights: none, read, execute, write
chmod a+r <file> adds read rights to all users

passwd change password

cd <name> change to directory

more <filename> print file one screen at a time

cp <name1> <name2> copy file

rm <filename> remove file

mkdir <dirname> create/ make directory

rmdir <dirname> remove/ delete directory

mv <name1> <name2> move or rename file

pwd (print working directory): show current dir

ps list active processes

kill <name> terminate process

fg move to foreground process

exit

Programs in Unix

pine email

tin News

pico index.html

editor <file>

emacs letter.txt

starting file with Emacs editor

telnet evitech.fi

remote connection to a server in Internet


ftp ftp.funet.fi

file transfer connection

Networks: local area network = LAN

Communications channel

twisted-pair wire, < 1Mbps bits per second (telephone)


coaxial cable, 10-100 Mbps
fiber optic cable, 2.5 * 109 bps
distances 300 -2500 m
IEEE 802.3 standard: Ethernet; Token Ring
connecting network segments: router, bridge, hub, concentrator
high speed wireless, radio signals e.g. 2400 MHz, capacity 1-11 Mbps
security: encryption

Topology

star
ring
bus

Workstations

e.g. PCs equipped with network adapter and driver

Servers

file server:server software, shared application software, common


storage space
printer server
data base server
communications servers

Software

communications protocols:
access method(token access, Ethernet)
protocol (TCP/IP, Novell IPX/SPX)
LAN access: NetBIOS
network operating system: Novell Netware, Windows 2000
network management software

Services

printing and other shared peripherals


file storage: common storage space; backups
data communications like internet and main frame connections
e-mail
shared applications
group software
security: protection. encryption, firewalls

Internet

world-wide collection of computer networks


where every node, every computer has an address -
within a domain name (computer.company.tldomain)
and an IP number (xxx.xxx.xxx.x)
every user has an ID (identif@computer.company.tldomain)
TCP-IP, Transmission Control Protocol-Internet Protocol

Intranet/ Extranet

Internet connections, options

Common carriers:

private line (leased) (max speed 56/ 33 kbs)


dial-up line: modem (max speed 56/ 33 kbs) or
ISDN (Integrated services digital network) (max speed 64 kbs)
ADSL (Asymmetric Digital Subscriber Line) (max speed 128/ 512/ 2048 kbs)

Other options:

cable (tv) modem (max speed 512 - 1536 kbs)


wireless network (max speed 1024 kbs)
(electric power lines)

Services

E-mail
MIME (Multipurpose Internet Mail Extensions)-standard:
address, subject, distribution, attachments, message; sender's e-mail address
Pine, Eudora, Lotus Notes, Netscape Mail, MS Outlook, Novell Groupwise etc.
Hypertext in Internet: Gopher
HTTP: hypertext transfer protocol
hypermedia (world-wide web)

Internet services
shopping, mail order, travel and seat reservations, postcards, etc
Chat, discussion forums, "ICQ" instant messaging
Internet Phone
work group programs (Lotus Notes, Novell GroupWise)

HTTP (Hypertext Transfer Protocol)


for WWW-documents
HTML (Hypertext Mark-up Language) (GSML/VRML/XML/DHTML) WWW
document description language, evolving, standard level 4.01.

cookies
Evitech Introduction to Computing
| HOME | SYLLABUS | CALENDAR | TOPICS | EXERCISES |

Lecture notes 4
Hexadecimal notation 24=16

Binary Hexadecimal Decimal


2 based 16 based 10 based
0000 0 0
0001 1 1 100 20 160
0010 2 2 21
0011 3 3
0100 4 4 22
0101 5 5
0110 6 6
0111 7 7
1000 8 8 23
1001 9 9
1010 A 10 101
1011 B 11
1100 C 12
1101 D 13
1110 E 14
1111 F 15

Binary numbers are grouped in sets of four for conversion into


hexadecimal. Examples: binary 0101 1010 = hex 5A
1010 0100 0110 0000 1110 1011 0001 0011 = ?
Convert hex numbers to binary: ABCD, 610A
"Base eight": an introduction to number systems
Binary decimal conversions:
For example
5 8 3 = (5 * 102) + (8 * 101) + (3 * 100)
Convert binary 1011 0111 to decimal:
1011 0111 = (1 * 27) + (0 * 26) + (1 * 25) + (1 * 24) + (0 * 23) + (1 * 22)+ (1
* 21) + (1 * 20) = 183
Conversion from decimal to binary is not quite as simple. Convert
decimal 583 to binary.
Divide the original number by 2 and keep the remainders.
583 / 2 = 291, remains 1
291 / 2 = 145, remains 1
145 / 2 = 72, remains 1
72 / 2 = 36, remains 0
36 / 2 = 18, remains 0
18 / 2 = 9, remains 0
9 / 2 = 4, remains 1
4 / 2 = 2, remains 0
2 / 2 = 1, remains 0
1 / 2 = 0, remains 1
You read the binary number from end to beginning: 10 0100 0111

Binary addition:
00111010
+00011011
---------------
Logical operations in binary format:

AND result
0 0 0
0 1 0
1 0 0
1 1 1

OR result
0 0 0
0 1 1
1 0 1
1 1 1

NOT result
0 1
1 0

Lecture notes: security


Viruses, worms and other nasty things

Data files may include viruses: any file extension could be deceiving

exe, scr, doc

Viruses cause various damage

Destroy files and disks


Affect computers operation, causes faults
Spread confidential information
Open the system for outside monitoring or interference

Several ways of getting a virus

Receiving it via email


From infected disk
By downloading a virus from internet
by having an open, unprotected internet connection

and how to protect your computer

First of all, don't be stupid:

never open e-mail attachments unless you are sure they are OK
never insert a diskette of unknown source, or suspected to be infected
never download and install programs, plug-ins or other files you are not sure about from internet
Be smart:

keep your virus protection software active and updated (daily)


keep your Windows OS updated (IE check for updates!) Windowsupdate: ALL critical
use a firewall
avoid using Outlook and Outlook Express (there are other e-mail programs)

In EVTEK

take care of your passwords and change them regularly


library lends a CD which has updated Outlook Express, F-prot virus protection and BackWeb,
Zone Alarm fire wall, many other utilities
your are not allowed to make any installations or set-up changes to EVTEK PC's
don't do any mass mailings

Você também pode gostar