- •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
Relocation
A solution that was invented before virtual memory was to write programs in a special way. Any memory location that contained an address was specially marked in the binary file. When the user tried to run the program, the operating system would allocate memory for it somewhere and load the program into that memory area. As it did so, it would "fix up" all the specially marked address references so that they pointed to the correct locations. For example, let us say the original program contained a table of information starting at memory location 700. Another part of the program—say, at location 210—contained the address of the table (i.e., the value 700) and was specially marked as containing an address. The operating system loads this program into memory, beginning at location 30,000. As it does so, it changes the value in location 30,210 from 700 to 30,700, and so on. This process is called relocation.
This scheme allows the computer to load multiple programs in memory at once, in whatever portion of memory is available at the time. Its advantages are that it is simple to implement and does not require any changes to the hardware. But, it also has some serious shortcomings. First of all, because of the way relocation works, the memory allocated to the program must be contiguous. Suppose the user is running a half a dozen small programs at the same time. After some of these programs have exited, programs 1, 3, and 6 are left running. Now the user wants to run a big application, but unfortunately, there may now be nowhere to put it. If the application cannot squeeze into the space that was used by program 2 or by programs 4 and 5 together, then it cannot fit into memory, even though the total number of noncontiguous free blocks of memory may be more than adequate.
Another drawback of this approach is that the size of a running program is limited to the amount of physical memory installed on the machine, minus whatever the operating system has reserved for itself. But, large programs do not normally use all their memory at once. A program with a large address space may only need to access a few thousand instructions and a few thousand bytes of data at a time. It would be more efficient to allocate only a little bit of RAM at a time to such a program and to keep the rest of its address space somewhere else, such as on disk. This is what virtual memory allows us to do.
Virtual Memory
In a virtual memory system, every program runs in its own private address space. Thus, there is no need for any relocation when the program is loaded into memory. A virtual address space can be larger or smaller than the processor's physical memory. In order for this scheme to work, though, virtual memory requires hardware support. First, memory is divided into chunks called pages. A page is the smallest piece of memory that can be allocated to a program. On Pentium platforms, a page is 4 KB. Second, the processor must have a way of turning virtual addresses into real ones.
Processors that support virtual memory, such as the Pentium, can run in two modes. In real mode, addresses refer to physical locations in RAM. Only the kernel is allowed to run in real mode. In virtual mode, every address is "translated" into a physical memory location by means of a page table. For each page in the virtual address space, the page table gives the real address in RAM where the page is located.
Let us see how this applies to the hypothetical program described earlier. This program will run in its own virtual address space, starting at location zero. When the processor loads the program into RAM starting at location 30,000, it sets the page table entry for page 0 to the value 30,000. Now, when an instruction loads the address at virtual location 210, the processor's address translation circuitry actually causes the data to be loaded from physical location 30,210. The value read from that location in memory will be 30,700 (remember, location 210 holds the address of the table, which is 700), the virtual address of the table. If another instruction then tries to access the table by using this 700 address, once again the address translation mechanism will intervene and convert the reference to location 30,700. The user program only deals with virtual addresses; it has no idea in what portion of physical memory it is running. When the processor is in virtual mode, address translation is happening all the time. Every single memory reference is translated. It happens very quickly because translation takes place on board the processor chip.
With a virtual memory scheme, every program has its own page table, maintained by the kernel. And, physical memory allocated to a program need not be contiguous. Our hypothetical program's page table could say, "Okay, page zero begins at real address 30,000; page one begins at 34,000; page two begins at 62,000; and so on." The user program has no idea that it is spread out across physical memory, because it is living in a virtual world and cannot see the real addresses.
With a little extra help from the hardware, we can carry this scheme one step further and completely divorce virtual memory from RAM. Let us say we do not want to load the entire program into RAM at once, so we only load a couple of pages. For those pages we choose not to load, we put a special marker in the page table that says, "This page is not in RAM." Now the user program starts running, and it makes a memory reference to page zero that is translated nicely. It makes a memory reference to page one, and the processor again looks at the page table and finds the corresponding physical address. Then, the program refers to a memory location that falls on page seven, which we did not load into RAM. The address translation circuitry checks the page table, finds the "not in RAM" marker, and generates a page fault. This is a kind of interrupt. The processor stops executing the user program and gives control to the kernel. The kernel looks at certain status registers to figure out where the page fault came from and says, "Oh, this process wants access to its virtual page seven. I will get some RAM here and load in page seven of the program. Now I will fix update the page table, and I will let the program the instruction again." So, control is returned to the user program, and the program continues as if nothing unusual had happened.
With hardware paging support, user programs really do live in a virtual world. Not only do they not know which chunks of RAM they are using, they do not even know which of their pages are in RAM right now and which are sitting on disk! Every time the process tries to reference a page that is on disk, the page is moved to RAM. And, if the process has not touched a page in a while, it might be moved back to disk. By introducing virtual memory, we have provided user programs with a very clean memory abstraction. They need not worry about sharing the address space with the operating system or with other applications. They need not worry about how much physical memory is on the machine. They have an entire virtual address space to use as they like, and the kernel takes care of the implementation details.
One drawback of using the hard drive for virtual memory is that this can keep the hard drive so busy that access to other files is delayed. For systems that involve frequent file accesses but also require virtual memory, it may be advisable to put the swap file (the file containing all virtual memory pages) on a separate drive.
