Transcript BS2911wC
Networking and the Internet (12)
Last Week
» Integrating Voice and Data:
– VoIP and the future of Voice in networking
– Business aspects
» Reflection on the assignment
Revision Week
» Review of module
» Exam Notes – You may bring to the examination:
– One reference book or textbook of your choice;
– the notes provided during the course (includes Glossary);
– any notes you have made
BS2911 Week 12
1
Revision Week – 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
BS2911 Week 12
2
Assessment 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
BS2911 Week 12
Mark allocation in module
18%
32%
17% on “how to”
33% on actually doing it
3
Module 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
BS2911 Week 12
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
4
Review of Module – Foundations
Introduction: The ideas behind computer operations
» See the web-site for an introduction for non–programmers
http://www2.winchester.ac.uk/bm/Courses/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)
BS2911 Week 12
5
Computer Architecture
Memory
Processor
1234567890-=
QWERTYUIOP[]#
ASDFGHJKL;’
ZXCVBNM,./
Input
(Data)
Output
(Information)
Bus
Disk Storage
Other
long-term
Storage
Processor executes instructions from memory,
and works on data in memory
Other data flows through the bus
BS2911 Week 12
6
Systems 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
BS2911 Week 12
8
Interrupts
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
BS2911 Week 12
10
How Interrupts Work
Clock
Instruction Control
Unit
(counter = C00)
Arithmetic and
Logic Unit
Registers
1
2
Instruction Register
Central Processor Unit
1 = Load
2 = Store
3 = Add
4 = Subtract
5 = Multiply
BS2911 Week 12
Memory
Memory
C00
C04
C08
C0C
…..
1 1
1 2
3 1
2 1
….
F0C
F10
2
F14
...
F0C
F10
F14
F18
F1C
F20
4
6
4660
4608
4660
-14
Processing
happens one
instruction
after another
C00, C04…
12
Interrupt handling
Let’s 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 what’s needed to service the interrupt
probably 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”
BS2911 Week 12
14
Processor 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 processor’s 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 it’s not, you get a Program interrupt
» Storage key: lets you protect your code and data from being
overwritten by another task
BS2911 Week 12
15
Lifetime of a Process
User hits ENTER
On idle
queue
Task Created
User hits ENTER
On Ready
Queue
Executable Task
Dispatched
Nothing to do
Running
Finishes
Terminated
Time expires
Requeued
on Event
BS2911 Week 12
Maintain page tables to
access process’s memory,
though it’ll get paged out
Enters WAIT
Blocked
16
Access 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
Memory
CPU
Register
I/O bus
Register
Register
I/O Interface I/O Interface I/O Interface
cable
Device
BS2911 Week 12
Device
Device
17
More 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, O’Gorman)
» Virtual addressing allows separate memory for each process
» Idle processes don’t need to waste real memory
» A key area; make sure you understand it
BS2911 Week 12
18
Virtual 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 memory
using “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
BS2911 Week 12
19
Dynamic 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 page||offset-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 that’s a problem
BS2911 Week 12
20
Getting a byte in real memory
8F4 A10
Page
number
Offset in
page
A10
Virtual address
Relevant page frame
Page table
8F4
Addressed byte
contains real address
Real memory
BS2911 Week 12
Note this diagram
21
Distributed 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?
BS2911 Week 12
22
Goals 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
BS2911 Week 12
23
Review of Module – Networking
Network topologies – routing and Packet Switching
» Structure of the Internet
Play with the
The Layers of Networking
animations
» 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
BS2911 Week 12
24
The 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..)
Application
Presentation
(No Session)*
Transport
Network
Data Link
Router passes packets to Internet gateway
Gateway strips header addressing it, determines
Physical
next link on route to destination, calls Data link layer
and so on...
* If there is a session, it’s maintained by
BS2911 Week 12
the application, e.g. Skype or Messenger
25
Layer 2 – Data Link
Main task is Error Control
Early systems ECHOed every character (errors obvious)
» Now rely on more efficient error checking
» with Automatic Repeat requests
examples?
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 n+1
– 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 n+m
– In event of Nak, may request just the bad packet
or throw away all later packets and go round again
BS2911 Week 12
Play with the Animation
26
Ethernet
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 there’s 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
BS2911 Week 12
27
Over 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?
BS2911 Week 12
28
Hot 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-tocomputer
» Traditionally EDI over direct
connections
» Now largely switched to the
Internet
BS2911 Week 12
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
29
Voice 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
Today’s Public Network
» All Digital except “local loop” to subscribers
» Trunks (connections to PABXs) largely digital
Private networks mixed – Uni mainly digital
uses VoIP to support Basingstoke (integrated with data)
Cabling: Optical fibre long-distance; twisted pair local
» Little difference between twisted pair for analogue & digital
BS2911 Week 12
30
How 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 you’ve 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
BS2911 Week 12
31
Exam Structure
Part I – six out of ten short questions
» to check understanding of the technical part of the module
» carries 36% of the exam marks
» allow about 7 minutes for each question in Part I
Part II -- choose two questions out of four
» Each carries 32% of total marks (allow 30-35 minutes each)
» More open-ended to let you expand on your favoured topics
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
BS2911 Week 12
32