Operating Systems Tim Ji Lecture 1 <ul><li>Outline </li></ul><ul><ul><li>Course Information </li></ul></ul><ul><ul><li>His...
1 Course Information <ul><li>Official Course Outline </li></ul><ul><ul><li>On course webpage, MS Word document </li></ul><...
 
Course Information (2) <ul><li>Instructor </li></ul><ul><ul><li>Name: Tim Ji </li></ul></ul><ul><ul><li>Email tji AT cones...
Course Information (3) <ul><li>Labs </li></ul><ul><ul><li>Lab tasks will be demonstrated in the following week lab, and la...
Introduction to Operating Systems <ul><li>Topics: </li></ul><ul><ul><li>Role and purpose of the operating system  </li></u...
Early Computers <ul><li>First Computer </li></ul><ul><ul><li>Charles Babbage (1791-1871) designed the first true digital c...
Early Computers <ul><li>Babbage also thought of the concept of  software </li></ul><ul><li>And hired the first programmer ...
Current Computer Systems <ul><li>A computer system consists of </li></ul><ul><ul><li>hardware </li></ul></ul><ul><ul><li>s...
What is an Operating System (1) <ul><li>Microsoft Glossary: </li></ul><ul><ul><li>The  software  that controls the allocat...
What is an Operating System (2) <ul><li>Provide a service for clients - a virtual machine (top-down view) </li></ul><ul><l...
What is an Operating System (3) <ul><li>Resource manager (bottom-up view) </li></ul><ul><li>An  operating system  is a  re...
What is an Operating System (4) <ul><li>The hardware resources are transformed into virtual resources so that an operating...
What is an Operating System (5) <ul><li>The general functions of an operating system </li></ul><ul><ul><li>Allocation - as...
History of Operating Systems (1) <ul><li>First generation 1945 - 1955 </li></ul><ul><ul><li>Technology:  vacuum tubes & pl...
A Famous Remark <ul><li>&quot;I think there is a world market for maybe five computers.&quot;   </li></ul><ul><ul><li>Thom...
History of Operating Systems (2) <ul><li>Second generation 1955 – 1965 </li></ul><ul><ul><li>Technology:  Transistors </li...
<ul><ul><li>bring cards to IBM 1401 machine (good at card reading) </li></ul></ul><ul><ul><li>read cards to tape </li></ul...
Famous Remarks <ul><li>&quot;I have traveled the length and breadth of this country and talked with the best people, and I...
History of Operating Systems (3) <ul><li>Third generation 1965 – 1980 </li></ul><ul><ul><li>Technology:  ICs </li></ul></u...
Famous Remark <ul><li>“ There is no reason anyone would want a computer in their home.“ </li></ul><ul><ul><li>Ken Olson, p...
History of Operating Systems (4) <ul><li>Fourth generation 1980-Present </li></ul><ul><ul><li>Technology:  VLSI </li></ul>...
Famous Remark <ul><li>“ We don't see Windows as a long-term graphical interface for the masses.“ </li></ul><ul><ul><li>A L...
The Operating System Zoo (1) <ul><li>Mainframe operating systems </li></ul><ul><ul><li>Room-size computers </li></ul></ul>...
Famous Forcast <ul><li>&quot;Computers in the future may weigh no more than 1.5 tons.&quot;  </li></ul><ul><ul><li>Popular...
The Operating System Zoo (2) <ul><li>Server operating systems </li></ul><ul><ul><li>Offer services like print, file, or we...
The Operating System Zoo (3) <ul><li>Real-time operating systems </li></ul><ul><ul><li>E.g. industrial process control sys...
Computer Hardware <ul><li>Components of a simple personal computer </li></ul>Monitor Bus
CPU <ul><li>Brain of the computer </li></ul><ul><ul><li>ALU (Arithmetical- Logical Unit) </li></ul></ul><ul><ul><li>CU (Co...
CPU Modes <ul><li>A bit in PSW controls the mode </li></ul><ul><li>Kernel Mode  : </li></ul><ul><ul><li>CPU can execute ev...
Pipelining <ul><li>Parallelize the fetch, decode, execute sequence </li></ul><ul><li>Three stage pipeline : While executin...
CPU Pipeline <ul><li>(a) A three-stage pipeline (three instructions processed in 1 cycle) </li></ul><ul><li>(b) A supersca...
Pipelining Instruction N+2 Instruction N+3 Instruction N + 4 One CPU Cycle Instruction N + 1 Instruction N Fetch N Decode ...
Memory Hierarchy (1) <ul><li>Typical memory hierarchy </li></ul><ul><ul><li>numbers shown are rough approximations </li></...
Memory Hierarchy <ul><li>Magnetic Tape :  </li></ul><ul><ul><li>Backup purposes  and for storing very large data sets. </l...
Memory Hierarchy <ul><li>Magnetic disks: </li></ul><ul><ul><li>Are faster than tapes and CDs </li></ul></ul><ul><ul><li>Th...
Memory Hierarchy <ul><li>Disks and tapes are mechanical devices, therefore they are slow compared to (RAM and Cache) </li>...
Memory Hierarchy <ul><li>Registers </li></ul><ul><ul><li>They are the fastest accessible memory locations </li></ul></ul><...
Memory Hierarchy <ul><li>Read Only Memory (ROM) </li></ul><ul><ul><li>Write once, read many times </li></ul></ul><ul><ul><...
Memory Hierarchy <ul><li>CMOS (Complementary Metal Oxide Semiconductor) </li></ul><ul><ul><li>Volatile but can be sustaine...
Yet another famous quote! <ul><li>&quot;640K ought to be enough for anybody.&quot;  </li></ul><ul><ul><li>Bill Gates, 1981...
I/O Devices <ul><li>An  input device  transfers data from a mechanism  like keyboard, mouse, touch screen, or microphone i...
CPU DISK CONTROLLER DISK PRINTER PRINTER CONTROLLER MEMORY MEMORY CONTROLLER <ul><li>Device controllers have microprocesso...
How I/O Can Be Done <ul><li>Three methods: </li></ul><ul><ul><li>Busy waiting through system call </li></ul></ul><ul><ul><...
Lab 1: Get Familiar with Linux <ul><li>Introduction to Linux </li></ul><ul><li>Lab material is available on the course web...
Readings <ul><li>Tanenbaum, Chapter 1 </li></ul>
Upcoming SlideShare
Loading in...5
×

ppt slides

1,001

Published on

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
1,001
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
15
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide
  • No OS
  • Programming language Ada was named after her She was the daughter of the famed British Poet Lord Byron
  • Everything running in kernel mode is part of OS. Some programs running outside of it are also part of it. Applications running in user mode.
  • - OS provides a variety of services to programmers through SYSCALLs Resource management: Time sharing: CPU, printing Space sharing: memory, disk
  • - OS provides a variety of services to programmers through SYSCALLs Resource management: Time sharing: CPU, printing Space sharing: memory, disk
  • Not until World War II Programs to grind out tables of sines, cosines, and logarithms.
  • No evidence whatsoever to prove that he really said that. First citation was on Usenet 1986. Take it easy on all those misquotes
  • Transistors changed the picture Those computers called Mainframes, with pro operators to run them.
  • ppt slides

    1. 1. Operating Systems Tim Ji Lecture 1 <ul><li>Outline </li></ul><ul><ul><li>Course Information </li></ul></ul><ul><ul><li>History of Operating Systems </li></ul></ul><ul><ul><li>Basic Components of OS </li></ul></ul><ul><li>Lab 1 </li></ul><ul><li>Become familiar with Linux </li></ul><ul><li>Readings </li></ul><ul><li>Chapter 1 </li></ul>
    2. 2. 1 Course Information <ul><li>Official Course Outline </li></ul><ul><ul><li>On course webpage, MS Word document </li></ul></ul><ul><li>Course Objectives/Learning Outcomes </li></ul><ul><ul><li>Understand OS algorithms </li></ul></ul><ul><ul><li>Be able to write multitasking programs with a variety of inter-process communication methods </li></ul></ul><ul><ul><li>Be able to write scheduling, paging algorithms </li></ul></ul><ul><li>Textbook: Tanenbaum, “Modern Operating Systems” 2 nd Edition, Prentice Hall </li></ul>
    3. 4. Course Information (2) <ul><li>Instructor </li></ul><ul><ul><li>Name: Tim Ji </li></ul></ul><ul><ul><li>Email tji AT conestogac.on.ca </li></ul></ul><ul><ul><li>Office: 2A503, x2230 </li></ul></ul><ul><ul><li>Office hour: Drop by my office or by appointment </li></ul></ul><ul><li>Grading </li></ul><ul><ul><li>3 tests, 20% each: 60% </li></ul></ul><ul><ul><li>Assignments + Labs: 40% </li></ul></ul><ul><li>Assignments </li></ul><ul><ul><li>Due in class at the end of lecture, 20% reduction in the assignment mark for each school day it is late. </li></ul></ul><ul><ul><li>The assignments must be your own work. Cheating/copying other people’s files will result in both papers receiving zero. </li></ul></ul>
    4. 5. Course Information (3) <ul><li>Labs </li></ul><ul><ul><li>Lab tasks will be demonstrated in the following week lab, and lab reports must be submitted by the end of the lab. You have 1 week to finish the lab task. </li></ul></ul><ul><li>Course website </li></ul><ul><ul><li>http://www.conestogac.on.ca/~tji/os </li></ul></ul><ul><ul><li>Announcements, assignments, lecture handouts, etc. </li></ul></ul><ul><ul><li>Check it out at least once per day. </li></ul></ul><ul><li>Study to pass </li></ul><ul><ul><li>You have to pass both the tests portion and the assignments portion </li></ul></ul><ul><li>Assignments/Labs marking </li></ul><ul><ul><li>Demonstrate your task in lab </li></ul></ul><ul><ul><li>Answer questions regarding to your own task </li></ul></ul><ul><ul><li>Programming style of printouts of your source code, for programming assignments/labs </li></ul></ul>
    5. 6. Introduction to Operating Systems <ul><li>Topics: </li></ul><ul><ul><li>Role and purpose of the operating system </li></ul></ul><ul><ul><li>History of operating system development </li></ul></ul><ul><ul><li>Functionality of a typical operating system </li></ul></ul><ul><li>Learning Objectives: </li></ul><ul><ul><li>Explain the objectives and functions of modern operating systems. </li></ul></ul><ul><ul><li>Describe how operating systems have evolved over time from primitive batch systems to sophisticated multiuser systems. </li></ul></ul><ul><ul><li>Describe the functions of a contemporary operating system with respect to convenience, efficiency, and the ability to evolve. </li></ul></ul>
    6. 7. Early Computers <ul><li>First Computer </li></ul><ul><ul><li>Charles Babbage (1791-1871) designed the first true digital computer called the analytical engine . </li></ul></ul><ul><ul><li>That was purely mechanical and intended to do math operations </li></ul></ul><ul><ul><li>The engine was supposed to be made of brass, and steam powered </li></ul></ul><ul><ul><li>He did not actually built the machine but inspired others in the field. </li></ul></ul>
    7. 8. Early Computers <ul><li>Babbage also thought of the concept of software </li></ul><ul><li>And hired the first programmer (Lady Ada , Countess of Lovelace) for his analytical engine </li></ul>
    8. 9. Current Computer Systems <ul><li>A computer system consists of </li></ul><ul><ul><li>hardware </li></ul></ul><ul><ul><li>system programs </li></ul></ul><ul><ul><li>application programs </li></ul></ul>
    9. 10. What is an Operating System (1) <ul><li>Microsoft Glossary: </li></ul><ul><ul><li>The software that controls the allocation and usage of hardware resources such as memory, central processing unit (CPU) time, hard disk space, and peripheral devices (like speakers or a mouse). </li></ul></ul><ul><ul><li>The operating system is the foundation software on which programs, such as Word or Excel, depend. </li></ul></ul><ul><ul><li>An example of an operating system is Microsoft Windows® XP. </li></ul></ul>
    10. 11. What is an Operating System (2) <ul><li>Provide a service for clients - a virtual machine (top-down view) </li></ul><ul><li>An operating system is a layer of the computer system (a virtual machine) between the hardware and user programs. </li></ul><ul><ul><li>Multiple processes </li></ul></ul><ul><ul><li>Multiple address spaces </li></ul></ul><ul><ul><li>File system </li></ul></ul>
    11. 12. What is an Operating System (3) <ul><li>Resource manager (bottom-up view) </li></ul><ul><li>An operating system is a resource manager .  Resource management includes </li></ul><ul><ul><li>Transforming resources - to provide an easier to use version of a resource </li></ul></ul><ul><ul><li>Multiplexing resources - create the illusion of multiple resources </li></ul></ul><ul><ul><li>Scheduling resources - when and who gets a resource </li></ul></ul><ul><li>The hardware resources it manages include </li></ul><ul><ul><li>Processors - process management system </li></ul></ul><ul><ul><li>Memory - memory management system </li></ul></ul><ul><ul><li>I/O devices - I/O system </li></ul></ul><ul><ul><li>Disk space - file system </li></ul></ul>
    12. 13. What is an Operating System (4) <ul><li>The hardware resources are transformed into virtual resources so that an operating system may be viewed as providing a virtual computers , one to each user. A virtual machine (top down view) consists of </li></ul><ul><ul><li>Processes - virtualization of the computer including a virtual processor that abstracts the cpu - user mode instruction set + system calls </li></ul></ul><ul><ul><li>Virtual memory - virtualization of physical memory </li></ul></ul><ul><ul><li>Logical devices - virtualization of physical devices </li></ul></ul><ul><ul><li>Files - virtualization of disk space </li></ul></ul>
    13. 14. What is an Operating System (5) <ul><li>The general functions of an operating system </li></ul><ul><ul><li>Allocation - assigns resources to processes needing the resource </li></ul></ul><ul><ul><li>Accounting - keeps track of resources - knows which are free and which process the others are allocated to. </li></ul></ul><ul><ul><li>Scheduling - decides which process should get the resource next. </li></ul></ul><ul><ul><li>Protection - makes sure that a process can only access a resource when it is allowed </li></ul></ul><ul><li>Basic Functions </li></ul><ul><ul><li>Process management </li></ul></ul><ul><ul><li>Resource management </li></ul></ul><ul><ul><ul><li>Device managment </li></ul></ul></ul><ul><ul><ul><li>Memory management </li></ul></ul></ul><ul><ul><ul><li>File management </li></ul></ul></ul>
    14. 15. History of Operating Systems (1) <ul><li>First generation 1945 - 1955 </li></ul><ul><ul><li>Technology: vacuum tubes & plugboards </li></ul></ul><ul><ul><li>Programming: setting some switches </li></ul></ul><ul><ul><li>Programming language: machine language </li></ul></ul><ul><ul><li>Tasks: tables of sine, cosine, logarithms </li></ul></ul><ul><ul><li>OS: none </li></ul></ul>
    15. 16. A Famous Remark <ul><li>&quot;I think there is a world market for maybe five computers.&quot; </li></ul><ul><ul><li>Thomas Watson, chairman of IBM - 1943 </li></ul></ul>
    16. 17. History of Operating Systems (2) <ul><li>Second generation 1955 – 1965 </li></ul><ul><ul><li>Technology: Transistors </li></ul></ul><ul><ul><li>Programming: Punched cards </li></ul></ul><ul><ul><li>Programming languages: FORTRAN & Assembly </li></ul></ul><ul><ul><li>Tasks: Scientific </li></ul></ul><ul><ul><li>Computer: Mainframes </li></ul></ul><ul><ul><li>OS: Batch system </li></ul></ul><ul><li>Universities started to buy computers (millions $) </li></ul>
    17. 18. <ul><ul><li>bring cards to IBM 1401 machine (good at card reading) </li></ul></ul><ul><ul><li>read cards to tape </li></ul></ul><ul><ul><li>put tape on IBM 7094 which does computing </li></ul></ul><ul><ul><li>put tape on IBM 1401 which prints output offline </li></ul></ul>Early Batch System
    18. 19. Famous Remarks <ul><li>&quot;I have traveled the length and breadth of this country and talked with the best people, and I can assure you that data processing is a fad that won't last out the year.“ </li></ul><ul><ul><li>The editor in charge of business books for Prentice Hall - 1957 </li></ul></ul>
    19. 20. History of Operating Systems (3) <ul><li>Third generation 1965 – 1980 </li></ul><ul><ul><li>Technology: ICs </li></ul></ul><ul><ul><li>Programming: Punched cards </li></ul></ul><ul><ul><li>Programming languages: FORTRAN & Assembly </li></ul></ul><ul><ul><li>Tasks: Scientific & commercial </li></ul></ul><ul><ul><li>Computers: IBM 360, DEC PDPs </li></ul></ul><ul><ul><li>OS: Multiprogramming/timesharing, spooling </li></ul></ul><ul><li>OSes Developed: </li></ul><ul><ul><li>MULTICS (father of all modern OSes) </li></ul></ul><ul><ul><li>UNIX (System V, BSD) </li></ul></ul><ul><ul><li>POSIX (by IEEE) </li></ul></ul><ul><ul><li>MINIX (by Tanenbaum) </li></ul></ul><ul><ul><li>Linux (derived from MINIX) </li></ul></ul>
    20. 21. Famous Remark <ul><li>“ There is no reason anyone would want a computer in their home.“ </li></ul><ul><ul><li>Ken Olson, president, chairman and founder of Digital Equipment Corp. - 1977 </li></ul></ul>
    21. 22. History of Operating Systems (4) <ul><li>Fourth generation 1980-Present </li></ul><ul><ul><li>Technology: VLSI </li></ul></ul><ul><ul><li>Programming: High level </li></ul></ul><ul><ul><li>Programming languages: C/C++, Java, …… </li></ul></ul><ul><ul><li>Computer: PC </li></ul></ul><ul><ul><li>OS: Windows, MacOS, Linux …… </li></ul></ul><ul><li>Cheap PCs </li></ul>
    22. 23. Famous Remark <ul><li>“ We don't see Windows as a long-term graphical interface for the masses.“ </li></ul><ul><ul><li>A Lotus Software Development official, while demonstrating a new DOS version - 1989 </li></ul></ul>
    23. 24. The Operating System Zoo (1) <ul><li>Mainframe operating systems </li></ul><ul><ul><li>Room-size computers </li></ul></ul><ul><ul><li>High I/O capacity </li></ul></ul><ul><ul><li>Offers: </li></ul></ul><ul><ul><ul><li>Batch processing (no interaction, such as large reports) </li></ul></ul></ul><ul><ul><ul><li>Transaction processing (large number of small requests) </li></ul></ul></ul><ul><ul><ul><li>Timesharing (multiple users sitting in front of clients) </li></ul></ul></ul>
    24. 25. Famous Forcast <ul><li>&quot;Computers in the future may weigh no more than 1.5 tons.&quot; </li></ul><ul><ul><li>Popular Mechanics, forecasting the relentless march of science, 1949 </li></ul></ul>
    25. 26. The Operating System Zoo (2) <ul><li>Server operating systems </li></ul><ul><ul><li>Offer services like print, file, or web </li></ul></ul><ul><ul><li>UNIX, Windows 2000, Linux </li></ul></ul><ul><li>Multiprocessor operating systems </li></ul><ul><ul><li>Parallel computing </li></ul></ul><ul><li>Personal computer operating systems </li></ul><ul><ul><li>Single user with a good GUI, such as Windows 98, Windows 2000, Macintosh OS, Linux </li></ul></ul>
    26. 27. The Operating System Zoo (3) <ul><li>Real-time operating systems </li></ul><ul><ul><li>E.g. industrial process control systems where each job must be completed in the specified time. </li></ul></ul><ul><ul><li>Hard real-time (nuclear reactor control systems) or soft-real time systems (e.g multimedia systems) depending on the acceptance of missing deadlines </li></ul></ul><ul><li>Embedded operating systems: </li></ul><ul><ul><li>Real-time systems with some resource constraints like memory, CPU, power. </li></ul></ul><ul><li>Smart card operating systems </li></ul><ul><ul><li>Extremely primitive OS running on credit card sized devices with a CPU. </li></ul></ul>
    27. 28. Computer Hardware <ul><li>Components of a simple personal computer </li></ul>Monitor Bus
    28. 29. CPU <ul><li>Brain of the computer </li></ul><ul><ul><li>ALU (Arithmetical- Logical Unit) </li></ul></ul><ul><ul><li>CU (Control Unit, fetch-execute-decode instructions) </li></ul></ul><ul><li>Has a certain set of instructions it can recognize and execute </li></ul><ul><li>Basic CPU cycle </li></ul><ul><ul><li>Fetch the next instruction </li></ul></ul><ul><ul><li>Decode it to determine its type and operands </li></ul></ul><ul><ul><li>Execute it </li></ul></ul><ul><ul><li>… .. </li></ul></ul><ul><li>Programs are list of instructions executed by the CPU </li></ul><ul><li>When the computer powers up, CU of CPU starts the fetch-decode-execute cycle </li></ul><ul><li>Instructions may be OS instructions or other programs </li></ul>
    29. 30. CPU Modes <ul><li>A bit in PSW controls the mode </li></ul><ul><li>Kernel Mode : </li></ul><ul><ul><li>CPU can execute every instruction in its instruction set </li></ul></ul><ul><ul><li>CPU can use every feature of the hardware </li></ul></ul><ul><ul><li>OS runs in kernel mode </li></ul></ul><ul><li>User Mode : </li></ul><ul><ul><li>Only a subset of instructions can be run </li></ul></ul><ul><ul><li>And a subset of hardware features are accessed </li></ul></ul><ul><ul><li>Generally all instructions involving I/O and Memory protection are disallowed in that mode </li></ul></ul><ul><li>To obtain OS services, a user program must make a system call that traps into kernel mode and invokes the OS </li></ul><ul><li>Trap instruction switches from user mode to kernel mode and starts the operating system (system calls and errors such as division by zero causes trap instructions) </li></ul>
    30. 31. Pipelining <ul><li>Parallelize the fetch, decode, execute sequence </li></ul><ul><li>Three stage pipeline : While executing instruction N, decode instruction N+1, and fetch instruction N+2 </li></ul><ul><li>What happens when a conditional branch occurs in an instruction? </li></ul>
    31. 32. CPU Pipeline <ul><li>(a) A three-stage pipeline (three instructions processed in 1 cycle) </li></ul><ul><li>(b) A superscalar CPU (with multiple execution units) </li></ul>
    32. 33. Pipelining Instruction N+2 Instruction N+3 Instruction N + 4 One CPU Cycle Instruction N + 1 Instruction N Fetch N Decode N Fetch N+1 Execute N Decode N+1 Fetch N+2 Execute N+1 Decode N+2 Fetch N+3 Execute N+2 Decode N+3 Fetch N+4
    33. 34. Memory Hierarchy (1) <ul><li>Typical memory hierarchy </li></ul><ul><ul><li>numbers shown are rough approximations </li></ul></ul>
    34. 35. Memory Hierarchy <ul><li>Magnetic Tape : </li></ul><ul><ul><li>Backup purposes and for storing very large data sets. </li></ul></ul><ul><ul><li>One dimensional, only sequential access is possible </li></ul></ul><ul><ul><li>Reliable (no tape crashes, or time based data corruption) </li></ul></ul><ul><ul><li>Was the main data storage medium of the past </li></ul></ul><ul><li>Optic CDs: </li></ul><ul><ul><li>Faster than tape </li></ul></ul><ul><ul><li>Used for permanent storage (now rewritable) </li></ul></ul>
    35. 36. Memory Hierarchy <ul><li>Magnetic disks: </li></ul><ul><ul><li>Are faster than tapes and CDs </li></ul></ul><ul><ul><li>They are the main storage medium these days </li></ul></ul><ul><ul><li>Data stored in concentric cylinders </li></ul></ul><ul><ul><li>Disk head moves in discrete steps </li></ul></ul><ul><ul><li>Each position of the disk head identifies a track (divided into multiple sectors, typically 512 bytes) </li></ul></ul><ul><ul><li>Rotates continuously with a certain speed (e.g. 7200 rpm) </li></ul></ul>
    36. 37. Memory Hierarchy <ul><li>Disks and tapes are mechanical devices, therefore they are slow compared to (RAM and Cache) </li></ul><ul><li>Main Memory (Random Access Memory) : </li></ul><ul><ul><li>Volatile </li></ul></ul><ul><ul><li>Much Much faster than magnetic disks but more expensive too </li></ul></ul><ul><li>Cache: </li></ul><ul><ul><li>Faster than RAM and more expensive </li></ul></ul><ul><ul><li>CPU requests first go to cache, and if they are there (cache hit) then fine, if not there (cache miss) then RAM is accessed </li></ul></ul><ul><ul><li>There can be multiple cache levels </li></ul></ul><ul><ul><li>Cache is divided into cache lines (usually 64 bytes at each line) </li></ul></ul>
    37. 38. Memory Hierarchy <ul><li>Registers </li></ul><ul><ul><li>They are the fastest accessible memory locations </li></ul></ul><ul><ul><li>Placed at the CPU. </li></ul></ul><ul><ul><li>They are usually of size 32 bits, or 64 bits depending on the CPU type </li></ul></ul>
    38. 39. Memory Hierarchy <ul><li>Read Only Memory (ROM) </li></ul><ul><ul><li>Write once, read many times </li></ul></ul><ul><ul><li>Low level I/O cards </li></ul></ul><ul><ul><li>Code for starting the computer </li></ul></ul><ul><li>Electrically Erasable Rom (EEPROM) </li></ul><ul><ul><li>Non volatile </li></ul></ul><ul><li>Flash RAM </li></ul><ul><ul><li>Non volatile </li></ul></ul>
    39. 40. Memory Hierarchy <ul><li>CMOS (Complementary Metal Oxide Semiconductor) </li></ul><ul><ul><li>Volatile but can be sustained with mother board battery for years. </li></ul></ul><ul><ul><li>May give checksum errors when being corrupted </li></ul></ul><ul><ul><li>Very small, 64 bytes. </li></ul></ul><ul><ul><li>Holds the current time and date, configuration parameters (like which disk to boot from etc.) </li></ul></ul>
    40. 41. Yet another famous quote! <ul><li>&quot;640K ought to be enough for anybody.&quot; </li></ul><ul><ul><li>Bill Gates, 1981 </li></ul></ul>
    41. 42. I/O Devices <ul><li>An input device transfers data from a mechanism like keyboard, mouse, touch screen, or microphone into a CPU register. CPU will then store the data into Main Memory </li></ul><ul><li>For output devices , CPU fetches the information from main memory to its registers and transfers this information via the bus to an output device like screen, speaker, or printer. </li></ul><ul><li>Communication devices : serial and parallel ports, infrared transmitter/receivers, wireless network cards, network interface cards </li></ul>
    42. 43. CPU DISK CONTROLLER DISK PRINTER PRINTER CONTROLLER MEMORY MEMORY CONTROLLER <ul><li>Device controllers have microprocessors. </li></ul><ul><li>They can work in parallel. </li></ul><ul><li>They can tell CPU when they are done. </li></ul>
    43. 44. How I/O Can Be Done <ul><li>Three methods: </li></ul><ul><ul><li>Busy waiting through system call </li></ul></ul><ul><ul><li>Interrupt </li></ul></ul><ul><ul><li>DMA (Direct Memory Access) </li></ul></ul>
    44. 45. Lab 1: Get Familiar with Linux <ul><li>Introduction to Linux </li></ul><ul><li>Lab material is available on the course webpage </li></ul><ul><li>Follow the lab task specifications -- your marks depend on it. </li></ul>
    45. 46. Readings <ul><li>Tanenbaum, Chapter 1 </li></ul>
    1. A particular slide catching your eye?

      Clipping is a handy way to collect important slides you want to go back to later.

    ×