Computer Hardware
Instruction fetch cycle in a computer:
#--------------------------------------
# IR - Instruction register, CPU memory
# cell that holds the instruction
# currently executing. All
# instructions perform a single,
# small, well-defined task. # PC - Program Counter, address in # memory of where the next # instruction to execute is stored. # WHILE (forever) { IR <- Mem[PC] PC <- PC + 1 Execute IR }
# Pieces of a Computer: CPU: executes instructions RAM Memory: fast, volatile ROM Memory: fast non-volatile I/O Devices: Keyboard Mouse Printer CDROM/DVD Secondary Storage (not "Memory"): Hard Disk Memory Stick Network adapter
# Types of Instructions: Calculate a value Store a value in memory Input/Output (move values to or from I/O devices) Change PC (loop, branch)
# The computer is not intelligent, it # can execute very simple sinstructions. # The intelligence in computers is # achieved by human beings being able # to express complex processes in terms # of simple computer instructions.
|
Operating System
Program: A set of instructions
Process: A program that has been copied
into memory is being executed
Multi-processing
CPU executes one instruction at a time. CPUs are "timeshared" so it appears multiple programs are executing concurrently (think of a chess grandmaster playing hundreds of chess games at the same time)
An operating system is software.
Operating Systems Functions: 1. Provides a "simple" interface for performing I/O. 2. Controls the multipprocessing 3. Organizes the secondary storage into a "file system" 4. Fetches programs from the file system into memory and starts them executing (makes them processes). a. Command line interface b. Window interface
File System
* Files and Directories/Folders (mostly)
* Folders form tree-structured storage
organization (but not really)
* Full Pathname
* Current/working directory and
Relative Pathname
* Users and Permissions
a. Administrator
b. Limited Account
* File Types
a. Files contains 1s and 0s
b. Programs choose how to
interpret those binary values
i. text
ii. Word Processed
iii. Image
* Determining File Types
a. By content
b. By filename
* Network File System
a. Network Computer System Names:
nwdata1 pluto
stu.cs.jmu.edu
b. Mounting
Single pruned tree
Separate Drives
* WWW (specialized network file system)
a. Read-only
b. URLs
|