1 / 64

Section 6

Section 6. Further System Fundamentals. Stuff you need to know for SL. Diagram of CPU including control unit, ALU, address bus and memory (RAM) Machine instruction cycle: fetch, decode, execute and store

emiko
Download Presentation

Section 6

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Section 6 Further System Fundamentals

  2. Stuff you need to know for SL • Diagram of CPU including control unit, ALU, address bus and memory (RAM) • Machine instruction cycle: fetch, decode, execute and store • Definitions: Word, Register, Address. Be able to use these words in descriptions of the machine instruction cycle • You do not need to know specific registers

  3. Stuff you need to know for SL Word:A group of bits that can be addressed, transferred and manipulated as a single unit by the central processing unit. Register:A part of internal storage that has a specified storage capacity and is usually intended for a specific purpose. Address bus: Pathway from memory to processing unit that carries the address in memory to and from which data is transferred. Data bus:The pathway between the memory or peripheral and processing unit that carries data for processing or data that has been processed. ALU:Arithmetic Logic Unit. A part of the computer that performs arithmetic operations, logic operations and related operations. Fetch, decode, execute and store… Memory (RAM) CPU Control Unit Address bus Arithmetic Logic Unit (ALU) Data bus

  4. Stuff you need to know for HL • Processor diagram • Describe the functions of these registers in the fetch-execute cycle: • Accumulator • Instruction Register • Program Counter • Describe the function of an interrupt register • Describe how buses are used to link the CPU, RAM, ROM and cache

  5. Processor diagram Accumulator:A group of storage registers in the ALU that hold data temporarily while it is processed and before it is transferred to memory. Instruction Register: the part of a CPU's control unit that stores the instruction currently being executed or decoded. Program Counter:A register that holds the address of the next instruction to be fetched in the fetch execute cycle. Interrupt:A suspension of a process, such as the execution of a computer program, caused by an external event, performed in such a way that the process can be resumed. (An example might be a printer running out of paper. When this happens an interrupt is triggered which tells the CPU to stop what it's doing to alert the user about the printer problem.)

  6. Buses • Address bus: Pathway from memory to processing unit that carries the address in memory to and from which data is transferred. • Data bus: The pathway between the memory or peripheral and processing unit that carries data for processing or data that has been processed. • Control bus: The bus that carries commands to the CPU such as read/write.

  7. Task • On your own, decide in what order the following play their role in the fetch-execute cycle • Accumulator • Data bus • ALU • Instruction Register • Program Counter • Address bus • RAM • In pairs, take it in turns to describe the events that make up the machine instruction cycle, with reference to the above

  8. Past paperquestionanswer

  9. Past paper questionMay 2011 HL Paper 1

  10. Past paper question answer

  11. Resources • This is an interactive simulation of the fetch-execute cycle http://homepages.feis.herts.ac.uk/~msc_ice/fe2 • Wikipedia’s take http://en.wikipedia.org/wiki/Fetch-execute_cycle

  12. Section 6.2 Magnetic Disk Storage

  13. The disk drive (You don’t need to know this, but it provides a little context.)

  14. The disk • Track • Geometrical Sector (or “Zone”) • Sector • Cluster

  15. Data Access • Each sector is used to store a block of data. A block of data is typically 512 bytes, and a block represents the smallest unit that can be independently read from or written to. • When trying to access a particular block,Access Time = Latency + Seek Time + Transfer Time • Latency (rotational delay) – the time taken for the disk to spin round to the right sector • Seek time – the time taken for the read head to be moved to the correct track • Transfer Time – the time taken for the data to be read off the disk

  16. A word on fragmentation • Transfer rate can be influenced by fragmentation and the layout of the files. Defragmentation is a procedure used to minimize delay in retrieving data by moving related items to physically proximate areas on the disk. • In stark contrast to hard disk drives, flash memory-based solid state drives do not need defragmentation. The nature of recording information on flash memory wears it out over time, so any unnecessary writes to the SSD are bad. Since the data is accessed differently (solid state electronics compared to physical sectors on a disk) defragmentation is neither necessary nor desirable.

  17. Task • From memory, draw a plan view diagram of a magnetic disk, showing: • Track • Sector • Actuator arm • Read head • Annotate your drawing, providing definitions for the terms: • Block • Latency • Seek time • Transfer time

  18. Resources • A good article from Wikipedia on disk drive performance http://en.wikipedia.org/wiki/Disk_drive_performance_characteristics

  19. Section 6.3 Operating Systems

  20. You need to be able to… • Define Operating System • Explain the function of operating systems • Outline the functions of linker, loader and library manager • Operating System: Software that controls the execution of programs and that may provide services such as resource allocation, scheduling, input/output control, and data management. • How many operating systems can you name? Windows, Mac, Linux, Unix, OS/2, JavaOS, etc, etc

  21. Functions of Operating Systems • A collection of programs • Input/Output (IO) control • File management • Software/hardware interface • Memory management • User interface • Scheduling • Program execution control • Security

  22. Security features provided by operating sytems • User management: login with password • System of privileges, determining which user or process can do what, eg delete files, shut down the system, etc • Permissions for files and directories, eg read-only • Memory management: keeping one process’s memory space separate from another’s • Built-in firewall

  23. Memory Management • Multi-tasking environment: keeping the memory space of each process safe from other running processes • Multi-user environment: keeping the memory space (primary and secondary) of each user safe from other users • Allocating and deallocatingmemory for each process • Paging: Dividing virtual memory up into equal-sized blocks (pages) • Paging allows OSs to allocate non-contiguous chunks of memory to the same process, thus reducing fragmentation problems

  24. Memory Mangement: Virtual Memory • Virtual memory: The use of secondary memory as if it were primary memory • The OS make it easier for programs to reference memory because they don’t need to worry about the complications of the underlying physical structure of memory and disk

  25. Linkers, Loaders and Library Managers • A linker is a utility program that brings together the object modules, operating system routines and other utility software to produce a complete, executable program. • A loader is program that copies an object program held in memory into the memory area designated by the operating system for execution. • Many programming languages permit user-defined functions to be stored centrally and re-used in various programs. This central storage is called a “library”. A library manager is a utility program that catalogues, pre-compiles and links library modules.

  26. Section 6.4 Further Network Fundamentals

  27. Review of SL Material

  28. Network devices

  29. Client–Server Architecture Client (IB’s awful definition) Desktop computer or terminal used to access a computer-based system. Client-Server A network architecture in which a system is divided between server tasks performed on the instructions received from clients, requesting information. Client (better definition) A computer on a network that gains access to central data files, programs, and peripheral devices through a server. Server A program that provides services requested by client programs. A computer that provides services to another computer connected over a network.

  30. The Concept of a Server • Strictly, a serveris a piece of software that listens for client requests on a particular set of portsand responds to those requests • Like with “firewall”, the word “server” can refer to the software, or the hardwareon which the software is running • Almost always, a server is a dedicated machine that does nothing else • It’s just a computer with special modifications like extra processors, lots or RAM, huge storage capacity • It’s often big and flat so it can fit in a server rack • There are different types of server: file server, web server, database server, etc

  31. Peer-to-Peer • Every computer linked to every other • No server • Can be faster than client-server architecture, especially when special algorithms are used, e.g. torrenting • Less secure because services such as filtering, antivirus, firewalls are delegated to each peer

  32. The Concept of a Port • Port (IB definition): An access point for data entry or exit. • A port can either be hardware (the various sockets at the back of your PC, eg serial port, USB port), or it can be software, in which case it is a logical channel for data communication, identified by a number from 0-65536 (216) • Ports allow computers to decide which application should handle data received on a network, e.g. outgoing email runs on port 25, HTTP runs on port 80, FTP runs on port 20

  33. The Concept of a Firewall • A firewall is a program that restricts data allowed into and out of a network, on the basis of a set of rules • One of the ways it does this is to close certain ports • Try playing World of Warcraft using the school’s internet connection. You will fail. Why? Because the WoW software uses certain port numbers but the school’s firewall blocks traffic on those ports • The word “firewall” can refer to the software itself, or the hardware on which the software runs. Sometimes a firewall is a dedicated machine that does nothing else

  34. One of Facebook’s server rooms

  35. Do-it-yourself server This is an echo server written in Java. It listens for connections on port 4444. When it receives something, it just sends the same thing straight back to where it came from. import java.net.Socket; import java.net.ServerSocket; public class EchoServer { public static void main(String[] args) throws Exception { // create socket int port = 4444; ServerSocketserverSocket = new ServerSocket(port); System.err.println("Started server on port " + port); // repeatedly wait for connections, and process while (true) { // a "blocking" call which waits until a connection is requested Socket clientSocket = serverSocket.accept(); System.err.println("Accepted connection from client"); // open up IO streams In in = new In (clientSocket); Out out = new Out(clientSocket); // waits for data and reads it in until connection dies // readLine() blocks until the server receives a new line from client String s; while ((s = in.readLine()) != null) { out.println(s); } // close IO streams, then socket System.err.println("Closing connection with client"); out.close(); in.close(); clientSocket.close(); } } }

  36. The Concept of a Gateway • Gateway (IB definition): A link between two computer systems that converts data passing through into the formats needed for each system. • Generally a gateway is the word for a machine that connectstwo different networks, most often it sits between an organizational LAN and the internet • A gateway often performs security functions such as content filtering (e.g. blocking Facebook), email spam filtering, virus checking, etc

  37. The Concept of a Proxy • A proxyis a machine that brokersthe communication between two other machines • Only one machine in the school is connected to the internet: the web proxy • Test this by typing “What is my ip” in Google. You will get the same answer whatever school computer you use • When you request a web page, you in fact ask the proxy, and the proxy gets it from the web and gives it to you • Hence it can checkyou are not going to dodgy websites • A web proxy reduces the need for internet connections and allows securityfeatures, e.g. virus checking and content filtering, to be centralised for all users

  38. LANs and WANs • LAN: Local Area Network. A network of computers within a limited area such as a school or office • WAN: Wide Area Network. A network of computers ranging over an extended area and connecting users in a variety of geographical locations. WANs use a variety of technologies all at the same time, including dedicated “leased lines”, the public telephone system, satellites, the mobile network, etc

  39. The Role of Providers • Provider: Usually short for Internet Service Provider, a provider offers a number of internet-related services, such as: • access to the internet • email • website hosting • application/database hosting • There are different sizes of ISP and small ISPs will have their own, larger ISPs who provide them with services. • The biggest ISPs, who don't need their own ISP, are called Tier 1 Providers. • Providers offer different ways to connect to the internet depending on your speed and bandwidth requirements. • For remote customers, or customers where there is limited telephone system coverage, access may be offered by satellite. Dial-up ISDN ADSL T1 Gigabit Ethernet Fibre Optic Slow ----------------------- Medium ---------------------------- Fast

  40. Data transmission • Directions • Simplex: One-way, e.g. a radio broadcast • Half-duplex: Two-way, but not at the same time, e.g. walkie-talkie • Full-duplex: Two-way, and at the same time, e.g. telephone • Speed measure in bps (bits per second) not Bps (bytes per second) • Dial-up is slow at around 56 kbps • Broadband is faster – currently up to around 10 mbps • WiFi is wireless broadband but fairly short range • WiMax is higher bandwidth and longer range wireless • Nice article here: Wikipedia – Internet Access

  41. ADSL • Asymmetric Digital Subscriber Line • Asymmetric because you can download much faster than you can upload • Carried over a normal telephone line but at such high frequencies that it is separable from voice • Hence ADSL can be used at the same time as voice, unlike a dial-up connect, which hogs the line • It uses the POTS (Plain Old Telephone System) to carry a digital signal, unlike an dial-up modem, which is analogue • So it's a myth that the telephone system is analogue – it can carry analogue (voice) and digital (data) at the same time, just like the TV signal, which used to be analogue and is now digital • Analogue signals are created by smoothly varying voltages; digital signals are created by abrupt step-changes in voltage. Same medium, different signals.

  42. Packet Switching vs Circuit Switching Packet switched communication • Data broken into small packets (e.g. 64kb maximum for IP) • Packets may take totally different routes to their destination • Packets reassembled and sequenced at destination into coherent data • Example: Internet Circuit switched communication • Dedicated channel established between both parties • Data sent in one go, in order, and received likewise

  43. Advantages of Packet Switching • Full use of available bandwidth. In a telephone call (circuit switched) even if both parties are saying nothing, the channel is still established and nobody else can use the available bandwidth. With packet switching, the instant my data has been sent, the bandwidth is free to be used by other parties. (Imagine chatting on Facebook: It may seem like messages are going backwards and forwards constantly, but in fact your computer is spending 99.9% of its time waiting for you to finish typing, and only 0.1% of it's time actually sending your messages.) • More secure, because it's difficult to intercept packets that are taking different routes across the network. • Devices of different speeds can communicate easily. In circuit-switched networks both parties have to agree to communicate at the speed of the slower party. • Resilient to communications hardware failure. If one channel goes down, packets will just take a different route. In circuit-switched networks, loss of a channel can mean no communication is possible at all. • Nice link here.

  44. Protocols • Protocol: An internationally agreed set of rules to ensure transfer of data between devices. A standard protocol is one that is recognized as the standard for a specific type of transfer. • Data is just a huge sequence of 1's and 0's – a protocol is an agreed way of deciding what it all means • For example, the first 32 bits might encode the address of the sender, the next 32 bits encode the address of the receiver, etc • Examples are: • HTTP (Hypertext Transfer Protocol): for sending and receiving web pages • TCP (Transmission Control Protocol): for making sure that data packets get received and sequenced properly • IP (Internet Protocol): for making sure that data sent across a network gets to the right host (computer)

  45. Causing a Protocol Error • ASCII is an example of an extremely simple protocol • Bits are interpreted in groups of 8 and each group corresponds to a character, e.g. 01000001 = “A” and 00111111 = “?” • A protocol error occurs when the receiver interprets data using the wrong protocol and ends up with total nonsense • You are now ready to cause your own protocol error: • Open up Windows notepad • Choose File, Open (select All Files) • Open up an image file (gif, jpeg, png, etc) • Notepad will dutifully interpret the file as text, and you will end up with meaningless junk • This is essentially a protocol error

  46. Structure of an IP Packet

  47. Handshaking • Handshaking (IB definition): The exchange of predetermined signals when a connection is established between two devices or components. • The process of by which two devices on a network agree upon which protocol they are going to use for their communication. • A good example is dial-up modems, which have to decide what rate data will be sent at, what checks will be done, etc. Have you ever heard the “squealing” an acoustic modem makes when it first connects? That is in fact the handshaking procedure.

  48. Network Security • Usernames identify, passwords authenticate • Other authentication methods: fingerprints, retinal scan • Access control: read, write, delete, etc – different user types with different privileges • Antivirus • Back-up • Firewall • Physical measures, e.g. walls, doors, locks

  49. Section 6.5 Communication with Peripherals

  50. Issues with Peripherals • Peripheral device: Any device that can communicate with a particular computer, for example: modems, hard drives, printers. • The issue with hardware peripherals is this: How does the peripheral get the CPU's attention when it's done what it's supposed to have done? There are three answers: • (Hardware) Interrupt • Polling • DMA (Direct Memory Access)

More Related