Title: hosseini@ferdowsi.um.ac.ir E.mail
1?????? ???? ?? ???? ???????
- ????? ?????
- ???? ??? ???? ????? ???
- hosseini_at_ferdowsi.um.ac.ir E.mail
- Home Page hosseini.staffcms.um.ac.ir
2???? ?????
- ?????? ?? ???????? ????
- Central Processing unit (CPU)
- Input / Output
- Storage
- Operating System
- ?????? ?? ??????? ?????? ?????
- ?????? ?? ???? ??? ????????? ? ???????
- ?????? ?? ??????? ?????????
- ?????? ?? ??????? ????????
- ?????? ?? ?? ? ?? ??????
- ?????? ?? LMS ? ????? ????? ????? ? ????? ?????
- ?????? ?? ????? ??????? ???? online
- ?????? ?? ????? ??? ?????? ?????
- ?????? ?? ??? ???????? ?? ???? ???
- ?????? ?? RSS (Really Simple Syndication )
????? ????? ??? ????? ????
3??????
- ????? 1 ????? ???? ?? ???? ?? ????? 5 ????
- ????? 2 ????? ?? ???? ?? ???? ????? ?????
- ????? 3 ????? ?? ????? ?? ???? ??? OPAC(Online
Public Access Catalog) - ????? 4????? ?? ??? ????? ???? ????? ?????
- ????? 5 ??????? ?? ?????? ????? ?? ???? webinar
4????????
- ??? ?? ??????? ??? ????? ?? ?????? ?????? ??????
??? ????? ? ?? ????? ????? ???? ??? ?????? ????
??????? ??? ????? ?? ? ?????? ?????? ??
????????? ????? ?? ?? ? ????? ? ??? ? ????
??????? ???? ???. - ???????? ????? ????? ?? ???? ?????? ?????
???????? ??? ? ?????? (??????)?? ????. - ?? ???? ?? ?? ?????? ???????? ?????? ?? ???
?????? ???? ?? ??? ?? - ???????? ?? ?? ?????? ??????? ?? ??????(??????)
???? ? ????? ?? ????? ????( ?? ???? ? ??? ?????
????).
5????????
- ?? ??? 1960 ?? ???????? ????? ?? ???? ?? ????
???? ?? ????? ?? ???? ? ?? ??? ????? ????? ????
?????? ?? ????? ???? ?? ????? ????? ???? ?????
????? ?? ????? ???? ???. - ???? ???? ?? ?? ???? ???? ????? ?? ?????? ?????
?? ??? ?? ?? ???? ?? ???? ?? ???? ?????? ??
?????? ? ???? ????? ???? ? ?????? ????? ????? ?
?? ??? ??? ???? ??????? ?? ?? ????? ??????.
6???? ??? ????????
- ??? ????? ?????? ?????????? ?? ???? ?? ??
????? ???? ?? ???? ?? ?????.(???? ????? ????????
?? ???? ?? ????) - ??? ????? ??????
- ??? ????? ???????
7???? ??? ????????
- ??? ????? ?????? ????? ??????????? ? ?????????
???????? ??? ???? ?????? ?? ?? ??? ???? ???? ????
?? ???? ?? ?????. - ??? ????? ?? ???? ?? ?? ?????? ???????? ????
??? ?? ????.
8????? ????????
- ???????? ?????? ????? ??????????? ? ?????????
??????? ? ??? ???? ?????? ?? ?? ??? ???? ????
???? ?? ???? ?? ????? ? ?????? ?????? ??????? ??
?????. - ???????? ?????? ?????????? ?? ???? ?? ?
?????????? ?? ?? ????? ? ??????? ?? ??? ???? ??
????(??????) ?? ???.
9?????? ????????
- ?? ?????? ?????????? ?? ?????? ??????? ?? ??
????? ???? ????? ? ????? ? ?????? ???? ? ??????
????? ?? ?? ????? ???? ????? ?? ???? ??????
????????? ???? ?? ???.
10???? ??? ????????
- ???? ????? (Input Unit)
- ???? ????? (System Unit)
- ???? ????? (Output Unit)
11???? ??? ????????
12???? ?????
- ???? ????? (Memory Unit)
- ???? ????? (Control Unit)
- ???? ?????? ? ???? (Arithematic Logic Unit)
13???????? ?????
14???? ??????? ?????
15The Little Man Computer
16????? ?????
- ????? ????
- - ????? ???? (Cache)
- - ???? ?? (Registers)
- - ????? ???? (Main Memory)
- ????? ?????
17RAM ?? ????? SAM
- RAM (Random Access Memory)
- ??? ??????? ?? ??? ??? ?? ????? ?? ?????? ??? .
??? ?? ???? ?? ?? ???? ????? ???????" ???????
???? ??? - SAM (Serial Access Memory)
- ????? ???SAM ??????? ?? ?? ?????? ?? ?? ???? ???
????? ????? ? ????" ????? ??????? ?? ???? ?????
?????? ???? ????? ???? ???? ???? ????
18???? ?????
- ?? ???? ????? ?? ?? ???????? ?? ???? ? ??
?????????? ?? ???? ?? ????? ???. - ?????? ???? ?? ??????? ?? ??? ???? ????? ???.
- ???? ??????? ????? ?? ??? ?? ?? ?? ?? ??? ??? ?
?? ??? ??????? ?? ???. - ?????? ?????????? ????? ?? ????? ???? ?? ?????
????? ?????? ????? ?? ??? ????? ????? ?? ??
????? ?????? ????? ????? ??? ?? ???? ?? ?????
????? ????? ?? ?? ? ????? ?? ?????. ???? ????? ??
???) ???) ???? ?? ???? ?? ??????? ??????? ?? ???.
19?? ???? ?????
20????? ????? ????
- RAM( Random Access Memory)
- ROM( Read Only Memory)
- PROM( Programmable ROM)
- EPROM( Erasable PROM)
21RAM
- 1- ?? ???????? (SRAM) ?? ??? ??? ????? ????? ??
??? ???? ???? ?? ???? ???? ????? ?? ??? ?? ??
????? ???? ?? ?? ????? ?? ???? ?????????? ?????
?? ???. ??? ??? ???? ????? ???? ????? ????
??????? ?????.2- ?? ???????? (DRAM) ????? ???
????? ???? ?? ???? ????? ?? ??? ?? ?? ??????????
???? ???? ???/??? ?? ???. ???? ???? ???? ??? ???
????????? ?? ??? ??? ????? ?? refresh ????. ???
??? ????? ?? ?????? ?? SRAM ????? ???? ???????
???? ( ???? ??????? ????? ) ??? ??????? ?? ????
?????.
22ROM
- Non-volatile memory to hold software that is not
expected to change over the life of the system - Magnetic core memory
- EEPROM
- Electrically Erasable Programmable ROM
- Slower and less flexible than Flash ROM
- Flash ROM
- Faster than disks but more expensive
- Uses
- BIOS initial boot instructions and diagnostics
- Digital cameras
23????? ?????
- ?? ?????? ???? ?????? ?????
- -1 ????? ??? ??? MAR
- LMC 100 (00 to 99)
- 2K where K width of the register in bits
- -2 ???? ???? ??????????
- 4 bits allows 16 locations
- 8 bits allows 256 locations
- 32 bits allows 4,294,967,296 or 4 GB
- ????? ????? ?? ??????
- Insufficient memory can cause a processor to work
at 50 below performance
24????? ????
25????? ????
26Cache
27????? ????? ????
- Level 1 of Cache
- ???? ???????? ???? ?? ???? ????????? ?????? ?????
- Level 2 of Cache
- ????? ?? ???? ???????? ???? ? ????? ???? ? ????
????? ??? - Level 2 of Cache
- ?? ??????? ??? ???? ???? ?? ?????? ???.
28(No Transcript)
29 ?????? ???????
30Fetch-Execute Cycle
- Two-cycle process because both instructions and
data are in memory - Fetch
- Decode or find instruction, load from memory into
register and signal ALU - Execute
- Performs operation that instruction requires
- Move/transform data
31 ????? ??? MAR ? MDR
32???? MAR-MDR
msb(memory storage buffer) lsb(latest significant
byte)
33?????? ?? ?????
34Load Fetch/Execute Cycle
35Store Fetch/Execute Cycle
36ADD Fetch/Execute Cycle
37Instruction Elements
- OPCODE task
- Source OPERAND(s)
- Result OPERAND
- Location of data (register, memory)
- Explicit included in instruction
- Implicit default assumed
Addresses
38Instruction Types
- Data Transfer (load, store)
- Most common, greatest flexibility
- Involve memory and registers
- Whats a word ? 16? 32? 64 bits?
- Arithmetic
- Operators - /
- Integers and floating point
- Logical or Boolean
- Relational operators gt lt
- Boolean operators AND, OR, XOR, NOR, and NOT
- Single operand manipulation instructions
- Negating, decrementing, incrementing
39More Instruction Types
- Bit manipulation instructions
- Flags to test for conditions
- Shift and rotate
- Program control
- Stack instructions
- Multiple data instructions
- I/O and machine control
????? ????????-???? ??????
40Register Shifts and Rotates
41Stack Instructions
- Stack instructions
- LIFO method for organizing information
- Items removed in the reverse order from that in
which they are added
Push
Pop
42Fixed Location Subroutine Return Address
Storage
43?????? ??
- Data Bus
- ?????? ???? ?? ?????? ?? ???? ????? ?? ???. ???
?????? ???? ??? ? ??? ??????? ??? - Address Bus
- ?????? ???? ?????? ????? ??? ?? ???????? ?? ????
?? ????? ??? ???? ???? ???? ?? ?? ?? ????? ????
?? ??? ?? ???? ???? ??? ?? ???? ?????? ??? ? ??
???? ?????? ???? ????? ??? - Control Bus
- ?????? ????? ??????? ??? ?? ????? ?????? ????
???????? ?? ???? ??????? ??? ?????? ?? ????? ??
?? ???? ????
44????????
45?????? ??
46Point-to-point vs. Multipoint
Plug-in device
Broadcast bus Example Ethernet
Shared among multiple devices
47???? ???? ????????
48???? ???? ????????
- ???? ???? ?? CPU ? ????? ?????? ?? ????
49???????? ?? PC
AGP(Accelerated Graphics Port) PCI(Peripheral
Component Interconnect) ISA(Industry Standard
Architecture)
50???? ?????
- ?? ?????? ?????????? ?? ??????? ?? ?? ????? ????
????? ? ?? ???? ????? ????? ?? ???.
51?????
52?????
53?????
54?????
55?????/?????
56????? /?????
57Basic Model
- Processing speed or program execution
- determined primarily by ability of I/O operations
to stay ahead of processor.
58I/O Considerations
- Speed Issues
- CPU operates at speeds much faster than the
fastest I/O device - Devices operate at different speeds
- Character device, there is not any addressing or
searching, printer, network card - Block devices (disk or tape drive)
- Coordination
- Several devices perform I/O simultaneously
- Unexpected input
- Various input formats
- Status information needed for each device
59I/O Device Interface Issues
- Different formats
- parallel interface
- serial interface
- Buffering of data
- Burst vs. stream
- Different control requirements
- electromechanical
60Examples of I/O Devices
61Simple I/O Configuration
62I/O Modules Functions
- Recognizes messages from device(s) addressed to
it and accepts commands from the CPU - Provides a buffer where the data from memory can
be held until it can be transferred to the disk - Provides the necessary registers and controls to
perform a direct memory transfer - Physically controls the device
- Copies data from its buffer to the device/from
the CPU to its buffer - Notifies with interrupts
63Input/Output Modules
- Programmed I/O
- CPU controlled I/O
- Interrupt Driven I/O
- External input controls
- Direct Memory Access Controllers
- Method for transferring data between main memory
and a device that bypasses the CPU
64Programmed I/O
65Programmed I/O Example
66Programmed I/O Example
67Interrupts
- Signal that causes the CPU to alter its normal
flow on instruction execution - frees CPU from waiting for events
- provides control for external input
- Examples
- unexpected input
- abnormal situation
- illegal instructions
- multitasking, multiprocessing
68The CPU - The Interrupt Cycle
- Fetch / Execute cycle
- Interrupt cycle
START
Fetch Next Instruction
Execute Instruction
HALT
Interrupts Disabled
Check/Process Interrupt
69Interrupt Terminology
- Interrupt lines (hardware)
- Interrupt request
- Interrupt handlers
- Program that services the interrupt
- Also known as an interrupt routine
- Process Control Block (PCB)
- Located in a part of memory known as the stack
area - All registers of a program are saved here before
control is transferred to the interrupt handler
70Interrupt Terminology
- Servicing the interrupt
- suspends program in progress
- saves pertinent information including last
instruction executed and data values in registers
in the PCB (process control block) - branches to interrupt handler
71Servicing an Interrupt
72Use of Interrupts
- Notify that an external event has occurred
- real-time or time-sensitive
- Signal completion
- printer ready or buffer full
- Allocate CPU time
- time sharing
- Indicate abnormal event (CPU originates for
notification and recovery) - illegal operation, hardware error
- Software interrupts
73Multiple Interrupts Example
74Basic CPU-Memory-I/O Pathway
75External Interface Buses and Ports
- Parallel port
- Serial port
- RS-232C and RS-422 buses
- SCSI
- Small Computer System Interface
- USB, USB-2
- Universal Serial Bus
76???? ?????
- ?? ?????? ?????????? ?? ??????? ?? ?? ?????
???????? ????? ? ?? ????? ???? ????? ?? ???.
77?????
78?????
79?????
80?????
81?????
82??? ??????? ?? ????? ?????
- ??????? ?? ??????? ?? ????? ????
- ?? ??? ??? ??????? ?? ??? ?? ???
- ??????? ?????? ?? ?????? ?? ????? ??
- ???????
83????? ?????
84????? ?????
85????? ?????
86?????? ????? ????
87?????? ????? ????
88?????? ????? ????
89????? ?????
90????? ?????
91????? ?????
92Storage Devices
- Primary memory
- Expanded storage
- Secondary storage
- Data and programs must be copied to primary
memory for CPU access - Permanence of data
- Direct access storage devices (DASDs)
- Online storage
- Offline storage loaded when needed
93Speed
- Measured by access time and data transfer rate
- Access time average time it takes a computer to
locate data and read it - millisecond one-thousandth of a second
- Data transfer rate amount of data that moves per
second
94Hierarchy of Storage
95Secondary Storage Devices
- Hard drives, floppy drives
- CD-ROM and DVD-ROM drives
- CD-R, CD-RW, DVD-RAM, DVD-RW
- Tape drives
- Network drives
- Direct access vs. Sequential access
- Rotation vs. Linear
96Magnetic Disks
- Track circle
- Cylinder same track on all platters
- Block small arc of a track
- Sector pie-shaped part of a platter
- Head reads data off the disk
- Head crash
- Parked heads
- Number of bits on each track is the same! Denser
towards the center. - CAV constant angular velocity
- Spins the same speed for every track
- Hard drives 3600 rpm 7200 rpm
- Floppy drives 360 rpm
97A Hard Disk Layout
98Locating a Block of Data
- Average seek time time required to move from one
track to another - Latency time required for disk to rotate to
beginning of correct sector - Transfer time time required to transfer a block
of data to the disk controller buffer
99Disk Access Times
- Avg. Seek time
- average time to move from one track to another
- Avg. Latency time
- average time to rotate to the beginning of the
sector - Avg. Latency time ½ 1/rotational speed
- Transfer time
- 1/( of sectors rotational speed)
- Total Time to access a disk block
- Avg. seek time avg. latency time avg.
transfer time
100Magnetic Disks
- Data Block Format
- Interblock gap
- Header
- Data
- Formatting disk
- Disk Interleaving
- Disk Arrays
- RAID mirrored, striped
- Majority logic ? fault-tolerant computers
Disk Interleaving
101Disk Block Formats
Single Data Block
Header for Windows disk
102Alternate Disk Technologies
- Removable hard drives
- Disk pack disk platters are stored in a plastic
case that is removable - Another version includes the disk head and arm
assembly in the case - Fixed-head disk drives
- One head per track
- Eliminates the seek time
- Bernoulli Disk Drives
- Hybrid approach that incorporates both floppy and
hard disk technology - Zip drives
103Optical Storage
- Reflected light off a mirrored or pitted surface
- CD-ROM
- Spiral 3 miles long, containing 15 billion bits!
- CLV all blocks are same physical length
- Block 2352 bytes
- 2k of data (2048 bytes)
- 16 bytes for header (12 start, 4 id)
- 288 bytes for advanced error control
- DVD-ROM
- 4.7G per layer
- Max 2 layers per side, 2 sides 17G
104Optical Storage
- Laser strikes land light reflected into
detector - Laser strikes a pit light scattered
105Layout CD-ROM vs. Standard Disk
CD-ROM
Hard Disk
106CD-ROMs
107Types of Optical Storage
- WORM Disks
- Write-once-read-many times
- Medium can be altered by using a medium-powered
laser to blister the surface - Data stored in concentric tracks, sectored like a
magnetic disk - Medium-powered laser blister technology also used
for - CD-R, DVD-R, DVD-ROM
- CD-RW, DVD-RW, DVD-RAM, DVDRAM
108Displays
- Pixel picture element
- Size diagonal length of screen
- Resolution (pixels on screen)
- VGA 480 x 640
- SVGA 600 x 800
- 768 x 1024
- 1280 x 1024
- Picture size calculation
- Resolution bits required to represent number of
colors in picture - Example 16 color image, 100 pixels by 50 pixels
- 4 bits (16 colors) 100 50 20,000 bits
109Display Screen
- Screen size measured diagonally
- Resolution minimum identifiable pixel size
-
110Color and Displays
- Pixel color is determined by intensity of 3
colors Red Green Blue or RGB - 4 bits per color
- 16 x 16 x 16 4096 colors
- 24 bit color (True Color)
- 16.7 million colors
- Video memory requirements are significant!
111Text Monitors
- 24 lines x 80 chars
- A character is the smallest unit on a screen
- Very little memory required
- Fast for remote transmissions
112Printers
- Dots vs. pixels
- 300-2400 dpi vs. 70-100 pixels per inch
- Dots are on or off, pixels have intensities
- Types
- Typewriter / obsolete
- Dot matrix usually 24 pins, impact printing
- Inkjet squirts heated droplets of ink
- Laser jet
113Creating a Gray Scale
114Laser Printer Operation
- Dots of laser light are beamed onto a drum
- Drum becomes electrically charged
- Drum passes through toner which then sticks to
the electrically charged places - Electrically charged paper is fed toward the drum
- Toner is transferred from the drum to the paper
- The fusing system heats and melts the toner onto
the paper - A corona wire resets the electrical charge on the
drum
115Laser Printer Operation
116Laser Printer Operation
117Other Computer Peripherals
- Scanners
- Flatbed, sheet-fed, hand-held
- Light is reflected off the sheet of paper
- User Input Devices
- Keyboard, mouse, light pens, graphics tablets
- Communication Devices
- Telephone modems
- Network devices
118(No Transcript)
119???? ????? ???? ???????
- ??? ?? ???? ????? ?? 0 ?? 1 ?? ?? ??? ??? ??
????. - ???? ?? 8 ??? ???? ?? ?? ?? ??? ?? ?? ??? ??? ??
????. - ???? ???? ?? ??? ???????? ?? ?? ?? ??? ???? ????
?? ???? ?????. - ???? ???? ?? 1024 ????(KB)
- ??? ???? ?? 1024 ???? ???? (MB)
- ???? ???? ?? 1024 ??? ???? (GB)
- ??? ???? ?? 1024 ???? ???? (TB)
120System Software
Programs that maintain operation of computer
Two types are operating systems and utility
programs
p. 398
121Operating System
- A program that controls the execution of
application programs - An interface between applications and hardware
122Operating System
- Management
- Memory
- Process
- i/o
- file
- Virtual machine
123Layers of Computer System
124Services Provided by the Operating System
- Program development
- Editors and debuggers
- Program execution
- Access to I/O devices
- Protected access to files
125Services Provided by the Operating System
- Error detection and response
- internal and external hardware errors
- memory error
- device failure
- software errors
- arithmetic overflow
- access forbidden memory locations
- error recovery
126(No Transcript)
127Uniprogramming
- Processor must wait for I/O instruction to
complete before preceding
128Multiprogramming
- When one job needs to wait for I/O, the processor
can switch to the other job
129Multiprogramming
130Time Sharing
- Using multiprogramming to handle multiple
interactive jobs - Processors time is shared among multiple users
- Multiple users simultaneously access the system
through terminals
131Main OS Concepts
- Processes
- Memory Management
- Information protection and security
- Scheduling and resource management
- System structure
132Processes
- A program in execution
- An instance of a program running on a computer
- The entity that can be assigned to and executed
on a processor - A unit of activity characterized by a single
sequential thread of execution, a current state,
and an associated set of system resources
133Process
- Consists of three components
- An executable program
- Associated data needed by the program
- Execution context of the program
- All information the operating system needs to
manage the process
134Process
135Memory Management
- Process isolation
- Automatic allocation and management
- Support for modular programming
- Protection and access control
- Long-term storage
136Virtual Memory
- Allows programmers to address memory from a
logical point of view
137File System
- Implements long-term store
- Information stored in named objects called files
138Paging
- Allows process to be comprised of a number of
fixed-size blocks, called pages - Virtual address is a page number and an offset
within the page - Each page may be located any where in main memory
- Real address or physical address in main memory
139(No Transcript)
140Virtual Memory Addressing
141Types of Operating Systems
Stand-alone complete operating system working on
PC, laptop, mobile computing device. like DOS,
Windows, Mac OS X, Unix, Linux Network OS
designed specially to support a network, like
netware, windows server 2003,Unix, Linux and
Solaris Embedded OS on most PDA and small
devices Like, windows CE, windows mobile 2003,
Palm OS and Symbian OS
142Stand-Alone Operating Systems
- DOS (Disk Operating System)
- Developed in early 1980s for personal computers
- Hardly used today because it does not offer GUI
- Used command-line interface when first
developed, later included menus
143Stand-Alone Operating Systems
144Stand-Alone Operating Systems
- Available only for computers manufactured by
Apple - Macintosh operating system has been model for
most GUIs
145Stand-Alone Operating Systems
- IBMs GUI multitasking operating system
- Supports networking, Java, the Internet, and
speech recognition
146Stand-Alone Operating Systems
- Used by power users because of its flexibility
and power - Most versions offer GUI
- Both a stand-alone and a
- network operating system
147Stand-Alone Operating Systems
- Popular, free, multitasking UNIX-type operating
system - Open-source softwareecode is available to
public - Both a stand-alone and a network operating
system
Red Hat provides a version of Linux called Red
Hat Linux. The GNOME graphical user interface is
shown in this example.
148Network Operating Systems
- Allows users to share printer, Internet access,
- files, and programs on a network
- Administers security by establishing
- user name and password for each user
OS/2 Warp Server for e-business IBMs network
operating system for businesses
Windows Server 2003 Upgrade to Windows 2000
Server
149Embedded Operating Systems
- Found on most mobile computers, PDAs, and other
small devices - Windows CE is scaled-down version of Windows
150Embedded Operating Systems
- operating systems for PDAs
- Pocket PC 2002 for Pocket PC
- Newer versioins Windows Mobile 5 6
- Palm OS for Palm, Visor, and CLIE
- Embeded Linux
151Embedded Operating Systems
- Mobile Operating systems
- Windows Mobile Smartphone
- A scaled down version of PDAs
- Symbian
- Open-source, multitasking operating system
designed for smart phones - Make telephone calls, save appointments, browse
Web, send and receive e-mail and faxes, and more
152Utility Programs
- Detects and corrects problems on hard disk or
floppy disk - Searches for and removes unnecessary files
- Copies selected files or entire hard disk onto
another disk or tape - compress files during backup to require less
storage space
153Utility Programs
- Reorganizes files and unused space on hard disk
so programs run faster
154Utility Programs
- Causes monitors screen to display moving image
or blank screen if there is no activity for a
specified time
- To secure computer, user configures screen saver
to require password to deactivate
155Utility Programs
- Compiles technical information about hardware and
some software - Prepares report outlining problems
156Stand-Alone Utility Programs
- Potentially damaging computer program
- Affects computer without users knowledge
157Stand-Alone Utility Programs
- Identifies and removes viruses in memory, storage
media, and incoming files - Must be updated frequently
158Stand-Alone Utility Programs
- Shrinks size of files to free up room and improve
performance - Compressed files are sometimes called zipped
files, or rared files - Two popular utilities WinRAR and WinZip
159Stand-Alone Utility Programs
- Protects personal computer from unauthorized
intrusions - Monitors all transmissions to and from computer