Download Analog and Digital Signals

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts

Recursive InterNetwork Architecture (RINA) wikipedia , lookup

Cracking of wireless networks wikipedia , lookup

Piggybacking (Internet access) wikipedia , lookup

Bus (computing) wikipedia , lookup

Transcript
LAYERED ARCHITECTURE
LAYER
Order
Application SW: Excel & Access
2
High-order P.L.: Visual Basic
1
Low-order P.L.: Assembly
3
System SW: O.S.
3
Machine Language
4
Data Representation
5
HW: Circuit Design
6
INTRODUCTION
Software is the set of all programs that run on a
computer
VS Hardware : “Hard”
Has a physical presence
 Comes in two forms
System Software: controls the computer
Applications Software: accomplishes user-defined tasks
SYSTEM SOFTWARE
Hide complex details
Registers, empty memory locations, starting location of
program in memory operations in ALU, etc …
Assembly translation programs (Assembler/Loader)
Computer users, and even programmers, do not have to
be aware of such details
System software provides this great flexibility
Interface between user and hardware
SYSTEM SOFTWARE
Makes a virtual computer which hides almost all technical
details from the user resulting in user-friendly
experiences
 No need to worry about details such as register size of memory
location of a given program
 The system takes care of it AUTOMATICALLY
System Software
Applications
Software
Every data or
instruction works its
way through: Even a
simple mouse click !
USER
Hardware
SYSTEM SOFTWARE
System software comes in three forms
Translation programs
E.g. assembler
 Assembly to machine language
More on this issue when we study other programming languages
(next chapter)
Operating systems
Utility program
Communication programs
OPERATING SYSTEMS (OS)
A collection of programs that
 Manages your computer
 Defines HOW a computer will interact with the outside
 Prepares programs and their data to interact with hardware
Booted up,
 The OS is loaded into main memory for initialization
 BIOS
 BIOSs held in ROM (cannot be altered)
Hides all details
 Giving us the illusion of being the only user whose entire program is
loaded into memory
OS - SECURITY
Usernames and passwords are ubiquitous in OSs to control access to
computers
 Care must be taken in choosing usernames and passwords




Programs can be written to try all words in a dictionary in order to guess your password
Long
Meaningless to others
NEVER SHARE
 SYSTEM LEVEL
You want to control the access to some resource or file even for
authorized users (i.e. having access to the computer) (OSs provide
permissions
 Read, Write, Execute or NONE
 Per file
 OS maintains a list of authorized users per file along with their permissions
OS - I/O & AUXILIARY STORAGE
Passing of information between main memory and
peripheral devices
I/O & Auxiliary Storage
E.g. Printers, mice, keyboards, disks, tapes, etc …
For I/O: Translation of input data to binary and output data
from binary (to whatever the I/O device is using)
For secondary storage: Supervision and organization of
data stored on tapes and disks (Auxiliary storage)
OS - I/O & AUXILIARY STORAGE
Writing to Disks
 Find empty space
 Transfer data (No translation)
 Update disk directory (location of new file)
 Update list of empty space
Attempts to optimize the use of available space
 How to find the best fit for a particular file?
 First available position that could accommodate the file
 One with close size to that of the file
 Split into more that one position
OS - I/O & AUXILIARY STORAGE
Deleting from disk
 Update directory only
 Remove the files entry
 Add space occupied by file to available space
A fragmented disk usually has empty space but this space is
scattered all over the disk with not much contiguity
 Defragmenters
CPU ALLOCATION
Single-user systems allocate all CPU time to one user/program
Multi-user systems?
 Sharing main memory and CPU time
CPU is very efficient
 Process between millions to billions of instructions per second
 Other devices on the computer aren’t as fast
 Printers: 100 characters per second
 Disks:
 several milliseconds to look up address in directory
 several milliseconds to locate track and sector (spin disk) and position the R/W head
 Physical motion will always be slower than transferring electric pulses
 I/O bound
 A machine whose performance is limited due to I/O
 CPU is idle most of the time
CPU ALLOCATION
Solutions
 Overlapped processing
 Running other programs while current is waiting for I/O
 Good for I/O
 What about short programs waiting for long ones?
 Starvation
 Multi-tasking (multiprogramming, timesharing)
 All programs requesting CPU time will have access to it in timeslices
 All are in memory together and are listed in a a ready queue
MULTI-TASKING
1 CPU, 1 main memory with many users
When the CPU has time, it picks the first in ready queue and runs it
for a timeslice
 Saves a snapshot of the state of the current program (CU registers)
 Moves on to the next one and places the old back in the ready queue
All processes run together
User won’t notice because the timeslice is very short
 We CAN’T perceive time spans of less than 40-50 milliseconds
 Shorter timelices
 + Give the illusion of continuous process
 - Not very good if most of time is spent on saving the snapshots (wasted time)
 We need to strike a balance
PARALLEL PROCESSING
As opposed to multi-tasking
1 main memory, many CPUs with many users
Jobs can be distributed among CPUs
Even one job can span many CPUs each working on some
subtask
Very complex process
Beyond the scope of this course
OS - MEMORY MANAGEMENT
RAM VS Hard disk
Assume multitasking
1 CPU, many programs
Can’t all fit in memory
OS keeps list of empty
space
Adds to it when programs are
done
Fragmentation could happen
OS - MEMORY MANAGEMENT
Compaction
OS - MEMORY MANAGEMENT
Paging
 Allow one program to occupy many noncontiguous memory segments (pages)
OS - MEMORY MANAGEMENT
Swapping
 What if there are no pages to fit all program?
 Start program by loading only needed pages
 Swap between needed and unneeded ones
NETWORKS
We are not in isolation anymore
Help computers communicate
 Transfer data without physical intervention (i.e. not via disk or tape)
 Sharing resources
 5 users and all want to access a printer?
LANs
 Limited to a single building or campus
WANs
 Span cities, countries and even continents
NETWORK TOPOLOGIES
Ring vs. Star topologies
CLIENT/SERVER MODEL – STAR TOPOLOGY
THE INTERNET & WEB
TYPES OF CONNECTIONS
Physical connections
 Twisted-pair wire
 Two insulated copper wires wrapped around each other.
 Transmit electrical signals
 US phone system
 Used to form WANs
NETWORKS
Coaxial cable
 Insulated copper wire
 Used for cable TVs
 Faster and less prone to interference than twisted-pair but more
expensive
NETWORKS
Fiber Optics
 Fastest
 Transfer light instead of
electricity
 No weight
 Less prone to
interference
 Expensive to install
WIRELESS NETWORKS
Wireless (non-physical) connections
 Radio waves (In LANs)
 Where physical wiring isn’t very convenient
 Prone to a lot of interference from radio transmitters
 Microwaves (In WANs)
 Use high frequency radio signals which travel easily but only in straight lines
 Relay towers must be set up at intervals or satellites must be used for larger distances
 Carries more data (high frequency)
WIRELESS NETWORKS
Types of electromagnetic waves
 They only differ from each other in
wavelength/frequency
 Wavelength is the distance between one
wave crest to the next
WIRELESS NETWORKS
The potential drawbacks to a wireless solution include
 Intervening hills and tall buildings or trees can block the radio
frequency (RF) signals
 "line-of-sight“: antennas must be able to "see" each other
 Severe weather, can adversely affect signal transmission
 Might be susceptible to other radio frequency interference
 Dense fog could possibly be a problem for microwave links
NETWORKS
Bandwidth
Depends on the link between two computers
Measured in bps
Twisted-pair: 10-100 Mbps
Fiber optic: > 2400Mbps=2.4Gbps
NETWORKS OVER THE PHONE SYSTEM
Phone systems transfer data as continual electrical signals
that forms a wave
 Varied frequency and amplitude
 Analog signal
Computer  phone
 Digital to analog
Computer  phone
 Digital to analog
Modem
 Capable of transmitting a certain number of bits per second
 >14,400 up to 56K
PROTOCOLS
Is a rules that governs the transmission of data within a
network
 How machines are addressed
 How messages are addressed
 Who can view or transmit a sent message
 How will the message be packed/unpacked by sender/receiver
 How to deal with transmission errors
Sender, receiver and intermediaries must agree on a
communication protocol before communicating
PROTOCOLS
Sender steps
 Layer 1: (Application) A message is usually generated by some application on the sender
 Layer 2: (Packaging) The message is packaged for transmission
 Layer 3: (Network) routing the message to receipt
 Layer 4: (Physical Link) does the actual sending
PROTOCOLS
Intermediary steps
 Layer 3: (Network) consulted only here
 Check message and forward
 Layer 4: (Physical Link) consulted only here
 Does actual forwarding
Receiver steps
 Layer 4: (Physical Link) comes thru to next layer
 Layer 3: (Network) Received here
 Layer 2: (Packaging) checks for any transmission errors and
unpacks
 Layer 1: (Application) presents to user/program