Tufts COMP 150-IDS Test #1
|
|
- Lee Douglas
- 6 years ago
- Views:
Transcription
1 October 3, 2012 Student name: Login: Tufts COMP 150-IDS Test #1 This test is closed book. In most cases, answers of no more than 2-3 sentences should be sufficient. If you need more space or need to cross out and re-do, you may attach additional sheets of paper. Answers are shown like this. In some cases, these provide more detail than is necessary for full credit. In cases where there s likely to be confusion about what s most important, some key points we re looking for are highlighted like this. TCP/IP 1a. (5 points) Briefly explain the difference between TCP and UDP. What service does each provide? What is similar about them and what is different? TCP and UDP are both user-level protocols intended for communicating between programs (as opposed to hosts). Both use (IP-Address:port) pairs for addressing. UDP provides an unreliable datagram service. Individual packets are checksummed and their length is preserved, but packets can be lost or reordered. TCP provides a reliable stream service transmitting bi-directional ordered octet (byte) streams. Message boundaries are not preserved. 1b. (5 points) In most cases, queries for DNS name lookup are implemented using UDP. Explain why this is a better choice than TCP. DNS host name lookup messages are short and idempotent, and performance is important. If TCP were used, then extra IP packets would be sent to set up and maintain the connections. With UDP, the typical lookup is one packet outbound, and one packet for the response. If no response is received, the entire request is resent. 1
2 1c. (3 points) Comparing IP and UDP: what is the relationship between them, what is similar about them, and what is different? IP is the packet service provided by the Internet. IP packets are addressed to a host (IP address). Headers of IP packets are checksummed but contents are not. UDP is a user-level datagram built using IP, and addressed to a host/port (IP address/port) pair, and designed for program-to-program communication. See 1a for more details. Idempotence 2a. (5 points) What is the difference between an operation that is idempotent and one that is not? Idempotent operations yield the same results when executed multiple times. Non-idempotent operations need not. Usually, we slightly loosen this to include cases where reads are attempted against data that varies with time, as long as we are happy to get the latest answer. Informally, idempotent operations are safe to retry; non-idempotent operations typically are not. 2
3 2. (5 points total) Sometimes designers have the opportunity to choose between making an operation idempotent and designing it in some other way. Briefly explain two advantages of using idempotent operations: 2b. (3 points) Advantage #1: As discussed above in the answer to 1b, idempotent operations can usually be implemented with simple, high-performance datagram protocols. 2c. (2 points) Advantage #2: Idempotent operations can be easier to reason about. Proving the correctness of a system with idempotent operations is often much easier than proving correctness of a more complex system. Some other answers may be accepted too. 3
4 Metcalfe s Law 3. (5 points) Metcalfe s law suggest that, for a given number of nodes, one single network is more valuable than two smaller ones. Why? (I.e. where does the additional value come from?) Metcalfe s Law posits that the value of a network grows in proportion to the number of point-to-point connections that can be made, and that number grows as the square of the number of nodes. Since the growth is much faster than linear, a single large network has more value. To justify this with an example: if we had separate Webs for Europe and for the US, we would lose the value of all the links that could have been made between resources on the two continents. Text formats, Binary Formats, HTML & Metcalfe's law 4. (17 points total) Background: When Tim Berners-Lee designed the HTML document format he chose to make it a text file rather than binary and he allowed for extensible structured markup. That is, he defined an initial set of tags such as <p> and he also provided rules that would allow for additional tags to be added in the future. These four questions ask you to describe how these design decisions were motivated in part by Metcalfe's law and to explore some related trade-offs: 4a. (4 points 2 points for 1 st reason, one each for two more) Briefly explain how the decision to use text rather than binary for HTML relates to Metcalfe's law (give at least 3 reasons) If we believe Metcalfe s Law, then the Web grows in value as more documents are added and linked. Using a text based format encourages such growth in a number of ways: A very wide range of tools can edit and create HTML (e.g. Emacs, Vim, Notepad) 4
5 View source allows users to learn how to write HTML Text-based formats are platform independent, so HTML is easy to share across platforms It is relatively easy to use a wide range of programming languages and tools to write and read HTML (cout, printf, etc.) Etc., etc. (Any three of these earns full credit) 4b (4 points 2 for each) List two disadvantages of using text-based formats: 1. Text formats tend to waste space 2. Text formats can be slow to parse 3. It can be difficult to host more complex datatypes in HTML (imagine trying to include a photograph directly in an HTML file as opposed to linking to a JPEG) (Any two of these earns full credit) 4c. (5 points) The choice to use a text vs. a binary format sometimes depends on whether all the communicating computers use the same machine architecture. Describe an optimization that s available when transmitting structured binary information between between compatible computers, and explain why this technique may be more difficult to use when sending messages between machines with different architectures. Define your message format as a C struct and send the bytes through the wire. The language will help you to set fields very efficiently, and no parsing is needed at the receiving end. 5
6 On incompatible machines, byte order for types like integers may be different, and structure packing rules also vary from one compiler or target machine to another. 4d. (4 points) Briefly explain how the decision provide extensible structured markup in HTML relates to Metcalfe's law: The use of explicit markup allows HTML to deal well with many real-world documents such as those typically created in applications like MS Word. The extensibility of the tag space means that HTML itself can grow as needs change. Many current users of the Web miss the fact that the original HTML had no <img> tag, and that several proposals for how to do images competed before the <img> tag we all use emerged as the consensus solution. 6
7 Mixed Content 5a. (8 points) All of the following are valid fragments of HTML. Which of the following is an example of mixed content (put a check mark near each one that is mixed, leave others unchecked): <div><p>some divs </p><p> have lots of paragraphs!</p></div> <ul><li>i ve got</li><li>a little list</li></li> <p>this one looks simple, and it is!</p> _X_ <h1><style= color:red >Very<style> interesting heading</h1> _ X_ <style= font-weight:bold >Very<style> interesting but not a heading <h2 style= font-style:italic >Looks like we didn t like the default heading style</h2> <em>nice weather we re having</em> Nice weather we re having 5b (2 points) Describe one disadvantage of supporting mixed content in a document format : Mixed content strings tend to be difficult to process in traditional programming languages 7
8 The End-to-End Principle 6. (15 points) Like many graduates of COMP 150 IDS, Mary got a job working on an exciting distributed system and was soon promoted from programmer to lead architect. Two members of her team, Bob and Ted, have come to her office with a design question. Their system requires that data be transmitted through a network, and the typical path involves multiple hops. Bob and Ted have a disagreement about the implications of the end-to-end principle: Bob says that the end-to-end principle means that checks have to be put at the endpoints to ensure correctness, and that any other checks done within the network will make the system run slower. Ted agrees that checking must be done at the endpoints to ensure success, but he says that additional checks on individual links will improve the performance of the system. Based on what she has learned in comp 150 IDS, Mary is able to tell Bob and Ted either that one of them is always right, or that who is right depends on getting additional information about the network and the application. If either Bob or Ted is always right, then identify who is and carefully explain why. If the answer depends on having additional information, then explain exactly what additional information is needed, and as specifically as you can predict based on that additional information when the additional checks will lead to faster performance. (Correctly telling us Bob/Ted/need-more-info will earn you 3 points; giving a good explanation of why will earn you the additional 12 points.) Mary should tell her team that the answer depends on several factors: How long it takes to do an end-to-end recovery How frequently errors occur on individual links How much overhead is added to the protocol by implementing the link-level recover (presumably, extra acknowledgement packets are needed, and senders may need to store sent packets until it s confirmed that they have indeed made it to the next node) If failures are very rare and the time to recover end-to-end is small, then link-level checking may not be worthwhile; if link-level errors are common 8
9 and the time for end-to-end recovery large, then retrying at the link level is almost surely worthwhile. Model/View Separation 7. (12 points total) BACKGROUND FOR QUESTIONS 7a and 7b: In the early versions of HTML, information about styling was often included directly on element attributes. For example, this is a slightly simplified version of a sample element included in the early HTML 3.2 specification : <body bgcolor=white text=black> As we discussed in class, HTML uses are now encouraged to specify such styling information separately, typically using CSS. 7a. points 4 points for first reason, 2 for second) List two ways in which this change has made HTML a more powerful system for publishing information on the web. 1. It is easy to share a common style or theme across multiple documents. Indeed, this technique is commonly used to achieve a consistent look and feel for a whole Web site or family of documents. 2. It is relatively easy to update the style of multiple documents that share common style sheets 3. Sometimes, but not always, mixing style information with data can make it harder to extract and manipulate the data ( Two of the three are needed for full credit. The third is less clear cut than the other two, but will be accepted as an answer for full credit. 9
10 7b. (6 points 4 for one correct, 6 for both) List two disadvantages of separating content from style in this way? 1. Very often one wants to tune the look of a document at the same time that one updates the content. Separating the styling means that stylesheets and content must both be edited. 2. The document is no longer self-contained. If you want to send it to someone else and have it look the same, you need both the stylesheet and the content. 3. As we discussed in class, there are cases in which changing the stylesheet can effectively alter the content of a document. For example, if a document had the string: I hereby agree to this contract and a stylesheet changes the font color to white (the background color), it may not be clear that the contract has been accepted. (Any two answers gets full credit) 10
11 Exception Handling #include <string> #include <iostream> using namespace std; class Except { public: void printmsg() { cout << "Except::printMsg() called" << endl; } }; class OtherExcept { public: void printmsg() { cout << "OtherExcept::printMsg() called" << endl; } }; void function2() { cout << "Function 2 entered" << endl; throw OtherExcept(); cout << "Leaving function 2" << endl; } void function1() { cout << "Function 1 entered" << endl; function2(); throw Except(); cout << "Leaving function 1" << endl; } // // Main program // int main (int argc, char *argv[]) { try { function1(); } catch (OtherExcept e) { e.printmsg(); }catch (Except e) { e.printmsg(); } cout << "All done!" << endl; } 11
12 8a (5 points). What will the program output? (Hint: the two catch blocks work as you d expect: each catches the corresponding named error) Function 1 entered Function 2 entered OtherExcept::printMsg() called All done! 8b. (6 points) Unix I/O system calls use return values to reflect error conditions to the calling program; some other systems use exceptions, such as the ones shown above. Why are exceptions particularly useful for networking code? Errors are relatively common when attempting network operations, and very often the appropriate recovery strategy is common across multiple operations. For example, one might have many different lines of code sending packets to attempt to copy a file. It might be that the recovery strategy for any network error is to retry the entire transfer. With return codes, checking must be done after each operation; that checking code is repetitive and may need to be updated in many places if strategies change. Exceptions let us keep most of the code clean, by putting the recovery in one place. In languages like C++, exception handling automatically calls the destructors of variables that go out of scope (automatic variables declared within methods or functions that we re blasting out of). Overall, exceptions tend support organized strategies for recovering at a higher level. 12
13 Open Source and Open Standards 9a. (3 points) What is the difference between open source and open standards? An open standard is typically a specification that is offered with few if any legal or financial impediments to implementation. Many of the most important open standards are designed to be usable on a wide variety of systems, and possibly to support interoperation across diverse systems. Open source is an implementation made available in source form (possibly along with binaries), To be open source, the system must be provided for free, and with minimal restrictions on adaptation and reuse (the details of just how minimal these restrictions must be have been debated for years). 9b. (5 points) Explain why open source and open standards are important to the Web. Which approach is used for what purposes? The Web is fundamentally set down as open standards for URIs, HTTP, HTML, and many related technologies. If you can implement these in your own code, you can be part of the Web! Open source implementations like Firefox and Apache are very useful in saving everyone from writing their own implementations, and also in making widely available implementations that conform to the standards. Since other implementations, including closed source ones will need to interoperate with these, the open source tends to support and protect the open standards! 13
Introduction to TCP/IP
COMP 150-IDS: Internet Scale Distributed Systems (Spring 2016) Introduction to TCP/IP Noah Mendelsohn Tufts University Email: noah@cs.tufts.edu Web: http://www.cs.tufts.edu/~noah Copyright 2012, 2015 &
More informationCS 43: Computer Networks The Link Layer. Kevin Webb Swarthmore College November 28, 2017
CS 43: Computer Networks The Link Layer Kevin Webb Swarthmore College November 28, 2017 TCP/IP Protocol Stack host host HTTP Application Layer HTTP TCP Transport Layer TCP router router IP IP Network Layer
More information14-740: Fundamentals of Computer and Telecommunication Networks
14-740: Fundamentals of Computer and Telecommunication Networks Fall 2018 Quiz #2 Duration: 75 minutes ANSWER KEY Name: Andrew ID: Important: Each question is to be answered in the space provided. Material
More informationThese are notes for the third lecture; if statements and loops.
These are notes for the third lecture; if statements and loops. 1 Yeah, this is going to be the second slide in a lot of lectures. 2 - Dominant language for desktop application development - Most modern
More informationCA341 - Comparative Programming Languages
CA341 - Comparative Programming Languages David Sinclair Dynamic Data Structures Generally we do not know how much data a program will have to process. There are 2 ways to handle this: Create a fixed data
More informationProgrammation système
Programmation système Problems Problem 1 - Message from ATM to Server Message name HELLO {userid} PASSWORD {password} BALANCE WITHDRAWAL {amount} Purpose Let server know that there is a card in the ATM
More informationCS 5520/ECE 5590NA: Network Architecture I Spring Lecture 13: UDP and TCP
CS 5520/ECE 5590NA: Network Architecture I Spring 2008 Lecture 13: UDP and TCP Most recent lectures discussed mechanisms to make better use of the IP address space, Internet control messages, and layering
More informationLab 2: Implementing a Reliable Transport Protocol (30 points)
Lab 2: Implementing a Reliable Transport Protocol (30 points) Overview In this laboratory programming assignment, you will be writing the sending and receiving transport-level code for implementing a simple
More informationCPSC156a: The Internet Co-Evolution of Technology and Society. Lecture 4: September 16, 2003 Internet Layers and the Web
CPSC156a: The Internet Co-Evolution of Technology and Society Lecture 4: September 16, 2003 Internet Layers and the Web Layering in the IP Protocols HTTP (Web) Telnet Domain Name Service Simple Network
More informationProgram Organization and Comments
C / C++ PROGRAMMING Program Organization and Comments Copyright 2013 Dan McElroy Programming Organization The layout of a program should be fairly straight forward and simple. Although it may just look
More informationNaming System Design Tradeoffs
COMP 117: Internet Scale Distributed Systems (Spring 2018) Naming System Design Tradeoffs Noah Mendelsohn Tufts University Email: noah@cs.tufts.edu Web: http://www.cs.tufts.edu/~noah Copyright: 2012, 2013,
More informationWeek 2 / Paper 1. The Design Philosophy of the DARPA Internet Protocols
Week 2 / Paper 1 The Design Philosophy of the DARPA Internet Protocols David D. Clark ACM CCR, Vol. 18, No. 4, August 1988 Main point Many papers describe how the Internet Protocols work But why do they
More informationCS140 Operating Systems and Systems Programming
CS140 Operating Systems and Systems Programming Final Exam. Summer 2006. By Adam L Beberg. Given August 19th, 2006. Total time = 3 hours, Total Points = 335 Name: (please print) In recognition of and in
More informationExternal Data Representation (XDR)
External Data Representation (XDR) Prof. Chuan-Ming Liu Computer Science and Information Engineering National Taipei University of Technology Taipei, TAIWAN NTUT, TAIWAN 1 Introduction This chapter examines
More informationNon-numeric types, boolean types, arithmetic. operators. Comp Sci 1570 Introduction to C++ Non-numeric types. const. Reserved words.
, ean, arithmetic s s on acters Comp Sci 1570 Introduction to C++ Outline s s on acters 1 2 3 4 s s on acters Outline s s on acters 1 2 3 4 s s on acters ASCII s s on acters ASCII s s on acters Type: acter
More informationCOMP 117: Internet-scale Distributed Systems Lessons from the World Wide Web
COMP 117: Internet Scale Distributed Systems (Spring 2018) COMP 117: Internet-scale Distributed Systems Lessons from the World Wide Web Noah Mendelsohn Tufts University Email: noah@cs.tufts.edu Web: http://www.cs.tufts.edu/~noah
More informationREVIEW. The C++ Programming Language. CS 151 Review #2
REVIEW The C++ Programming Language Computer programming courses generally concentrate on program design that can be applied to any number of programming languages on the market. It is imperative, however,
More informationNetworking and Internetworking 1
Networking and Internetworking 1 Today l Networks and distributed systems l Internet architecture xkcd Networking issues for distributed systems Early networks were designed to meet relatively simple requirements
More informationMetcalfe s Law : Why is the Web so Big?
COMP 117: Internet Scale Distributed Systems (Spring 2018) Metcalfe s Law : Why is the Web so Big? Noah Mendelsohn Tufts University Email: noah@cs.tufts.edu Web: http://www.cs.tufts.edu/~noah Copyright
More informationProgramming Assignment 5: Implementing a Reliable Transport Protocol
Programming Assignment 5: Implementing a Reliable Transport Protocol Overview In this laboratory programming assignment, you will be writing the sending and receiving transport-level code for implementing
More informationUDP: Datagram Transport Service
UDP: Datagram Transport Service 1 Topics Covered Introduction Transport Protocols and End-to-End Communication The User Datagram Protocol The Connectionless Paradigm Message-Oriented Interface UDP Communication
More informationUDP and TCP. Introduction. So far we have studied some data link layer protocols such as PPP which are responsible for getting data
ELEX 4550 : Wide Area Networks 2015 Winter Session UDP and TCP is lecture describes the two most common transport-layer protocols used by IP networks: the User Datagram Protocol (UDP) and the Transmission
More informationWEB TECHNOLOGIES CHAPTER 1
WEB TECHNOLOGIES CHAPTER 1 WEB ESSENTIALS: CLIENTS, SERVERS, AND COMMUNICATION Modified by Ahmed Sallam Based on original slides by Jeffrey C. Jackson THE INTERNET Technical origin: ARPANET (late 1960
More informationCSCI S-Q Lecture #12 7/29/98 Data Structures and I/O
CSCI S-Q Lecture #12 7/29/98 Data Structures and I/O Introduction The WRITE and READ ADT Operations Case Studies: Arrays Strings Binary Trees Binary Search Trees Unordered Search Trees Page 1 Introduction
More informationHow the Web Works. Chapter 1. Modified by Marissa Schmidt Pearson
How the Web Works Chapter 1 Modified by Marissa Schmidt 2015 Pearson Fundamentals ofhttp://www.funwebdev.com Web Development Objectives 1 Definitions and History 2 Internet Protocols 3 Client-Server Model
More informationCSE 333 Final Exam June 6, 2017 Sample Solution
Question 1. (24 points) Some C and POSIX I/O programming. Given an int file descriptor returned by open(), write a C function ReadFile that reads the entire file designated by that file descriptor and
More informationNetwork Layer (1) Networked Systems 3 Lecture 8
Network Layer (1) Networked Systems 3 Lecture 8 Role of the Network Layer Application Application The network layer is the first end-to-end layer in the OSI reference model Presentation Session Transport
More informationPointers and References
Steven Zeil October 2, 2013 Contents 1 References 2 2 Pointers 8 21 Working with Pointers 8 211 Memory and C++ Programs 11 212 Allocating Data 15 22 Pointers Can Be Dangerous 17 3 The Secret World of Pointers
More informationIntrusion Prevention System Performance Metrics
White Paper Intrusion Prevention System Performance Metrics The Importance of Accurate Performance Metrics Network or system design success hinges on multiple factors, including the expected performance
More informationCS201 - Introduction to Programming Glossary By
CS201 - Introduction to Programming Glossary By #include : The #include directive instructs the preprocessor to read and include a file into a source code file. The file name is typically enclosed with
More informationProgrammazione. Prof. Marco Bertini
Programmazione Prof. Marco Bertini marco.bertini@unifi.it http://www.micc.unifi.it/bertini/ Hello world : a review Some differences between C and C++ Let s review some differences between C and C++ looking
More informationLecture (11) OSI layer 4 protocols TCP/UDP protocols
Lecture (11) OSI layer 4 protocols TCP/UDP protocols Dr. Ahmed M. ElShafee ١ Agenda Introduction Typical Features of OSI Layer 4 Connectionless and Connection Oriented Protocols OSI Layer 4 Common feature:
More informationCSE434 Computer Networks (FALL, 2009) Programming Assignment 3 Due: Wed, December 2, 2009
CSE434 Computer Networks (FALL, 2009) Programming Assignment 3 Due: Wed, December 2, 2009 Submission Procedure: No late submissions will be accepted. Submit a softcopy before the class to su.kim.asu@gmail.com.
More informationCS3157: Advanced Programming. Outline
CS3157: Advanced Programming Lecture #12 Apr 3 Shlomo Hershkop shlomo@cs.columbia.edu 1 Outline Intro CPP Boring stuff: Language basics: identifiers, data types, operators, type conversions, branching
More informationprecise rules that govern communication between two parties TCP/IP: the basic Internet protocols IP: Internet protocol (bottom level)
Protocols precise rules that govern communication between two parties TCP/IP: the basic Internet protocols IP: Internet protocol (bottom level) all packets shipped from network to network as IP packets
More informationWeb Engineering (CC 552)
Web Engineering (CC 552) Introduction Dr. Mohamed Magdy mohamedmagdy@gmail.com Room 405 (CCIT) Course Goals n A general understanding of the fundamentals of the Internet programming n Knowledge and experience
More informationPatterns: Working with Arrays
Steven Zeil October 14, 2013 Outline 1 Static & Dynamic Allocation Static Allocation Dynamic Allocation 2 Partially Filled Arrays Adding Elements Searching for Elements Removing Elements 3 Arrays and Templates
More informationTransport Layer. The transport layer is responsible for the delivery of a message from one process to another. RSManiaol
Transport Layer Transport Layer The transport layer is responsible for the delivery of a message from one process to another Types of Data Deliveries Client/Server Paradigm An application program on the
More informationBasic memory model Using functions Writing functions. Basics Prototypes Parameters Return types Functions and memory Names and namespaces
Basic memory model Using functions Writing functions Basics Prototypes Parameters Return types Functions and memory Names and namespaces When a program runs it requires main memory (RAM) space for Program
More informationShort Notes of CS201
#includes: Short Notes of CS201 The #include directive instructs the preprocessor to read and include a file into a source code file. The file name is typically enclosed with < and > if the file is a system
More informationConnectionless and Connection-Oriented Protocols OSI Layer 4 Common feature: Multiplexing Using. The Transmission Control Protocol (TCP)
Lecture (07) OSI layer 4 protocols TCP/UDP protocols By: Dr. Ahmed ElShafee ١ Dr. Ahmed ElShafee, ACU Fall2014, Computer Networks II Introduction Most data-link protocols notice errors then discard frames
More informationb) Diverse forms of physical connection - all sorts of wired connections, wireless connections, fiber optics, etc.
Objectives CPS221 Lecture: Layered Network Architecture last revised 6/22/10 1. To discuss the OSI layered architecture model 2. To discuss the specific implementation of this model in TCP/IP Materials:
More informationBirkbeck (University of London)
Birkbeck (University of London) MSc Examination for Internal Students School of Computer Science and Information Systems Internet and Web Technologies () Credit Value: 15 Date of Examination: Monday 1
More informationCMPE150 Midterm Solutions
CMPE150 Midterm Solutions Question 1 Packet switching and circuit switching: (a) Is the Internet a packet switching or circuit switching network? Justify your answer. The Internet is a packet switching
More informationPIC 10A Objects/Classes
PIC 10A Objects/Classes Ernest Ryu UCLA Mathematics Last edited: November 13, 2017 User-defined types In C++, we can define our own custom types. Object is synonymous to variable, and class is synonymous
More informationIP Address Assignment
IP Address Assignment An IP address does not identify a specific computer. Instead, each IP address identifies a connection between a computer and a network. A computer with multiple network connections
More informationCPS221 Lecture: Layered Network Architecture
CPS221 Lecture: Layered Network Architecture Objectives last revised 9/8/14 1. To discuss the OSI layered architecture model 2. To discuss the specific implementation of this model in TCP/IP Materials:
More informationThe Client Server Model and Software Design
The Client Server Model and Software Design Prof. Chuan-Ming Liu Computer Science and Information Engineering National Taipei University of Technology Taipei, TAIWAN MCSE Lab, NTUT, TAIWAN 1 Introduction
More informationReview. Modules. CS 151 Review #6. Sample Program 6.1a:
Review Modules A key element of structured (well organized and documented) programs is their modularity: the breaking of code into small units. These units, or modules, that do not return a value are called
More informationECE4110 Internetwork Programming. Introduction and Overview
ECE4110 Internetwork Programming Introduction and Overview 1 EXAMPLE GENERAL NETWORK ALGORITHM Listen to wire Are signals detected Detect a preamble Yes Read Destination Address No data carrying or noise?
More informationCPSC 441 COMPUTER NETWORKS MIDTERM EXAM
CPSC 441 COMPUTER NETWORKS MIDTERM EXAM Department of Computer Science University of Calgary Professor: Carey Williamson March 7, 2018 This is a CLOSED BOOK exam. Textbooks, notes, laptops, personal digital
More informationThere are, of course, many other possible solutions and, if done correctly, those received full credit.
Question 1. (20 points) STL. Complete the function ChangeWords below. This function has as inputs a vector of strings, and a map of key-value pairs. The function should return a new vector
More informationRandall Stewart, Cisco Systems Phill Conrad, University of Delaware
SCTP: An Overview Randall Stewart, Cisco Systems Phill Conrad, University of Delaware 1 Our Objectives Be able to explain what SCTP is, and what its major features are when and why you might use it (instead
More informationCSE 333 Lecture C++ final details, networks
CSE 333 Lecture 19 -- C++ final details, s Steve Gribble Department of Computer Science & Engineering University of Washington Administrivia HW3 is due in 5 days! - we re up to 6 bugs for you to patch
More informationROUNDING ERRORS LAB 1. OBJECTIVE 2. INTRODUCTION
ROUNDING ERRORS LAB Imagine you are traveling in Italy, and you are trying to convert $27.00 into Euros. You go to the bank teller, who gives you 20.19. Your friend is with you, and she is converting $2,700.00.
More informationScientific Computing
Scientific Computing Martin Lotz School of Mathematics The University of Manchester Lecture 1, September 22, 2014 Outline Course Overview Programming Basics The C++ Programming Language Outline Course
More informationLab 1 - Reliable Data Transport Protocol
Lab 1 - Reliable Data Transport Protocol Handout: March 8, 2018 Deadline: March 18 23:00, 2018 (No extension) Assignment overview: In this assignment, you will be implementing the sending and receiving
More informationConcept Questions Demonstrate your knowledge of these concepts by answering the following questions in the space that is provided.
223 Chapter 19 Inter mediate TCP The Transmission Control Protocol/Internet Protocol (TCP/IP) suite of protocols was developed as part of the research that the Defense Advanced Research Projects Agency
More informationCSC 533: Organization of Programming Languages. Spring 2005
CSC 533: Organization of Programming Languages Spring 2005 Language features and issues variables & bindings data types primitive complex/structured expressions & assignments control structures subprograms
More informationCS164 Final Exam Winter 2013
CS164 Final Exam Winter 2013 Name: Last 4 digits of Student ID: Problem 1. State whether each of the following statements is true or false. (Two points for each correct answer, 1 point for each incorrect
More informationIntroduction to the TCP/IP protocol suite
Introduction to the TCP/IP protocol suite slide 1 TCP/IP has been around for longer than the ISO OSI 7 layer model the ISO OSI 7 layer model is useful as a reference model for explaining the function of
More informationQuestion Score 1 / 19 2 / 19 3 / 16 4 / 29 5 / 17 Total / 100
NAME: Login name: Computer Science 461 Midterm Exam March 10, 2010 3:00-4:20pm This test has five (5) questions. Put your name on every page, and write out and sign the Honor Code pledge before turning
More informationCE221 Programming in C++ Part 2 References and Pointers, Arrays and Strings
CE221 Programming in C++ Part 2 References and Pointers, Arrays and Strings 19/10/2017 CE221 Part 2 1 Variables and References 1 In Java a variable of primitive type is associated with a memory location
More informationLecture (03) Network Model
١ Lecture (03) Network Model By: Dr. Ahmed ElShafee Agenda Layering concept History Discovering the network layers Application Layer same layer interaction concept; Transport Layer Adjacent layer interaction
More informationFast Introduction to Object Oriented Programming and C++
Fast Introduction to Object Oriented Programming and C++ Daniel G. Aliaga Note: a compilation of slides from Jacques de Wet, Ohio State University, Chad Willwerth, and Daniel Aliaga. Outline Programming
More informationAnnouncements Computer Networking. What was hard. Midterm. Lecture 16 Transport Protocols. Avg: 62 Med: 67 STD: 13.
Announcements 15-441 Computer Networking Lecture 16 Transport Protocols Mid-semester grades Based on (ckpt 1 & ckpt2) + midterm + HW1 + HW2 NOTE: GRADES DO NOT REFLECT LATE PENALTIES! 25.4% of class If
More informationChapter 2 Basic Elements of C++
C++ Programming: From Problem Analysis to Program Design, Fifth Edition 2-1 Chapter 2 Basic Elements of C++ At a Glance Instructor s Manual Table of Contents Overview Objectives s Quick Quizzes Class Discussion
More informationISO OSI 7 Layer model and the TCP/IP protocol stack. Introduction to the TCP/IP protocol suite. Networking Glossary
slide Introduction to the TCP/IP protocol suite slide 2 ISO OSI 7 Layer model and the TCP/IP protocol stack TCP/IP has been around for longer than the ISO OSI 7layer model there is not an exact match between
More informationThe sequence of steps to be performed in order to solve a problem by the computer is known as an algorithm.
CHAPTER 1&2 OBJECTIVES After completing this chapter, you will be able to: Understand the basics and Advantages of an algorithm. Analysis various algorithms. Understand a flowchart. Steps involved in designing
More informationIP Packet Switching. Goals of Todayʼs Lecture. Simple Network: Nodes and a Link. Connectivity Links and nodes Circuit switching Packet switching
IP Packet Switching CS 375: Computer Networks Dr. Thomas C. Bressoud Goals of Todayʼs Lecture Connectivity Links and nodes Circuit switching Packet switching IP service model Best-effort packet delivery
More informationInteractive Graphical Systems HT2006
HT2006 Networked Virtual Environments Informationsteknologi 2006-09-26 #1 This Lecture Background and history on Networked VEs Fundamentals (TCP/IP, etc) Background and history on Learning NVEs Demo of
More informationCpt S 122 Data Structures. Introduction to C++ Part II
Cpt S 122 Data Structures Introduction to C++ Part II Nirmalya Roy School of Electrical Engineering and Computer Science Washington State University Topics Objectives Defining class with a member function
More informationBCS THE CHARTERED INSTITUTE FOR IT. BCS HIGHER EDUCATION QUALIFICATIONS BCS Level 5 Diploma in IT. March 2017 PRINCIPLES OF INTERNET TECHNOLOGIES
General Comments BCS THE CHARTERED INSTITUTE FOR IT BCS HIGHER EDUCATION QUALIFICATIONS BCS Level 5 Diploma in IT March 2017 PRINCIPLES OF INTERNET TECHNOLOGIES EXAMINERS REPORT This year there was an
More informationCOMP750. Distributed Systems. Network Overview
COMP750 Distributed Systems Network Overview Network Standards The purpose of a network is to allow two computers to communicate. Ex: The electrical power network in North America follows a standard to
More informationContinuous Real Time Data Transfer with UDP/IP
Continuous Real Time Data Transfer with UDP/IP 1 Emil Farkas and 2 Iuliu Szekely 1 Wiener Strasse 27 Leopoldsdorf I. M., A-2285, Austria, farkas_emil@yahoo.com 2 Transilvania University of Brasov, Eroilor
More information6. Pointers, Structs, and Arrays. 1. Juli 2011
1. Juli 2011 Einführung in die Programmierung Introduction to C/C++, Tobias Weinzierl page 1 of 50 Outline Recapitulation Pointers Dynamic Memory Allocation Structs Arrays Bubble Sort Strings Einführung
More informationAN OVERVIEW OF C++ 1
AN OVERVIEW OF C++ 1 OBJECTIVES Introduction What is object-oriented programming? Two versions of C++ C++ console I/O C++ comments Classes: A first look Some differences between C and C++ Introducing function
More informationPIC 10A Pointers, Arrays, and Dynamic Memory Allocation. Ernest Ryu UCLA Mathematics
PIC 10A Pointers, Arrays, and Dynamic Memory Allocation Ernest Ryu UCLA Mathematics Pointers A variable is stored somewhere in memory. The address-of operator & returns the memory address of the variable.
More informationDon Libes. National Institute of Standards and Technology Gaithersburg, MD ABSTRACT
Packet-oriented Communication Using a Stream Protocol or Making TCP/IP on Berkeley UNIX a little more pleasant to use Don Libes National Institute of Standards and Technology Gaithersburg, MD 20899 ABSTRACT
More informationEnterprise Integration Patterns: Designing, Building, and Deploying Messaging Solutions
Enterprise Integration Patterns: Designing, Building, and Deploying Messaging Solutions Chapter 1: Solving Integration Problems Using Patterns 2 Introduction The Need for Integration Integration Challenges
More informationIntroduction to TCP/IP networking
Introduction to TCP/IP networking TCP/IP protocol family IP : Internet Protocol UDP : User Datagram Protocol RTP, traceroute TCP : Transmission Control Protocol HTTP, FTP, ssh What is an internet? A set
More informationBasic Reliable Transport Protocols
Basic Reliable Transport Protocols Do not be alarmed by the length of this guide. There are a lot of pictures. You ve seen in lecture that most of the networks we re dealing with are best-effort : they
More informationStarting to Program in C++ (Basics & I/O)
Copyright by Bruce A. Draper. 2017, All Rights Reserved. Starting to Program in C++ (Basics & I/O) On Tuesday of this week, we started learning C++ by example. We gave you both the Complex class code and
More informationFinal Exam for ECE374 05/03/12 Solution!!
ECE374: Second Midterm 1 Final Exam for ECE374 05/03/12 Solution!! Instructions: Put your name and student number on each sheet of paper! The exam is closed book. You have 90 minutes to complete the exam.
More informationC++ Basics. Data Processing Course, I. Hrivnacova, IPN Orsay
C++ Basics Data Processing Course, I. Hrivnacova, IPN Orsay The First Program Comments Function main() Input and Output Namespaces Variables Fundamental Types Operators Control constructs 1 C++ Programming
More informationProgramming in C++ Prof. Partha Pratim Das Department of Computer Science and Engineering Indian Institute of Technology, Kharagpur
Programming in C++ Prof. Partha Pratim Das Department of Computer Science and Engineering Indian Institute of Technology, Kharagpur Lecture 04 Programs with IO and Loop We will now discuss the module 2,
More informationCNBK Communications and Networks Lab Book: Purpose of Hardware and Protocols Associated with Networking Computer Systems
Lab Book: Purpose of Hardware and Protocols Associated with Networking Computer Systems Contents Purpose of Hardware and Protocols Associated with Computer Networks... 3 Lab Objectives... 3 Lab Resources...
More informationIntroduction to the C++ Programming Language
LESSON SET 2 Introduction to the C++ Programming Language OBJECTIVES FOR STUDENT Lesson 2A: 1. To learn the basic components of a C++ program 2. To gain a basic knowledge of how memory is used in programming
More informationNetwork Layering CS 118
Network Layering Computer Network Fundamentals Peter Reiher Page 1 Outline What is a layer? Goals of layering Internet and the One Ring Page 2 What is a layer? A layer is: The largest set of parties (nodes)
More informationUNIT IV -- TRANSPORT LAYER
UNIT IV -- TRANSPORT LAYER TABLE OF CONTENTS 4.1. Transport layer. 02 4.2. Reliable delivery service. 03 4.3. Congestion control. 05 4.4. Connection establishment.. 07 4.5. Flow control 09 4.6. Transmission
More informationCSE 374 Programming Concepts & Tools. Hal Perkins Fall 2015 Lecture 19 Introduction to C++
CSE 374 Programming Concepts & Tools Hal Perkins Fall 2015 Lecture 19 Introduction to C++ C++ C++ is an enormous language: All of C Classes and objects (kind of like Java, some crucial differences) Many
More information4.0.1 CHAPTER INTRODUCTION
4.0.1 CHAPTER INTRODUCTION Data networks and the Internet support the human network by supplying seamless, reliable communication between people - both locally and around the globe. On a single device,
More informationOSI Transport Layer. Network Fundamentals Chapter 4. Version Cisco Systems, Inc. All rights reserved. Cisco Public 1
OSI Transport Layer Network Fundamentals Chapter 4 Version 4.0 1 Transport Layer Role and Services Transport layer is responsible for overall end-to-end transfer of application data 2 Transport Layer Role
More informationBirkbeck (University of London)
Birkbeck (University of London) MSc Examination Department of Computer Science and Information Systems Internet and Web Technologies (COIY063H7) 15 Credits Date of Examination: 3 June 2016 Duration of
More informationPartha Sarathi Mandal
MA 253: Data Structures Lab with OOP Tutorial 1 http://www.iitg.ernet.in/psm/indexing_ma253/y13/index.html Partha Sarathi Mandal psm@iitg.ernet.in Dept. of Mathematics, IIT Guwahati Reference Books Cormen,
More informationFinal Exam CS164, Fall 2007 Dec 18, 2007
P a g e 1 Final Exam CS164, Fall 2007 Dec 18, 2007 Please read all instructions (including these) carefully. Write your name, login, and SID. No electronic devices are allowed, including cell phones used
More informationLayer Optimization: Congestion Control CS 118. Computer Network Fundamentals Peter Reiher. Lecture 17 Page 1 CS 118. Winter 2016
Layer Optimization: Congestion Control Computer Network Fundamentals Peter Reiher Page 1 We can lose packets for many Corruption reasons Not delivered to receiver Poor flow control But also because of
More informationCCNA 1 v3.11 Module 11 TCP/IP Transport and Application Layers
CCNA 1 v3.11 Module 11 TCP/IP Transport and Application Layers 2007, Jae-sul Lee. All rights reserved. 1 Agenda 11.1 TCP/IP Transport Layer 11.2 The Application Layer What does the TCP/IP transport layer
More informationWeb Architecture Review Sheet
Erik Wilde (School of Information, UC Berkeley) INFO 190-02 (CCN 42509) Spring 2009 May 11, 2009 Available at http://dret.net/lectures/web-spring09/ Contents 1 Introduction 2 1.1 Setup.................................................
More informationMidterm II December 4 th, 2006 CS162: Operating Systems and Systems Programming
Fall 2006 University of California, Berkeley College of Engineering Computer Science Division EECS John Kubiatowicz Midterm II December 4 th, 2006 CS162: Operating Systems and Systems Programming Your
More information