Midterm Review October Closed book one hand written page of notes of your own making October Closed book one hand written page of notes of.

Slides:



Advertisements
Similar presentations
TCP/IP Protocol Suite 1 Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 22 World Wide Web and HTTP.
Advertisements

Chapter 15 – Part 2 Networks The Internal Operating System The Architecture of Computer Hardware and Systems Software: An Information Technology Approach.
Definitions, Definitions, Definitions Lead to Understanding.
How Clients and Servers Work Together. Objectives Learn about the interaction of clients and servers Explore the features and functions of Web servers.
Application Layer  We will learn about protocols by examining popular application-level protocols  HTTP  FTP  SMTP / POP3 / IMAP  Focus on client-server.
Understanding Factors That Influence Performance of a Web Server Presentation CS535 Project By Thiru.
SE-2840 Dr. Mark L. Hornick1 Java Servlet-based web apps Servlet Architecture.
 2004 Prentice Hall, Inc. All rights reserved. Chapter 25 – Perl and CGI (Common Gateway Interface) Outline 25.1 Introduction 25.2 Perl 25.3 String Processing.
Process-to-Process Delivery:
CS252: Systems Programming Ninghui Li Final Exam Review.
IT 210 The Internet & World Wide Web introduction.
FALL 2005CSI 4118 – UNIVERSITY OF OTTAWA1 Part 4 Web technologies: HTTP, CGI, PHP,Java applets)
Lesson 24. Protocols and the OSI Model. Objectives At the end of this Presentation, you will be able to:
Characteristics of Communication Systems
1 Computer Communication & Networks Lecture 28 Application Layer: HTTP & WWW p Waleed Ejaz
Digital Media Dr. Jim Rowan ITEC The Internet your computer DHCP: your browser (Safari)(client) webpages and other stuff yahoo.com (server)
JavaScript, Fourth Edition
Chapter 1: Introduction to Web Applications. This chapter gives an overview of the Internet, and where the World Wide Web fits in. It then outlines the.
Digital Multimedia, 2nd edition Nigel Chapman & Jenny Chapman Chapter 17 This presentation © 2004, MacAvon Media Productions Multimedia and Networks.
CS4273: Distributed System Technologies and Programming Lecture 13: Review.
Sockets process sends/receives messages to/from its socket
Perl and Regular Expressions Regular Expressions are available as part of the programming languages Java, JScript, Visual Basic and VBScript, JavaScript,
The Inter-network is a big network of networks.. The five-layer networking model for the internet.
Chapter 15 – Part 2 Networks The Internal Operating System The Architecture of Computer Hardware and Systems Software: An Information Technology Approach.
Application Block Diagram III. SOFTWARE PLATFORM Figure above shows a network protocol stack for a computer that connects to an Ethernet network and.
4061 Session 25 (4/17). Today Briefly: Select and Poll Layered Protocols and the Internets Intro to Network Programming.
Saving State on the WWW. The Issue  Connections on the WWW are stateless  Every time a link is followed is like the first time to the server — it has.
2007cs Servers on the Web. The World-Wide Web 2007 cs CSS JS HTML Server Browser JS CSS HTML Transfer of resources using HTTP.
Cisco – Chapter 15 Application Layer closest to you as an end-user, when you are interacting with software.
Digital Multimedia, 2nd edition Nigel Chapman & Jenny Chapman Chapter 17 This presentation © 2004, MacAvon Media Productions Multimedia and Networks.
1 State and Session Management HTTP is a stateless protocol – it has no memory of prior connections and cannot distinguish one request from another. The.
ISDS 4120 Project 1 DWAYNE CARRAL JR 3/27/15. There are seven layers which make up the OSI (Open Systems Interconnection Model) which is the model for.
Web Technologies Lecture 6 State preservation. Motivation How to keep user data while navigating on a website? – Authenticate only once – Store wish list.
Transmission Control Protocol (TCP) Internet Protocol (IP)
Midterm Review Chapter 1: Introduction Chapter 2: Application Layer
Voice Over Internet Protocol (VoIP) Copyright © 2006 Heathkit Company, Inc. All Rights Reserved Presentation 5 – VoIP and the OSI Model.
Netprog: Client/Server Issues1 Issues in Client/Server Programming Refs: Chapter 27.
Introduction to Programming the WWW I CMSC Winter 2003 Lecture 17.
CITA 310 Section 4 Apache Configuration (Selected Topics from Textbook Chapter 6)
1 Network Communications A Brief Introduction. 2 Network Communications.
R Some of these slides are from Prof Frank Lin SJSU. r Minor modifications are made. 1.
TCP/IP Protocol Suite 1 Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 22 World Wide Web and HTTP.
CLIENT (Browser) socket accept C1 C2 recv C2 recv send C2 send end_thread recv C3 send bind connect Web Server Proxy recv close C3 close C2 end_thread.
SOCKET PROGRAMMING Presented By : Divya Sharma.
1 Chapter 1 INTRODUCTION TO WEB. 2 Objectives In this chapter, you will: Become familiar with the architecture of the World Wide Web Learn about communication.
Distributed OS.
Managing State Chapter 13.
Chapter 9: Transport Layer
Last Class: Introduction
Instructor Materials Chapter 9: Transport Layer
CS 330 Class 7 Comments on Exam Programming plan for today:
Due: a start of class Oct 12
Boots Cassel Villanova University
Due: a start of class Oct 26
Understanding the OSI Reference Model
TCP Transport layer Er. Vikram Dhiman LPU.
PHP / MySQL Introduction
Computer Communication & Networks
Multimedia and Networks
Process-to-Process Delivery:
IS 4506 Server Configuration (HTTP Server)
CSE 461 HTTP and the Web.
Session Tracking Techniques
Issues in Client/Server Programming
Chapter 15 – Part 2 Networks The Internal Operating System
Hyper Text Transfer Protocol
INFORMATION FLOW ACROSS THE INTERNET
Process-to-Process Delivery: UDP, TCP
Information Retrieval and Web Design
Computer Networks Protocols
Presentation transcript:

Midterm Review October Closed book one hand written page of notes of your own making October Closed book one hand written page of notes of your own making

Perl Regular Expresions  Extremely Powerful Text Processing.  One of Perls most useful yet most misunderstood features  ‘=~’ indicates a regexp match  if ($var =~ /BLAH/) – Match string  if ($var =~ /^BLAH/) – Start of String  if ($var =~ /BLAH$/) – End of String  if ($var =~ /\w+/) – Any letters  \w - Letters  \d - Numbers  \s - Whitespace . - Anything  Extremely Powerful Text Processing.  One of Perls most useful yet most misunderstood features  ‘=~’ indicates a regexp match  if ($var =~ /BLAH/) – Match string  if ($var =~ /^BLAH/) – Start of String  if ($var =~ /BLAH$/) – End of String  if ($var =~ /\w+/) – Any letters  \w - Letters  \d - Numbers  \s - Whitespace . - Anything

Now search for the taxa “hopper” Whoa!! How do I search!!  print "line $_\n"; = split /\s+/, $_;  print "$words[0] \n";  print "$words[1] \n";  if($words=~/^hop|^fli/) {  print "found hopper or flick: dna $words[1]\n";  } else {  print "not either";  } Whoa!! How do I search!!  print "line $_\n"; = split /\s+/, $_;  print "$words[0] \n";  print "$words[1] \n";  if($words=~/^hop|^fli/) {  print "found hopper or flick: dna $words[1]\n";  } else {  print "not either";  }

metacharacters  \ Quote the next metacharacter  ^ Match the beginning of the line . Match any character (except newline)  $ Match the end of the line (or before newline at the end)  | Alternation  () Grouping  [] Character class  By default, the "^" character is guaranteed to match only the beginning of the string, the "$" character only the end (or before the newline at the end), and Perl does certain optimizations with the assumption that the string contains only one line. Embedded newlines will not be matched by "^" or "$". You may, however, wish to treat a string as a multi-line buffer, such that the "^" will match after any newline within the string, and "$" will match before any newline. At the cost of a little more overhead, you can do this by using the /m modifier on the pattern match operator.  \ Quote the next metacharacter  ^ Match the beginning of the line . Match any character (except newline)  $ Match the end of the line (or before newline at the end)  | Alternation  () Grouping  [] Character class  By default, the "^" character is guaranteed to match only the beginning of the string, the "$" character only the end (or before the newline at the end), and Perl does certain optimizations with the assumption that the string contains only one line. Embedded newlines will not be matched by "^" or "$". You may, however, wish to treat a string as a multi-line buffer, such that the "^" will match after any newline within the string, and "$" will match before any newline. At the cost of a little more overhead, you can do this by using the /m modifier on the pattern match operator.

quantifiers The following standard quantifiers are recognized: * Match 0 or more times + Match 1 or more times ? Match 1 or 0 times {n} Match exactly n times {n,} Match at least n times {n,m} Match at least n but not more than m times The following standard quantifiers are recognized: * Match 0 or more times + Match 1 or more times ? Match 1 or 0 times {n} Match exactly n times {n,} Match at least n times {n,m} Match at least n but not more than m times

Character Class  You can specify a character class, by enclosing a list of characters in "[]", which will match any one character from the list. If the first character after the "[" is "^", the class matches any character not in the list. Within a list, the "-" character specifies a range, so that "a-z" represents all characters between "a" and "z", inclusive.

Bracketing  The bracketing construct "(... )" creates capture buffers. To refer to the digit'th buffer use \ within the match. Outside the match use "$" instead of "\".

Example $var = "This Midterm"; $var =~ s/^([^ ]*) *([^ ]*)/$2 $1/; $var = "This Midterm"; $var =~ s/^([^ ]*) *([^ ]*)/$2 $1/;

Hashes my %ancestors = ( grandfather => "gp", gm => "grandmother", great => "ggf", ); = keys %ancestors; = values %ancestors; print "key ", value "\n"; print "gm = ", $ancestors{"gm"}, "\n";

Questions What does the listen() command do and how is it related to the connection oriented nature of TCP? Is IP connection oriented? Is Ethernet connection oriented? Is TCP connection oriented? Is HTTP connection oriented? You write() 100 bytes to the client end of a socket. On the server side of the socket you issue a read() for 100 bytes. The read() command returns 20 bytes. Why is this happening?

Seven Layer Model Application Presentation Session Transport Network Data Link Physical Network Data Link Physical Network Data Link Physical Application Presentation Session Transport Network Data Link Physical , FTP, www cinteger size, big endian synchronization, name space reliability, congestion control Routing address framing errors electrical signals

Questions What does the bind() procedure in the socket library do? How does it interact with the TCP and IP layers of the protocol stack. What is a socket? How does a web server use sockets to distinguish between different clients that connect to it?

Web Operating System Explain how the web could be the Operating System of the future. In your answer, discuss features traditionally offered by an OS and explain how these could be provided over the web. Scheduling? Service Small requests first? File System? URL Access Control? Security Virtual Memory? Cache Replacement

Questions What are the steps a web server must take in processing an HTTP request? What are the differences between the way a web server deals with a GET or POST cgi request. Is HTTP a stateless protocol? What are the 3 ways for a web application to maintain session state? URL Rewriting Hidden Fields Cookies Compare the pros and cons of each method. Explain how an HTTP cookie works. How does a perl application use cookies to create persistant state. What does the SECURE keyword indicate for a cookie?

Questions How do signals work with threads and processes? Understand the implementation details and parameters for SysV semaphores. Compare and contrast user level and kernel level threads. What are the differences between threads and processes? What does the fork() system call return? What system call would you use to determine file information? What system call would you use to change the stdout of a process? Why would you want to use a thread pool instead of a single thread for serving requests from browsers? Why would you want to use a thread pool instead of spawning a new thread for each request from a browser? From an Operating Systems perspective, what is the difference between a process and a thread?