- •Ssd2: Introduction to Computer Systems contents
- •Prerequisites
- •Course Textbook
- •Hardware/Software Requirements
- •The purpose of ssd2 is for students to
- •Students successfully completing ssd2 will be able to
- •1.1 Overview of Computer Systems
- •1.1.1 Components of a Computer System
- •Hardware System
- •Software System—Operating System Software and Application Software
- •Network System
- •1.2 Evolution of Computer Systems
- •1.2.1 Brief History
- •1200S—Manual Calculating Devices
- •1600S—Mechanical Calculators
- •1800S—Punched Cards
- •1940S—Vacuum Tubes
- •1950S—Transistors
- •1960S—Integrated Circuits
- •1970S to Present—Microprocessor
- •Pace of Advancement
- •1.2.2 Applications of Computer Systems
- •In Education Multimedia-Facilitated Learning
- •Simulation-Based Education
- •Intelligent Machine-Based Training
- •Interactive Learning
- •In Business Supply Chain Management
- •Project Management
- •Customer Relationship Management
- •Sales and Marketing Using Electronic Commerce
- •Manufacturing Research
- •In Entertainment Movies
- •Video Games
- •1.3 Data Representation in a Computer System
- •1.3.1 Bits and Bytes
- •Data Representation Using Binary Digits
- •Increasing Need for Bytes
- •1.3.2 Number Systems
- •Decimal
- •Hexadecimal
- •Learning Exercise
- •2.1 Processor and Memory
- •2.1.1 Processor Basics
- •Processor
- •Instruction Execution with the cpu
- •Performance: Factors and Measures
- •Types of Processors
- •2.1.2 Types of Memory
- •Cmos Memory
- •Summary
- •2.1.3 Lab: Benchmarking (Optional)
- •2.2 Peripherals
- •2.2.1 Connecting Peripherals
- •Expansion Slots and Cards
- •Usb and FireWire
- •Comparing Different Ports
- •2.2.2 Buses
- •2.2.3 Input/Output Devices
- •Input Devices
- •Cameras
- •Digital Camcorders
- •Scanners
- •Output Devices: Monitors and Projectors
- •Crt Monitors
- •Lcd Monitors
- •Projectors
- •Output Devices: Printers
- •Ink Printers
- •Dye-Sublimation Printers
- •Laser Printers
- •Comparing Printers
- •2.3 Storage Devices
- •2.3.1 Disk Controller Interfaces
- •Ide Interface
- •Eide Master/Slave
- •2.3.2 Mass Storage
- •How Mass Storage Devices Differ from ram
- •Disk Drive Reliability
- •Optical Media: cDs versus dvDs
- •Magnetic Media
- •Optical versus Magnetic
- •Solid State
- •Comparing Storages
- •2.4 Putting Together the Hardware Components
- •2.4.1 How Components Work Together
- •2.4.2 Lab: Researching a Computer System
- •2.4.3 Lab: Online Configuration
- •2.5 Improving Computer Performance
- •2.5.1 Moore's Law
- •2.5.2 Bottlenecks
- •Bottlenecks—Slowing a Process
- •Typical Bottlenecks
- •Eliminating Bottlenecks
- •2.5.3 Throughput and Latency
- •Unit 3. Operating System Software
- •3.1 Structure
- •3.1.1 Layers of Software
- •Layers and Process Management
- •Encapsulation and Abstraction
- •Layers of Software
- •3.1.2 The bios: Life at the Bottom
- •The Role of the bios
- •Changing bios Settings
- •3.1.3 Process Control
- •3.1.4 Lab: The Task Manager
- •3.2 Device Management and Configuration
- •3.2.1 Interrupt Handling
- •Interrupts
- •Interrupt Priority and Nested Interrupts
- •Traps and Faults
- •3.2.2 Hardware Attributes
- •Installing Drivers
- •Changing a Driver's Configuration
- •3.2.3 Configuration
- •3.2.4 Lab: Device Management
- •3.3 Resource Sharing
- •3.3.1 Virtual Memory
- •Managing Memory
- •Relocation
- •Virtual Memory
- •3.3.2 File and Printer Sharing
- •Printers
- •3.4 File Systems
- •3.4.1 File Organization
- •Folders
- •Shortcuts
- •File Names and Types
- •3.4.2 File Allocation Table and nt File System
- •Clusters and File Allocation Tables
- •Nt File System
- •Unit 4. Application Software
- •4.1 Software Basics
- •4.2 Using Software Systems
- •4.2.1 Lab: dos Commands
- •4.2.2 Lab: Macros
- •4.2.3 Lab: Embedding Application Objects
- •4.3 Batch Script Files
- •4.3.1 Advanced Command-Line Functions
- •Dos Command Syntax
- •Review of File System Commands
- •Wildcard Characters
- •Redirection and Piping
- •4.3.2 Batch File Commands
- •Batch Files
- •Commands
- •4.3.3 Lab: Creating a Batch File
- •Example of a Batch File
- •Example of a Batch File with Arguments
- •4.4 Databases
- •4.4.1 Lab: Searching the Library of Congress
- •4.5 Software Engineering
- •4.5.1 Issues in Large-Scale Software Development
- •The Software Development Process
- •Define or Redefine the Problem
- •Plan a Solution to the Problem
- •Code the Solution
- •Evaluate and Test Everything
- •4.5.2 Open Source Model
- •Free Software
- •4.5.3 Tools for Software Creation and Management
- •Editors
- •Compilers
- •Debuggers
- •Integrated Development Environments (idEs)
- •Unit 5. Network Systems
- •5.1 Internet Basics
- •5.1.1 Mime Types
- •5.1.2 Internet Languages
- •JavaScript
- •5.2 Local and Wide Area Networks
- •5.3 Communication Strategies
- •5.3.1 Client-Server Framework
- •5.3.2 Peer-to-Peer Connectivity
- •5.4 Data Transfer Technologies
- •5.5 Internet Architecture
- •5.5.1 Routers and tcp/ip
- •Internet Protocol
- •Routers
- •Transmission Control Protocol
- •5.5.2 Domain Name Service
- •Domain Name Service
- •5.5.3 Connectivity
- •Conventional Analog Phone Lines
- •Isdn: Integrated Services Digital Network
- •Cable Modem
- •XDsl: Digital Subscriber Line
- •Dedicated High Speed Lines
- •5.5.4 Internet Service Providers
- •Unit 6. Computer Security
- •6.1 Security Threats
- •6.1.1 Intruders: Who, Why, and How?
- •6.1.2 Identity Theft and Privacy Violation
- •Password Cracking
- •Packet sniffing
- •Social Engineering/Fraud
- •Spoofing
- •Port Scanning
- •6.1.3 Malicious Software
- •Trojan Horse
- •Prevention
- •Detection
- •Counter Measures
- •6.1.4 Denial of Service
- •Network Connectivity
- •Network Bandwidth
- •Other Resource Consumption Attacks
- •Distributed Denial of Service Attack
- •Prevention
- •6.2 Security Technologies
- •6.2.1 Encryption
- •Substitution Cipher
- •Transmitting the Key
- •Private Key Encryption Scheme
- •Public Key Encryption Scheme
- •Hybrid Encryption Schemes
- •6.2.2 Applications of Encryption
- •Hard Drives
- •Dvd Movies
- •Cellular Phones
- •6.2.3 Authentication
- •Strong Passwords
- •Smart Cards
- •Biometrics
- •Digital Signatures
- •Digital Certificates and Certificate Authorities
- •Ssl Protocol
- •6.3 Prevention, Detection, and Recovery
- •6.3.1 Firewall
- •Application Gateway
- •Packet Filter
- •Application Gateway versus Packet Filter
- •Intruder Attacks Prevented by Firewall
- •Setting up a Firewall
- •6.3.2 Intrusion Detection Tools
- •Intrusion Detection Systems
- •Network Monitoring Tools
- •Anti-Virus Software
- •6.3.3 Data Recovery
- •6.3.4 Summary of Security Tips
4.3.2 Batch File Commands
Batch Files
Commands
Like Macros, which were discussed in 4.2.2 Lab: Macros, batch files automate tasks. This section gives an overview of batch files and covers some commands that can be used in batch files.
Batch Files
The term batch file originally meant non-interactive. In early computer systems, users would submit programs on decks of punched cards, which would be collected into batches and run. The output was then printed and returned to the users. As operating systems developed further, batch processing came to include a scheduling function, whereby the system would choose which job to run next based on priority level and resources required. It was also possible to specify that a job should run at a particular time of day (for example, do disk backups at night), or repeatedly, such as a weekly inventory report or monthly payroll processing at a company. The central idea, though, was that batch programs were self-contained and did not rely on user interaction.
A batch file under Windows, or a "shell script" in UNIX, performs a similar function. It consists of a sequence of commands to run programs and manipulate files. It is possible to construct completely autonomous batch files that require no user interaction to run, but this is not strictly necessary. The DOS command-line processor, which executes batch files, does provide for some simple forms of user interaction, as you will see.
A batch file under Windows is a plain text file (not a Word file), with the extension .BAT. A batch file contains DOS commands and names of programs to execute. The file may also contain flow control commands that tell the command processor to loop (repeat certain instructions) or to handle error conditions in a particular way.
A common use of batch files is to write new commands. For example, here is a batch file SWAP.BAT that swaps two files by renaming them:
REM Here is the source to SWAP file1 file2 @ECHO OFF REM Remember that / precedes a switch. REM Use HELP DEL or DEL /? to find out about /Q DEL/Q TEMP MOVE %1 TEMP MOVE %2 %1 MOVE TEMP %2
The notation %1, %2, etc., refers to the arguments to the swap command. If the user types "SWAP A.TXT B.DOC" to the command line, then SWAP refers to a new command defined by our batch file, and while the batch file is executing, the %1 is equivalent to A.TXT, and the %2 is equivalent to B.DOC. It is also possible to introduce named variables in a batch file, such as %NAME%, by using assignment statements.
Creating a batch file is actually a type of programming—using a "language" that is very limited. One unusual feature of this language is that a syntax error in one line does not stop the execution of the file. If a syntax error is encountered, an error message is displayed and the batch file continues with the next command. This could have unintended consequences. Just as with other types of programs, it is important to test a batch file thoroughly before using it in any critical application.
Commands
The following is a list of command-line features commonly used in batch files:
rem remark This designates anything that follows the rem command on the line (remark in our example) as a comment.
echo message This command displays message to Standard Output. The echo command can also be used with output redirection to send a message to a file. For example, echo starting stage three.
echo. Notice the period ( . ) at the end of the echo command. This is a special variation of the echo command, which displays a blank line to Standard Output.
@echo off This stops commands in the batch file from being displayed to Standard Output. By default, each line of text in the batch file encountered by the command processor is displayed to Standard Output. While this default mode is useful for debugging purposes, the resulting display often confuses users, so most commands written as batch files begin with @ echo off.
pause This command interrupts the execution of the batch file and displays the message "Press any key to continue...." Execution resumes when a single keyboard key is pressed. This command is useful if you want to make a batch file stop and wait for the user to perform some action (such as inserting a floppy disk) before it continues executing.
: label Any line in the batch file that starts with a colon ( : ) is considered a label. Labels are used by certain flow control commands to repeat or skip over certain lines in the file. After the colon ( : ), provide some appropriate name as the label name. The name should not contain any embedded spaces.
goto label This command causes the command processor to execute the first command line after the label referenced by the command.
if exist filename command This command evaluates the current working directory for a file or subdirectory. In the example above, if the statement is true (that is, if a file named filenameexists), then the command (command in our example) is executed. Therefore, a command that reads if exist index.html del index.html determines if a file named index.html exists and, if it does, deletes it.
The lab in the next section gives examples of using these commands in the context of a batch file.
