91
Chapters: 10, 12, 13, 14, 15, 16 Final Review 1

Chapters: 10, 12, 13, 14, 15, 16 Final Review 1. Chapter 10 Operating Systems

Embed Size (px)

Citation preview

Page 1: Chapters: 10, 12, 13, 14, 15, 16 Final Review 1. Chapter 10 Operating Systems

Chapters:

10, 12, 13, 14, 15, 16

Final Review

1

Page 2: Chapters: 10, 12, 13, 14, 15, 16 Final Review 1. Chapter 10 Operating Systems

Chapter 10

Operating Systems

Page 3: Chapters: 10, 12, 13, 14, 15, 16 Final Review 1. Chapter 10 Operating Systems

3

Chapter Goals

• Describe the two main responsibilities of an operating system

• Define memory and process management

• Explain how timesharing creates the virtual machine illusion

Page 4: Chapters: 10, 12, 13, 14, 15, 16 Final Review 1. Chapter 10 Operating Systems

4

Roles of an Operating System

Operating system

System software that– manages computer resources, such as

memory and input/output devices– provides an interface through which a human

can interact with the computer– allows an application program to interact with

these other system resources

Page 5: Chapters: 10, 12, 13, 14, 15, 16 Final Review 1. Chapter 10 Operating Systems

5

Roles of an Operating System

Figure 10.1 An operating system interacts with many aspects of a computer system.

What operatingsystems have

you used?

Page 6: Chapters: 10, 12, 13, 14, 15, 16 Final Review 1. Chapter 10 Operating Systems

6

Roles of an Operating System

The various roles of an operating system generally revolve around the idea of “sharing nicely”

An operating system manages resources, and these resources are often shared in one way or another among programs that want to use them

Page 7: Chapters: 10, 12, 13, 14, 15, 16 Final Review 1. Chapter 10 Operating Systems

7

Resource Management

Multiprogramming

The technique of keeping multiple programs that compete for access to the CPU in main memory at the same time so that they can execute

Memory management

The process of keeping track of what programs are in memory and where in memory they reside

Page 8: Chapters: 10, 12, 13, 14, 15, 16 Final Review 1. Chapter 10 Operating Systems

8

Resource Management

Process

A program in execution

Process management

The act of carefully tracking the progress of a process and all of its intermediate states

CPU scheduling

Determining which process in memory is executed by the CPU at any given point

Page 9: Chapters: 10, 12, 13, 14, 15, 16 Final Review 1. Chapter 10 Operating Systems

9

Timesharing

Timesharing system

A system that allows multiple users to interact with a computer at the same time

As computer speed increased, the human operator became the bottleneck

Page 10: Chapters: 10, 12, 13, 14, 15, 16 Final Review 1. Chapter 10 Operating Systems

Chapter 12

Information Systems

Page 11: Chapters: 10, 12, 13, 14, 15, 16 Final Review 1. Chapter 10 Operating Systems

Chapter Goals

• Discuss the CIA triad

• Describe the role of cryptography in securing data

• List three types of of authentication credentials

• Define the following terms related to computer security: malicious code, virus, worm, Trojan horse, logic bomb, spoofing, phishing, back door, buffer overflow, denial of service, and man-in-the-middle

11

Page 12: Chapters: 10, 12, 13, 14, 15, 16 Final Review 1. Chapter 10 Operating Systems

12

Information Security

Information security

The techniques and policies used to ensure proper access to data

Confidentiality

Ensuring that data is protected from unauthorized access What's the difference

between file protectionand information security?

Page 13: Chapters: 10, 12, 13, 14, 15, 16 Final Review 1. Chapter 10 Operating Systems

13

CIA Triad of Information Security

Ensuring that data is protected from

unauthorized access

Ensuring that data can be

modified only by

appropriate mechanisms

The degree to which authorizedusers can access information for

legitimate purposes

Page 14: Chapters: 10, 12, 13, 14, 15, 16 Final Review 1. Chapter 10 Operating Systems

14

Information Security

Rick Analysis

Determining the nature and likelihood of the risks to key data

Planning for information analysis requires risk analysis

Goal is to minimize vulnerability to threats that put a system at the most risk

Page 15: Chapters: 10, 12, 13, 14, 15, 16 Final Review 1. Chapter 10 Operating Systems

15

Cryptography

Cryptography

The field of study related to encoded information (comes from Greek word for "secret writing")

Encryption

The process of converting plaintext into ciphertext

Decryption

The process of converting ciphertext into plaintext

Page 16: Chapters: 10, 12, 13, 14, 15, 16 Final Review 1. Chapter 10 Operating Systems

16

Cryptography

plaintextmessage

ciphertextmessage

Encryption

Decryption

Encrypted(Information) cannot be read

Decrypted(Encrypted(Information)) can be

Page 17: Chapters: 10, 12, 13, 14, 15, 16 Final Review 1. Chapter 10 Operating Systems

17

Cryptography

Cipher

An algorithm used to encrypt and decrypt text

Key

The set of parameters that guide a cipher

Neither is any good without the other

Page 18: Chapters: 10, 12, 13, 14, 15, 16 Final Review 1. Chapter 10 Operating Systems

18

Cryptography

Substitution cipher --A cipher that substitutes one character with another

Caesar cipher --A substitution cipher that shifts characters a certain number of positions in the alphabet

Transposition ciphers --A cipher that rearranges the order of existing characters in a message in a certain way (e.g., a route cipher)

Page 19: Chapters: 10, 12, 13, 14, 15, 16 Final Review 1. Chapter 10 Operating Systems

19

Substitution cipher

A B C D E F G H I J K L M N O P Q R S T U V W X Y Z

D E F G H I J K L M N O P Q R S T U V W X Y Z A B C

Substitute the letters in the second row for the letters in the top row to encrypt a message

Encrypt(COMPUTER) gives FRPSXWHU

Substitute the letters in the first row for the letters in the second row to decrypt a message

Decrypt(Encrypt(COMPUTER)) gives COMPUTER

Why is this called the Caesar cipher?What is the key?

Page 20: Chapters: 10, 12, 13, 14, 15, 16 Final Review 1. Chapter 10 Operating Systems

20

Transposition Cipher

T O D A Y

+ I S + M

O N D A Y

Write the letters in a row of five, using '+' as a blank. Encrypt by starting spiraling inward from the top left moving counter clockwise

Encrypt(TODAY IS MONDAY) gives T+ONDAYMYADOIS+

Decrypt by recreating the grid and reading the letters across the row

The key are the dimension of the grid and the route used to encrypt the data

Page 21: Chapters: 10, 12, 13, 14, 15, 16 Final Review 1. Chapter 10 Operating Systems

21

Cryptanalysis

Cryptanalysis

The process of decrypting a message without knowing the cipher or the key used to encrypt it

Substitution and transposition ciphers are easy for modern computers to break

To protect information more sophisticated schemes are needed

Page 22: Chapters: 10, 12, 13, 14, 15, 16 Final Review 1. Chapter 10 Operating Systems

22

Public/Private Keys

Public-key cryptography

An approach in which each user has two related keys, one public and one private

One's public key is distributed freely

A person encrypts an outgoing message, using the receiver's public key.

Only the receiver's private key can decrypt the message

Page 23: Chapters: 10, 12, 13, 14, 15, 16 Final Review 1. Chapter 10 Operating Systems

23

Public/Private Keys

Digital signature

Data that is appended to a message, made from the message itself and the sender's private key, to ensure the authenticity of the message

Digital certificate

A representation of a sender's authenticated public key used to minimize malicious forgeries

Page 24: Chapters: 10, 12, 13, 14, 15, 16 Final Review 1. Chapter 10 Operating Systems

24

Computer Security

Authentication credentials

Information users provide to identify themselves for computer access

•User knowledge name, password, PIN

•Smart card card with embedded memory chip used for identification

•Biometrics human characteristics such as fingerprints, retina or voice patterns

Page 25: Chapters: 10, 12, 13, 14, 15, 16 Final Review 1. Chapter 10 Operating Systems

25

Computer Security

Malicious Code

A computer program that attempts to bypass appropriate authorization and/or perform unauthorized functions

Worm stands alone, targets network resources

Trojan horse disguised as benevolent resource

Virus self-replicating

Logic bomb set up to execute at system event

Page 26: Chapters: 10, 12, 13, 14, 15, 16 Final Review 1. Chapter 10 Operating Systems

26

Computer Security

Security Attacks

An attack on the computer system itself

Password guessing obvious

Phishing trick users into revealing security information

Spoofing malicious user masquerades as authorized user

Back door unauthorized access to anyone who knows it exists

Page 27: Chapters: 10, 12, 13, 14, 15, 16 Final Review 1. Chapter 10 Operating Systems

27

Computer Security

Buffer overflow defect that could cause a system to crash and leave the user with heightened privileges

Denial-of-service attach that prevents authorized user from accessing the system

Man-in-the-middle network communication is intercepted in an attempt to obtain key data

Have you ever experienced one of these?

Page 28: Chapters: 10, 12, 13, 14, 15, 16 Final Review 1. Chapter 10 Operating Systems

Chapter 13

Artificial Intelligence

Page 29: Chapters: 10, 12, 13, 14, 15, 16 Final Review 1. Chapter 10 Operating Systems

29

Chapter Goals

• Distinguish between the types of problems that humans do best and those that computers do best

• Explain the Turing test

• Define what is meant by knowledge representation and demonstrate how knowledge is represented in a semantic network

Page 30: Chapters: 10, 12, 13, 14, 15, 16 Final Review 1. Chapter 10 Operating Systems

30

Chapter Goals

• Explain the processing of an expert system

• Explain the processing of biological and artificial neural networks

Page 31: Chapters: 10, 12, 13, 14, 15, 16 Final Review 1. Chapter 10 Operating Systems

31

Thinking Machines

Can youlist the items

in thispicture?

Page 32: Chapters: 10, 12, 13, 14, 15, 16 Final Review 1. Chapter 10 Operating Systems

32

Thinking Machines

Can you countthe distributionof letters in abook?Add a thousand4-digit numbers?Match fingerprints?Search a list ofa million valuesfor duplicates?

Page 33: Chapters: 10, 12, 13, 14, 15, 16 Final Review 1. Chapter 10 Operating Systems

33

Thinking Machines

Can youlist the items

in thispicture?

Can you count the distribution of letters in a book?Add a thousand4-digit numbers?Match finger prints?Search a list of a million valuesfor duplicates?

Humans do best

Computers do best

Page 34: Chapters: 10, 12, 13, 14, 15, 16 Final Review 1. Chapter 10 Operating Systems

34

Thinking Machines

Artificial intelligence (AI)

The study of computer systems that attempt to model and apply the intelligence of the human mind

For example, writing a program to pick out objects in a picture

Page 35: Chapters: 10, 12, 13, 14, 15, 16 Final Review 1. Chapter 10 Operating Systems

35

The Turing Test

Turing test

A test to empirically determine whether a computer has achieved intelligence

Alan Turing

An English mathematician wrote a landmark paper in 1950 that asked the question: Can machines think?

He proposed a test to answer the question "How will we know when we’ve succeeded?"

Page 36: Chapters: 10, 12, 13, 14, 15, 16 Final Review 1. Chapter 10 Operating Systems

36

The Turing Test

Figure 13.2 In a Turing test, the interrogator must determine which respondent is the computer and which is the human

Page 37: Chapters: 10, 12, 13, 14, 15, 16 Final Review 1. Chapter 10 Operating Systems

37

Knowledge Representation

How can we represent knowledge?•We need to create a logical view of the data,

based on how we want to process it

•Natural language is very descriptive, but doesn’t lend itself to efficient processing

•Semantic networks and search trees are promising techniques for representing knowledge

Page 38: Chapters: 10, 12, 13, 14, 15, 16 Final Review 1. Chapter 10 Operating Systems

38

Semantic Networks

Semantic network

A knowledge representation technique that focuses on the relationships between objects

A directed graph is used to represent a semantic network or net

Remember directedgraphs? (See Chapter 8.)

Page 39: Chapters: 10, 12, 13, 14, 15, 16 Final Review 1. Chapter 10 Operating Systems

39

Semantic Networks

Page 40: Chapters: 10, 12, 13, 14, 15, 16 Final Review 1. Chapter 10 Operating Systems

40

Semantic Networks

Network Design – The objects in the network represent the

objects in the real world that we are representing

– The relationships that we represent are based on the real world questions that we would like to ask

– That is, the types of relationships represented determine which questions are easily answered, which are more difficult to answer, and which cannot be answered

Page 41: Chapters: 10, 12, 13, 14, 15, 16 Final Review 1. Chapter 10 Operating Systems

41

Expert Systems

Knowledge-based system

Software that uses a specific set of information, from which it extracts and processes particular pieces

Expert system

A software system based the knowledge of human experts; it is a

– Rule-based system– A software system based on a set of if-then rules– Inference engine– The software that processes rules to draw conclusions

Page 42: Chapters: 10, 12, 13, 14, 15, 16 Final Review 1. Chapter 10 Operating Systems

42

Expert Systems

Gardner Expert System Example

Page 43: Chapters: 10, 12, 13, 14, 15, 16 Final Review 1. Chapter 10 Operating Systems

43

Artificial Neural Network

Artificial neural networks

A computer representation of knowledge that attempts to mimic the neural networks of the human body

Yes, but what is a human neural network?

Page 44: Chapters: 10, 12, 13, 14, 15, 16 Final Review 1. Chapter 10 Operating Systems

44

Neural Network

Figure 13.6 A biological neuron

Page 45: Chapters: 10, 12, 13, 14, 15, 16 Final Review 1. Chapter 10 Operating Systems

45

Artificial Neural Networks

Each processing element in an artificial neural net is analogous to a biological neuron

– An element accepts a certain number of input values (dendrites) and produces a single output value (axon) of either 0 or 1

– Associated with each input value is a numeric weight (synapse)

Page 46: Chapters: 10, 12, 13, 14, 15, 16 Final Review 1. Chapter 10 Operating Systems

46

Artificial Neural Networks

– The effective weight of the element is the sum of the weights multiplied by their respective input values

v1 * w1 + v2 * w2 + v3 * w3

– Each element has a numeric threshold value

– If the effective weight exceeds the threshold, the unit produces an output value of 1

– If it does not exceed the threshold, it produces an output value of 0

Page 47: Chapters: 10, 12, 13, 14, 15, 16 Final Review 1. Chapter 10 Operating Systems

47

Artificial Neural Networks

Training

The process of adjusting the weights and threshold values in a neural net

How does this all work?

Train a neural net to recognize a cat in a picture

Given one output value per pixel, train network to produce an output value of 1 for every pixel that contributes to the cat and 0 for every one that doesn't

Page 48: Chapters: 10, 12, 13, 14, 15, 16 Final Review 1. Chapter 10 Operating Systems

Chapter 14

Simulation, Graphics and Other Applications

Page 49: Chapters: 10, 12, 13, 14, 15, 16 Final Review 1. Chapter 10 Operating Systems

49

Chapter Goals

• Define simulation

• Give examples of complex systems

• Distinguish between continuous and discrete event simulation

• Name and discuss the four parts of a queuing system

Page 50: Chapters: 10, 12, 13, 14, 15, 16 Final Review 1. Chapter 10 Operating Systems

50

What Is Simulation?

•Simulation

•A model of a complex system and the experimental manipulation of the model to observe the results

Systems that are best suited to being simulated are dynamic, interactive, and complicated

•Model

•An abstraction of a real systemIt is a representation of the objects within the system and the rules that govern the interactions of the objects

Page 51: Chapters: 10, 12, 13, 14, 15, 16 Final Review 1. Chapter 10 Operating Systems

51

Constructing Models

• Continuous simulation

– Treats time as continuous

– Expresses changes in terms of a set of differential equations that reflect the relationships among the set of characteristics

– Meteorological models falls into this category

Page 52: Chapters: 10, 12, 13, 14, 15, 16 Final Review 1. Chapter 10 Operating Systems

52

Constructing Models

•Discrete event simulation

•Made up of entities, attributes, and events

– Entity The representation of some object in the real system that must be explicitly defined

– Attribute Some characteristic of a particular entity

– Event An interaction between entities

Page 53: Chapters: 10, 12, 13, 14, 15, 16 Final Review 1. Chapter 10 Operating Systems

53

Queuing Systems

•Queuing system

•A discrete-event model that uses random numbers to represent the arrival and duration of events

•The system is made up of – servers – queues of objects to be served

Please wait!

Page 54: Chapters: 10, 12, 13, 14, 15, 16 Final Review 1. Chapter 10 Operating Systems

54

Queuing Systems

• To construct a queuing model, we must know – The number of events and how they affect the system

in order to determine the rules of entity interaction

– The number of servers

– The distribution of arrival times in order to determine if an entity enters the system

– The expected service time in order to determine the duration of an event

Page 55: Chapters: 10, 12, 13, 14, 15, 16 Final Review 1. Chapter 10 Operating Systems

Chapter 15

Networks

Page 56: Chapters: 10, 12, 13, 14, 15, 16 Final Review 1. Chapter 10 Operating Systems

56

Chapter Goals

• List various types of networks and their characteristics

• Explain various topologies of local-area networks

• Explain the domain name system

Page 57: Chapters: 10, 12, 13, 14, 15, 16 Final Review 1. Chapter 10 Operating Systems

57

Chapter Goals

• Explain packet switching

• Describe the basic roles of various network protocols

• Explain the role of a firewall

• Compare and contrast network hostnames and IP addresses

Page 58: Chapters: 10, 12, 13, 14, 15, 16 Final Review 1. Chapter 10 Operating Systems

58

Networking

Computer network

A collection of computing devices connected in order to communicate and share resources

Connections between computing devices can be physical using wires or cables or wireless using radio waves or infrared signals

Can you name some of the devices in a computer network?

Page 59: Chapters: 10, 12, 13, 14, 15, 16 Final Review 1. Chapter 10 Operating Systems

59

Networking

Node (host)

Any device on a network

Data transfer rate (bandwidth)

The speed with which data is moved from one place to another on a network

Why is bandwidth so key?

Page 60: Chapters: 10, 12, 13, 14, 15, 16 Final Review 1. Chapter 10 Operating Systems

60

Networking

Computer networks have opened up an entire frontier in the world of computing called the client/server model

Figure 15.1 Client/Server interaction

Page 61: Chapters: 10, 12, 13, 14, 15, 16 Final Review 1. Chapter 10 Operating Systems

61

Types of Networks

Local-area network (LAN)

A network that connects a relatively small number of machines in a relatively close geographical area

Ring topology connects all nodes in a closed loop on which messages travel in one direction

Star topology centers around one node to which all others are connected and through which all messages are sent

Bus topology nodes are connected to a single communication line that carries messages in both directions

Page 62: Chapters: 10, 12, 13, 14, 15, 16 Final Review 1. Chapter 10 Operating Systems

Types of Networks

Ethernet

The industry standard bus technology for local-area networks

Figure 15.2 Various network topologies

Page 63: Chapters: 10, 12, 13, 14, 15, 16 Final Review 1. Chapter 10 Operating Systems

63

Types of Networks

Wide-area network (WAN)

A network that connects local-area networks over a potentially large geographic distance

Metropolitan-area network (MAN)

The communication infrastructures that have been developed in and around large cities

Gateway

One particular set up to handle all communication going between that LAN and other networks

Page 64: Chapters: 10, 12, 13, 14, 15, 16 Final Review 1. Chapter 10 Operating Systems

Packet Switching

Packet

A unit of data sent across a network

Router

A network device that directs a packet between networks toward its final destination

Packet switching

Messages are divided into fixed-sized, numbered packets; packets are individually routed to their destination, then reassembled

Page 65: Chapters: 10, 12, 13, 14, 15, 16 Final Review 1. Chapter 10 Operating Systems

65

Packet Switching

Figure 15.4

Messages sent by packet switching

Take a message, break it into three packets, and simulate this process

Page 66: Chapters: 10, 12, 13, 14, 15, 16 Final Review 1. Chapter 10 Operating Systems

66

TCP/IP

Transmission Control Protocol (TCP)

Software that breaks messages into packets, hands them off to the IP software for delivery, and then orders and reassembles the packets at their destination

Internet Protocol (IP)

Software that deals with the routing of packets through the maze of interconnected networks to their final destination

Page 67: Chapters: 10, 12, 13, 14, 15, 16 Final Review 1. Chapter 10 Operating Systems

67

TCP/IP

User Datagram Protocol (UDP)

An alternative to TCP that is faster but less reliable

Ping

A program used to test whether a particular network computer is active and reachable

Traceroute

A program that shows the route a packet takes across the Internet

Page 68: Chapters: 10, 12, 13, 14, 15, 16 Final Review 1. Chapter 10 Operating Systems

68

High-Level Protocols

Other protocols build on TCP/IP protocol suite

Simple Mail Transfer Protocol (SMTP) used to specify transfer of electronic mail

File Transfer Protocol (FTP) allows a user to transfer files to and from another computer

Telnet used to log onto one computer from another

Hyper Text Transfer Protocol (http) allows exchange of Web documents

Which of these have you used?

Page 69: Chapters: 10, 12, 13, 14, 15, 16 Final Review 1. Chapter 10 Operating Systems

69

Firewalls

Firewall

A gateway machine and its software that protects a network by filtering the traffic it allows

Access control policy

A set of rules established by an organization that specify what types of network communication are permitted and denied

Have your messages ever beenreturned undelivered, blocked by a firewall?

Page 70: Chapters: 10, 12, 13, 14, 15, 16 Final Review 1. Chapter 10 Operating Systems

70

Firewalls

Figure 15.8 A firewall protecting a LAN

Page 71: Chapters: 10, 12, 13, 14, 15, 16 Final Review 1. Chapter 10 Operating Systems

71

Network Addresses

Hostname

A name made up of words separated by dots that uniquely identifies a computer on the Internet

IP address

An address made up of four one-byte numeric values separated by dots that uniquely identifies a computer on the Internet

Is there a correspondence between the parts of a hostname and an IP address?

Page 72: Chapters: 10, 12, 13, 14, 15, 16 Final Review 1. Chapter 10 Operating Systems

72

Network Addresses

Class A: first byte for network address and three remaining bytes for host number

Class B: first two bytes for network address and the last two bytes for host number

Class C: first three bytes for network address and the last byte for host number

Figure 15.9 An IP address is stored in four bytes

Where does the host number come from?

Page 73: Chapters: 10, 12, 13, 14, 15, 16 Final Review 1. Chapter 10 Operating Systems

73

Domain Name SystemHost number

The part of the IP address that specifies a particular host (machine) on the network Yes, but what is it?

Domain name

The part of a hostname that specifies a specific organization or group

Top-level domain (TLD)

The last section of a domain name that specifies the type of organization or its country of origin

Page 74: Chapters: 10, 12, 13, 14, 15, 16 Final Review 1. Chapter 10 Operating Systems

74

Domain Name System

matisse.csc.villanova.edu

Computer

name Domain name TLD

Page 75: Chapters: 10, 12, 13, 14, 15, 16 Final Review 1. Chapter 10 Operating Systems

Chapter 16

The World Wide Web

Page 76: Chapters: 10, 12, 13, 14, 15, 16 Final Review 1. Chapter 10 Operating Systems

76

Chapter Goals

• Compare and contrast the Internet and the World Wide Web

• Describe general Web processing

• Describe the processing of Java applets and Java server pages

• Compare and contrast HTML and XML

Page 77: Chapters: 10, 12, 13, 14, 15, 16 Final Review 1. Chapter 10 Operating Systems

77

The World Wide Web

The Web

An infrastructure of information combined and the network software used to access it

Web page

A document that contains or references various kinds of data

Links A connection between one web page and another

What are the links used for?

Page 78: Chapters: 10, 12, 13, 14, 15, 16 Final Review 1. Chapter 10 Operating Systems

78

The World Wide Web

Website

A collection of related web pages

Web browser

a software tool that retrieves and displays Web pages

Web server

A computer set up to respond to requests for Web pages

Page 79: Chapters: 10, 12, 13, 14, 15, 16 Final Review 1. Chapter 10 Operating Systems

79

The World Wide Web

Uniform Resource Locator (URL)

A standard way of specifying the location of a Web page, containing the hostname, "/", and a file

What is the relationship between the

Internet and the Web?

Page 80: Chapters: 10, 12, 13, 14, 15, 16 Final Review 1. Chapter 10 Operating Systems

80

Search Engines

Search Engine

A website that helps you find other websites

Can you name at least two?

How do they work?

Page 81: Chapters: 10, 12, 13, 14, 15, 16 Final Review 1. Chapter 10 Operating Systems

81

Cookies

Cookie

A small text file that a web server stores on your local computer’s hard disk

– A cookie contains information about your visit to the site

– Cookies can be used• to determine number of unique visitors to the site• to customize the site for your future visits• to implement shopping carts that can be maintained from

visit to visit

– Cookies are not dangerous

Page 82: Chapters: 10, 12, 13, 14, 15, 16 Final Review 1. Chapter 10 Operating Systems

82

HTML

Hypertext Markup Language (HTML)

The language used to create or build a Web page

Markup language

A language that uses tags to annotate the information in a document

Tags

The syntactic element in a markup language that indicates how information should be displayed

Page 83: Chapters: 10, 12, 13, 14, 15, 16 Final Review 1. Chapter 10 Operating Systems

83

HTML

Figure 16.3 The Student Dynamics Web page as displayed in Netscape Navigator

Page 84: Chapters: 10, 12, 13, 14, 15, 16 Final Review 1. Chapter 10 Operating Systems

84

HTML

Figure 16.4The HTML document defining the Student Dynamics Web page

Page 85: Chapters: 10, 12, 13, 14, 15, 16 Final Review 1. Chapter 10 Operating Systems

85

HTML

Tags are enclosed in angle brackets (<. . . >)

Words such as HEAD, TITLE, and BODY are called elements and specify the type of the tag

Tags are often used in pairs, with a start tag such as <BODY> and a corresponding end tag with a / before the element name, such as </BODY>

Page 86: Chapters: 10, 12, 13, 14, 15, 16 Final Review 1. Chapter 10 Operating Systems

86

HTML

The browser determines how the page should be displayed based on the tags

The browser– Ignores the way we format the HTML

document using carriage returns, extra spaces, and blank lines

– Takes into account the width and height of the browser window

– Reformats the contents to fit your browser window

Page 87: Chapters: 10, 12, 13, 14, 15, 16 Final Review 1. Chapter 10 Operating Systems

87

Java Applets

Java applet

A Java program designed to be embedded into an HTML document, transferred over the Web, and executed in a browser

<P><APPLET code = "FactByte.class" width=250 height=150></APPLET></P>

Page 88: Chapters: 10, 12, 13, 14, 15, 16 Final Review 1. Chapter 10 Operating Systems

88

Java Applets

Example

link:http://www.cs.utexas.edu/users/ndale/labs/factorial/FactByte.htm

Contents of FactByte.htm:

<H1>Factorial with Byte Result</H1>

<P>Enter increasing values beginning with 0 and record the results of the Factorial of your input. At some point, the answer will seem strange. Record what seems strange about the answer and return to the previous page. </P>

<P><HR></P>

<P><APPLET code = "FactByte.class" width=250 height=150></APPLET></P>

FactByte.classcontains theJava applet

Page 89: Chapters: 10, 12, 13, 14, 15, 16 Final Review 1. Chapter 10 Operating Systems

89

Java Server Pages

JSP Scriptlet

A portion of code embedded in an HTML document designed to dynamically contribute to the content of the web page

Java Server Page

A web page that has a JSP scriptlet interwoven among the HTML content

Page 90: Chapters: 10, 12, 13, 14, 15, 16 Final Review 1. Chapter 10 Operating Systems

90

Java Server Pages

A JSP scriptlet is encased in special tags beginning with <% and ending with %>

Imagine JSP scriptlets as having the expressive power of a full programming language

Page 91: Chapters: 10, 12, 13, 14, 15, 16 Final Review 1. Chapter 10 Operating Systems

91

Java Server Pages

JSPs are executed on the server side where the web page resides

By the time it arrives at your computer, all active processing has taken place, producing a static (though dynamically created) web page

JSPs are particularly good for coordinating the interaction between a web page and an underlying database

Compare and contrast Javaapplets and JSP scriptlets