Title: Networking and the Internet 11
1Networking and the Internet (11)
- Week 10
- Communication protocols (Willis, chapter 14)
- Standards
- Data formats for transmission
- Introduction to exam structure
- Week 11 final theory revision session
- The future of Voice in networking
- Reflection on the assignment
- Revision and Exam preparation
- Module evaluation
2Integrating Voice and Data
3Voice over IP
- Telephone Exchange development
- Operator connection
- Strowger step-by-step switching
- Crossbar electro-mechanical and electronic
- Time-division multiplexing
- Digital switching arrived with cheap AD/DA
converters - Todays Public Network
- All Digital except local loop to subscribers
- Trunks (connections to PABXs) largely digital
- Private networks mixed
- University has digital with some analogue
- Cabling Optical fibre long-distance twisted
pair local - Little difference between twisted pair for
analogue digital
4Digital Telephone Switching
- Entirely electronic no need for mechanical
switching - What happens when you call on a digital system
- Handset connects to Analogue-Digital Converter
- Spoken waveform converted to bit-stream and
divided into packets for transmission down wire - Each packet given header to identify called party
- Switch or PABX (Private Automatic Branch
eXchange) routes this down appropriate outgoing
cable - Signal converted back to analogue so person can
hear it - If ADC/DAC is built into phone, it can be
self-identifying great for a hot-desking
environment - It can be built into a laptop computer (as with
Skype)
5Impact on the Public Network
- So whats the difference between a PABX and a
Router? - Not much apart from expected quality of service
- Phone must be reliable fast neednt be totally
accurate - Can see this in configuration of home ADSL
- Virtual circuit for point-to-point (PPP)
connection to ISP - PPP over ATM (the protocol of phone companys
network effectively the exchange switches as an
ATM router) - Same considerations apply to cellular radio
network - Except its already digital and routed
- Only class of service limitations keep data rate
down to 9600 - 3rd generation can handle much faster data
6How to Integrate Voice Data
- Key requirement for data is 100 accuracy
- 0000 0000 1000 0000 could mean 1.28 taken from
a/c - 0100 0000 1000 0000 means youve spent 165.12!
- Can tolerate a slight delay in transmission
- Voice is the opposite
- It must arrive in a timely way
- Digital sound is inherently approximate
- CD samples 44,100 times a second to 16-bit
precision - MP3 uses compression on less precise sampling
- 8-bit at 8kHz is good enough for a phone call
(64kbps) - We can probably understand even if its a bit
worse - This difference is a menace or a saving grace
7Classes of Service
- If a circuit is lightly-loaded, we can mix voice
and data without any problem - This allows companies to run Voice-over-IP
internally - When it gets busy, something has to give
- For data, we simply delay things, and rate of
arrival slows - For voice, we painful silence cant
tolerate delay - Potential Solution introduce Classes of
Service - Flag data packets as suitable for delay, while
maintaining integrity checks, retransmission
after error, etc. - Flag voice packets as imprecise but urgent
- Dont delay them, but dont retransmit on error
- Could even compress them further in extremis
- Better still, get sender to increase its
compression (flow control)
8The Future of Voice over IP
- Adoption needs protocol with class-of-service
information - Internetworking Protocol V.6 defines this
- Also extends IP addressing from 4-byte to 8-byte
- Alternatively, we can just have copious capacity
- Probably the situation today
- Could become a problem if we all start using full
ADSL bandwidth, for example, on - Streaming audio and video
- Downloading movies (and Podcasts)
- Telephony, particularly with video
- However, development of ADSL is adding to
capacity at home and in the office
9In Businesses The Reliability Issue
- Historically, we have set lower availability
standards for computers than telephones - Network infrastructure needs to reach standard of
phones before we can let our business depend on
it - But firms in e-Commerce are already in that state
- and many are so IS-dependent that loss of IT is a
killer - Less of an issue between sites
- If the tie-line fails, use the PSTN as fallback
- So it makes sense to mix voice and data on leased
lines - Or even to rely on the Internet and eliminate
inter-site lines - Phone companies also have digital and VoIP
technology - Can offer high reliability and low tariff on
dialled calls
10At Home Twisted pair reigns supreme
- Cable companies havent pushed phone companies
aside - But many houses now have ADSL on their twisted
pair - ADSL has created opportunities for services like
- http//www.skype.com/ (2004 onwards)
- Many imitators (e.g. Tesco from 2006)
- VoIP offers
- Cheap or free international calls
- Multiple concurrent phone calls over the one line
- Downward pressure on all telco tariffs(so you
dont need to use it to benefit from it) - However theres limited interoperability between
vendors - Handsets rarely as user-friendly as ordinary DECT
phones
11Likely progress is as follows
- Now Services like Skype will expand
- Dual phones (VoIP PSTN) will get cheaper and
better - Offers cheap telephony over the Internet
- Never mind the quality, talk to Australia at 1.3p
a minute(and the quality isnt bad, either) - Now and soon Used within single organizations
- Inter-site lines integrate voice and data or
switch to Internet - Smaller sites attach only through ADSL connection
- Increasing cheap and flexible use of existing
LANs - By end-2008, a third of UK companies will be
using VoIP - Finally PSTN will migrate
- Only when reliability is good enough
12Assignment
- Ive read in all your USB sticks, and done a
cursory check of the sites - All but two worked
- One may work when put on a machine with Flash
installed - The other had absolute references to the
students My Docs - Some of the sites looked interesting and
professional - I took in two assignments last week
- the other is part one of a pair, and students
need feedback before doing second part, so it has
to be given priority - Result is that yours wont be ready for at least
3 weeks - Dont worry, nothing in the exam needs this
feedback
13Preparing for the Exam
- I havent finished marking the HTML assignment
14Goal of Exam
- To test the learning outcomes not measured by the
practical assignment. You should - have built on earlier concepts relating to
computer systems - understand the theory underpinning network
technology - have studied current network configurations
applicable to business - understand Internet technologies
- have accumulated sufficient practical experience
of Internet services to understand how to apply
them to business (tested by the HTML assignment) - be able to review innovations in network
technology in a critical manner, without
succumbing to fashion
15Preparation for Exam
- You may bring to the examination
- One reference book or textbook of your choice
- the notes handed out during the course
- any notes you have made
- Please make sure you come next week goal is to
- Ensure you understand the topics that may come up
- Answer your questions about technical side of the
module - Books
- Module handouts are intended to cover the
content, but - If you have Coope or Willis, so much the better
- John OGorman Operating Systems (Macmillan)
covers File I/O and memory well
16Business Final Year Projects
- Kick-off session
- What is a Business FYP?
- When will I know who my Supervisor will be?
- When should I do anything toward my FYP?
- Neednt prepare for this meeting Just come
along for - Advice how to pick a topic and get started
- Guidance on research and referencing
- Booklets and pointers to helpful web-sites
- Make sure you
- Attend scheduled FYP tutorial sessions next
semester - Get skeleton document (e.g. from BS3002 on LN)
- Start building the headings so you know what to
chase up
17Erics two-pennyworth
- Build a skeleton of your document as soon as you
can even if you dont use use skeleton.doc - Get the headings right and youll know what to
chase up - As you develop more ideas, insert sub-headings
- Put throw-away text after sub-headings to remind
you what you were planning to do - Table of Contents is a good display of the
structure - It requires no effort if you use proper heading
styles - I find it just as useful as outlining tools, and
easier - Keep a scrapped file for stuff you decide to
remove - If you change focus as you develop, you may want
it again - Also, itll make you less scared of being
critical of your work
18Revision Goals of the module
- Provide grounding in how businesses use data
networks - Understanding of underlying computer
architectures - Operating facilities needed for networking
- Concurrency, Virtual memory and DMA
- Central and distributed computing
- How networks are constructed what can go wrong
and how we guard against problems - Foundations of e-business
- Building a web-site
- Theories of electronic commerce
19Assessment Model
- Usual philosophy giving you chance to
demonstrate knowledge - Breadth of knowledge in Part I of exam answer 6
out of 10 questions - Depth in Part II choose two questions out of
four or five - Assignment to demonstrate application in practice
- Mark allocation in module
- 18
- 32
- 17 on how to33 on actually doing it
20Module Content
- Foundations
- Basic computer structure Storage hierarchy
- Systems for Networks
- Concurrency in computer systems
- Virtual Memory providing an address space for
each process - WWW Publishing Covered in the assignment
- Networking
- Online Computing principles
- The Layers of Networking
- Distributed Information Systems
- LAN and WAN technologies
- Network security
- e-commerce
- Voice networking
- Cell-phones and VoIP
21Review of Module Foundations
- Introduction The ideas behind computer
operations - See the web-site for an introduction for
nonprogrammershttp//www.winchester.ac.uk/bm/Cou
rses/BS2911/bs2911intro.doc - Computer structure Storage hierarchy (Willis
ch.1, 3, 4) - Key points are that
- The CPU works on instructions and data from
memory - The CPU is faster than memory (so needs cache)
- Memory is FAR faster than disk drives
- Disk drives are faster than printers and most
networks - Communication is via a data bus
- Try to remember the following diagram (in which
device controllers are shown as if they were part
of device)
22Computer Architecture
Processor
Memory
1234567890- QWERTYUIOP ASDFGHJKL ZXCVBNM,./
Output (Information)
Input (Data)
Bus
Other long-term Storage
Disk Storage
- Processor executes instructions from memory,
- and works on data in memory
- Other data flows through the bus
23Notes on Computer Architecture
- Most machines you work with have at least 1GB of
memory. That is, there are more than a billion
separately-addressable units of memory, each
consisting of eight electronic switches. These
groups of eight binary digits (bits) are called
bytes and can hold 28 values (0 up to 255).
Because the whole machine works in binary, things
usually come in powers of two a K is 210 or
1024, and an M is 220 or 1,048,576.
Inconsistently, G usually means 109 for disk
drives, and 230 for memory. - The memory has a cycle-time of under
30nanoseconds, which is slower than the
processor, but faster than the bus. Thats why
the processor talks to memory without going
through the bus. Its also why all modern
computers use a local bus called PCI to connect
to the fastest devices, and the some have an even
faster connection, AGP, to the display. PCI runs
faster than the normal ISA (Industry standard
architecture) bus Ive illustrated here. - Most machines have a diskette drive called A and
a fixed disk drive called C You can have more
than one of each, so you may have a B drive
(diskette) and a D drive (fixed). Other
devices, such as CD-ROM, usually have the next
spare letter after the last disk. - Windows 95/98, NT, 2000, XP and Vista allow you
to connect computers together in a network, and
to share disks. These can be mapped as if they
were physically on the machine, and then usually
have a letter after the CD-ROM. You will be
familiar with keeping all your personal data on a
network disk your My Documents. - Because data is often more valuable than the
computer its on, and hard disks have been known
to fail, back-up devices are needed. Tape gives
the best combination of speed, convenience and
cheapness of medium, but DVDs are probably more
affordable for home.
24Systems for Networks (weeks 1-7)
- Operating Systems Concurrency File
organization - Time-sharing, multi-programming, transactions
- Structuring and maintaining hard disks tape
back-ups - Interrupts and vectors processor modes see
next charts(Wk5 Coope chapters 12 14 or
Willis ch.9) - Operating system functions for concurrency
- Resource Management,
- Dispatching
- Virtual Memory
- Direct Memory Access
25Operating Systems Notes
- The original goal of operating systems was to
save programmers from having to do the repetitive
task of writing machine-code to do common
operations such as reading cards, driving
printers, or typing a message to the operator.
This was achieved by producing a series of
routines (or macros) to do these actions, and
packaging them with the computer. So youd have
routines to compute a square root, rewind a tape,
punch a card, and all the other common
activities. This is what wed now call
encapsulation of function. You get it right
once, put an envelope round it, and forget whats
inside. Through the 60s, operating systems
encapsulated ever higher levels of function. For
example, OS/360 abstracted the process of
printing, so that the programs print commands
actually wrote data to a spool file, and only
when the program closed its printer did the
operating system actually start moving the
records from disk to the physical printer.
OS/360s descendants still dominate the world of
enterprise computing (MVS, OS/390, now called
z/OS) - Under DOS and its descendants (OS/2 and Windows),
disk I/O is done by reading and writing named
files, which are logically linear collections of
records. The operating system takes care of
mapping from the file identifier to the place on
disk where the records are physically stored, and
glues together a non-contiguous string of
physical blocks (allocation units) to present
logical records to the program. The operating
system delivers the data via buffers in memory. - Because the application doesnt need to know the
structure of the disk, you can run programs with
a physical disk replaced by a CD or a memory key.
- A key service of all operating systems is to make
use of a single processor resource to doing
several things concurrently. We covered that in
some detail in this module.
26Interrupts
- Interrupts are a hardware facility for
controlling software - All current processors depend heavily on
interrupts - Essentially, work by swapping the Instruction
Counter - Interrupts can be caused by many things
- A fault in the machine
- I/O hardware ready to move data
- External event (such as timer)
- Program check (e.g. because instruction
unknown)this is a neat way to invoke software
emulation of an instruction not present on this
particular model of CPU - Supervisor call (e.g. task asking OS for a
service) - Interrupts are the basis of most task switching,
not just detecting errors that the OS must deal
with
27Interrupts
- The hardware feature called an interrupt was key
to most operating systems developed from the 60s
onwards. An interrupt swaps the current
instruction counter value for the address of an
interrupt handler, preserving the old value at an
address defined for each class of interrupt.
This avoids the need to poll to see if (say)
the printer is ready for another line from SPOOL,
and makes it efficient to switch between
activities. - So the printer driver can write a line to the
printer interface, then enter a wait state until
the printer interrupts to show that its finished
writing that line and is ready for another.
Under the covers, waiting on an event simply
means that the operating system has built a
control block containing information to let it
revive the waiting task when a particular
interrupt event arises for example, when the
printer interface returns a device-end interrupt. - The Operating System became the real job running
on the computer. User work was divided into
tasks (what wed now call processes), which
were attached by the Operating System to be given
resources when they were available. At the end
of interrupt handling, instead of returning to
the instruction that was interrupted, control
would be returned to the operating system, which
would allocate the processor resource to the most
appropriate task. So you could run several jobs
at once, possibly matching a compute-intensive
analysis with a data-intensive billing job. - This concept of task-switching can also be used
at a lower level. For example, if you have a
business system with a thousand users sitting at
terminals, you could have a task running for each
terminal (plus a few more to control the whole
system). Then each time my task writes to the
terminal, it could go into a wait state, waiting
for an event that shows the terminal has sent
some new data (usually, this wont happen until
the user has read the last output, thought about
it, typed in a response, and hit the Enter key).
Thus the development of efficient online systems
was dependent on the concept of tasks and events.
28How Interrupts Work
Clock
Arithmetic and Logic Unit
Central Processor Unit
1 Load 2 Store 3 Add 4 Subtract 5
Multiply
Memory C00 1 1 F0C C04 1 2 F10 C08 3 1 2 C0C 2 1
F14 .. .
Processing happens one instruction after another
C00, C04
...
29Notes on How interrupts work
- To simplify this example, I chose a processor
that addresses memory by the word (of 32 bits).
This means theres room at a single memory
address for an instruction code, register-number
and an address, or for a full-word number. Such
machines were common before the IBM 360, but most
modern machines actually address each byte. - The diagram shows two areas of memory, one
containing instructions, and the other data.
Theres no need for this separation, but it makes
things easier to understand. The first area
contains program, and is laid out to show
instruction code, register affected, and finally
the address of memory accessed (or second
register). That is - Instruction Code Meaning
- 1 r s Load register r from memory location s
- 2 r s Store register r into location s
- 3 r1 r2 Add r1 to r2 and put result in r1
- 4 r1 r2 Subtract r2 from r1 and put result in r1
- 5 r1 r2 Multiply r1 by r2 and put result in r1
- We worked through the program, writing in the
changes that occur during execution
30Interrupt handling
- Lets assume we have finished our time-slice, and
the timer has just signalled the fact and
interrupted us - Interrupt hardware will save current IC value in
(say) loc 40 - Then set IC to the address given in (say)
location 60 - CPU then executes interrupt handler code at this
address - First it has to save state vector of interrupted
task - registers, privilege level (e.g. supervisor
state) - then do whats needed to service the
interruptprobably jump into the scheduler to
pick next ready task - IBM S/370 maintains state information in PSW
- Hardware swaps whole Program Status Word, not
just the instruction counter - Each interrupt class loads its own new PSW
31Processor modes
- Clearly we could lose our return address if an
interrupt handler is interrupted (by the same
class of interrupt) - So we need to Mask against this class
- and usually against lower-priority interrupts as
well - This mask is another component of the S/370 PSW
- defines one of the processors modes
- Other processor modes (examples again for S/370)
- Supervisor state Needed to run privileged
instructions - Allows OS to do things not permitted to
applications - Certain instructions need current PSW in
Supervisor state - If its not, you get a Program interrupt
- Storage key lets you protect your code and data
from being overwritten by another task
32Lifetime of a Process
User hits ENTER
Maintain page tables to access processs memory,
though itll get paged out
On idle queue
Task Created
User hits ENTER
Nothing to do
Executable Task
Dispatched
Running
Finishes
On Ready Queue
Terminated
Time expires
Enters WAIT
Requeued on Event
Blocked
33Access Methods and I/O Handling
- I/O processors have Direct Memory Access (Week 7)
- OS writes program for I/O processor into memory
and issues StartIO to make I/O processor transfer
data directly - I/O Processor raises interrupt when transfer is
complete
34More Systems for Networking
- Compilers and linkers interpreters (Week 5)
- Compiler produces efficient code (fairly
slowly)Linker puts this together with OS
components for re-use - Output is load module such as a .EXE file
- Best approach for tasks to be run many times
- Interpreter reads text of program line-by-line
and runs it - Source and current variable values available for
diagnosis - Best approach for one-off programming
- Real and Virtual Memory (Week 4, OGorman)
- Virtual addressing allows separate memory for
each process - Idle processes dont need to waste real memory
- A key area make sure you understand it
35Virtual Memory
- Introduced with Ferranti Atlas (1965)
- Commercial debut with IBM System/360 model 67
- Achieved success with IBM System/370 in 1971
- Now everybody does it, even PCs
- Basic principles
- Virtual Memory has more addresses than real
memory - Divide address range of virtual memory into pages
- Put pages of virtual memory into frames in real
memory - Map virtual address to address of frame in real
memoryusing dynamic address translation - OK until every frame is full, then we have to
page out - find a page we can sacrifice write it to disk
- allocate the frame to another (virtual) page
36Dynamic Address Translation
- For every virtual address space, we need a page
table, giving addresses of frames that contains
each page - If a page is present, its entry will contain a
frame number - For pages not present, entries will be flagged
invalid - How it works (assuming 4KB pages in 16MB space)
- treat address as pageoffset-in-page 12 12
bits - So page-table will need 4K entries (212)
- Use 12 high-order bits to look in the page table
for address of frame containing the page - Add (by OR) the offset (low-order bits) get that
address - Assumes page table is in real memory
- Move to two-level (segment table) if thats a
problem
37Getting a byte in real memory
8F4 Page number
A10 Offset in page
A10
Virtual address
Relevant page frame
Page table
Addressed byte
8F4
contains real address
Real memory
Note this diagram
38Distributed Data Processing
- Online Computing (week 3)
- Interactive versus Transactional
- Impact of transactional nature of the Internet
- Distributed Information Systems (Weeks 6-7)
- Thick versus Thin clients
- Data Integrity (week 6)
- How do you co-ordinate processing in multiple
places? - Understanding Windows of doubt
- Network security (week 8)
- Risk of interception
- Impact of Internet dynamic routing
- Virtual Private Networks and Intranets
- The acid test would you send your credit card
details?
39Goals of Distributed Systems
- To get the best out of both servers and client
systems - Fast response times to user
- Data integrity in the system as a whole
- High availability and reliability
- Low maintenance costs
- Server offers
- Secure, fast access to data
- Integrity and effective back-up
- Client workstation offers
- User-friendly interface
- Local processing where central data not needed
- MIPS at lower cost than on mainframe systems
- Meaningless Indicator of Processor Speed
40Review of Module Networking
- Network topologies routing and Packet Switching
- Structure of the Internet
- The Layers of Networking
- Electrical Transmission management Addressing
Contents Data formats (the codes that flow) - Data transfer (Week 7, Coope, chapter 10)
- Computer Networks (Week 7, Willis, chapter 11)
- Data transmission (Week 8, Willis, chapter 12,
Animation) - Network types (Week 8, Coope, chapter 13, Willis
ch.13) - Communication protocols (Week 8-9 Coope, ch.15
Willis, ch.14) - LAN and WAN technologies Ethernet (Week 7-8),
ADSL - Network security
Play with the animations
41The Layers and your browser
- When you request a URL, your browser application
needs to communicate with appropriate server - Browser builds request, including destination
address, passes it to socket (interface to
networking) - Socket effectively manages session to Internet
gateway, builds TCP/IP header, sends request to
network card - Networking card handles bottom layers
- Data link including error correction
- Physical layer (twisted-pair, coaxial cable..)
- Router passes packets to Internet gateway
- Gateway strips header addressing it, determines
next link on route to destination, calls Data
link layer - and so on...
If there is a session, its maintained by
the application, e.g. Skype or Messenger
42Layer 2 Data Link
- Main task is Error Control
- Early systems ECHOed every character (errors
obvious) - Now rely on more efficient error checking
examples? - with Automatic Repeat requests
- Principle is to acknowledge every packet (or not)
- Potentially attach ACK/NAK to reverse packet
flows why? - Various timings possible
- Sender needs ACK for packet n before sending n1
- If NAK (negative acknowledgement), resends packet
n - Simple, but wastes potential transmission time
- Sender will send up to m packets without Ack
(continuous RQ) - Waits for Ack (n) before sending packet nm
- In event of Nak, may request just the bad
packetor throw away all later packets and go
round again
Play with the Animation
43Ethernet
- Logically a bus each device throws data on the
bus in the hope that nobody else is doing so at
the same time - Each device listens, in case theres been a
collision - if so, both back off for a random time, then try
again - the busier the bus, the greater risk of collision
- limits effective speed to below half of nominal
speed - Ethernet originally ran 10Mbps over coax, but...
- Single break in the bus can cut off many users
- Coax is fairly expensive to buy and install
- Hub allows radial wire to individual stations
(10M, 100M, 1G) - Can clean signal, so uses cheap and flexible
twisted-pair - Smart hub can filter out information not meant
for station, and even work full-duplex down the
cable switching
44Over the May Holiday Did You Work out?
- Why Ethernet collisions run away when the load
grows too large - Would you expect to be OK at higher utilizations
if there were just one client using the server? - Find out what an Ethernet switch is and how it
can help - What is Wired Equivalent Privacy on a wireless
LAN? - Why is WPA better?
- Why does a 50KB jpeg picture take longer to
transmit through a modem than a 50KB Word
document?
45Hot Issues
- e-commerce
- B2C human user buying from the computer
- What can you sell this way?
- How do you retain or lose customers?
- B2B usually computer-to-computer
- Traditionally EDI over direct connections
- Now largely switched to the Internet
- Voice networking
- Currently done by switching
- Key requirements are
- Very high availability
- Urgent (phone call is interactive)
- Opportunities for integration with data
- Digital except for local loop
- Even that moving to ADSL
- Tolerant of errors (lots of redundancy in
speech) - Packet-switching far cheaper than physical
switching - Data usage has overtaken voice
46How was the Assignment?
- Tested your practical understanding of HTML
- From my perception some good sites
- Clear evidence of learning
- Even ringers did something to extend their
knowledge - What were your experiences with
- Writing HTML by hand
- Other methods youve tried such as FrontPage
(full or freebie), Dreamweaver, Geocities
site-builder - Did you learn any research skills in the process?
- Finding on-line primers and examples of good
practice - Integrating conflicting advice from various books
- Trial and error