1 / 49

Overview and Introduction to Computing Systems

Overview and Introduction to Computing Systems. Fred Kuhns Bryan504 fredk@cs.wustl.edu. Introduction. A computer system consists of hardware system programs application programs. What is an Operating System. It is an extended machine ( Presents a Convenient Interface to users )

sun
Download Presentation

Overview and Introduction to Computing Systems

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Overview and Introduction to Computing Systems Fred Kuhns Bryan504 fredk@cs.wustl.edu

  2. Introduction • A computer system consists of • hardware • system programs • application programs CS422S: Operating Systems Organization

  3. What is an Operating System • It is an extended machine (Presents a Convenient Interface to users) • Hides the messy details which must be performed • Presents user with a virtual machine, easier to use • It is a resource manager • Each program gets time with the resource • Each program gets space on the resource CS422S: Operating Systems Organization

  4. History of Operating Systems Early batch system • bring cards to 1401 • read cards to tape • put tape on 7094 which does computing • put tape on 1401 which prints output CS422S: Operating Systems Organization

  5. History of Operating Systems • First generation 1945 - 1955 • vacuum tubes, plug boards • Second generation 1955 - 1965 • transistors, batch systems • Third generation 1965 – 1980 • ICs and multiprogramming • Fourth generation 1980 – present • personal computers CS422S: Operating Systems Organization

  6. History of Operating Systems • Structure of a typical FMS job – 2nd generation CS422S: Operating Systems Organization

  7. History of Operating Systems • Multiprogramming system • three jobs in memory – 3rd generation CS422S: Operating Systems Organization

  8. Current “Specialized” OSes • Mainframe operating systems • Server operating systems • Multiprocessor operating systems • Personal computer operating systems • Real-time operating systems • Embedded operating systems • Smart card operating systems CS422S: Operating Systems Organization

  9. Basic Hardware Elements • Processor - traditionally controls the operation of the computer and performs the data processing function • Memory- Stores data and programs, typically volatile (aka real or primary memory) • I/O modules - move data between computer and external environment (i.e. disks, network) • System Bus - communication among processors, memory, and I/O modules CS422S: Operating Systems Organization

  10. Computer Hardware Review • Components of a simple personal computer Monitor Bus CS422S: Operating Systems Organization

  11. . . . . . . . . . Computer Components: Another view CPU Memory 0 1 PC MAR Instruction MBR IR Instruction I/O AR Instruction execution unit I/O BR Data I/O Module Data Data Data . . Buffers N PC - Program Counter IR - Instruction Register MAR - Memory Address Register MBR - Memory Buffer Register I/O AR - Input/Output Address Register I/O BE - Input/Output Buffer Register CS422S: Operating Systems Organization

  12. Control and Status Registers • Program Counter (PC) • Contains the address of an instruction to be fetched • Instruction Register (IR) • Contains the instruction most recently fetched • Program Status Word (PSW) • condition codes • Interrupt enable/disable • Supervisor/user mode CS422S: Operating Systems Organization

  13. Fetch Cycle Execute Cycle Fetch Next Instruction Execute Instruction HALT START Instruction Cycle • Processor fetches instruction from memory • PC contains address of next instruction to be fetched • PC incremented after each fetch CS422S: Operating Systems Organization

  14. Modern Instruction Cycle (a) A three-stage pipeline (b) A superscalar CPU CS422S: Operating Systems Organization

  15. Typical memory hierarchy • numbers shown are rough approximations CS422S: Operating Systems Organization

  16. Going Down the Hierarchy • Decreasing cost per bit • Increasing capacity • Increasing access time • Decreasing frequency of access of the memory by the processor • exploit locality of reference CS422S: Operating Systems Organization

  17. Cache/Main-Memory Structure Slot Number Memory Address Tag Block 0 0 1 1 2 Block (k words) 2 3 C - 1 Block Length (k words) (b) Cache Block 2n - 1 Word Length (a) Main Memory CS422S: Operating Systems Organization

  18. Cache Design • Write policy • keeping cache and main memory consistent • Mapping function • determines which cache location block occupies • Replacement algorithm • determines which block to replace (LRU) • Block size • data unit exchanged between cache and main memory CS422S: Operating Systems Organization

  19. Structure of a disk drive CS422S: Operating Systems Organization

  20. Multiprogramming and Addressing • program addresses are relative to Base Address • MMU maps virtual to physical address CS422S: Operating Systems Organization

  21. I/O Techniques • Programmed I/O • Processor does all the work. Poll for results. • Interrupt Driven I/O • Device notifies CPU when I/O operation complete • Direct memory access (DMA) • DMA controller performes “Programmed I/O”, not CPU. • CPU notified with DMA complete CS422S: Operating Systems Organization

  22. I/O Operations and Interrupts (a) Steps in starting an I/O and receiving interrupt (b) How the CPU is interrupted (a) (b) CS422S: Operating Systems Organization

  23. Instruction Cycle with Interrupts Interrupt Cycle Execute Cycle Fetch Cycle Interrupts Disabled Check for & Process Int Fetch Next Instruction Execute Instruction START Interrupts Enabled HALT CS422S: Operating Systems Organization

  24. Buses • Structure of a large Pentium system CS422S: Operating Systems Organization

  25. Basic Operating System Concepts • Processes • Deadlocks • Memory Management • Input/Output • Files • Security • The Shell • Policy versus Mechanism CS422S: Operating Systems Organization

  26. What is A Process? • A process is a program in execution. A process needs resources (CPU time, memory, files, I/O devices) to accomplish task. • Process management activities: • creation and deletion. • suspension and resumption. • Mechanisms for synchronization, communication and deadlock handling CS422S: Operating Systems Organization

  27. Processes - An Introduction • A process tree • A created two child processes, B and C • B created three child processes, D, E, and F CS422S: Operating Systems Organization

  28. Process Memory Space • Processes have three segments: text, data, stack CS422S: Operating Systems Organization

  29. Deadlock - An Introduction (a) A potential deadlock. (b) an actual deadlock. CS422S: Operating Systems Organization

  30. Example File System Structure File system for a university department CS422S: Operating Systems Organization

  31. File Systems • Before mounting, • files on floppy are inaccessible • After mounting floppy on b, • files on floppy are part of file hierarchy CS422S: Operating Systems Organization

  32. Inter-Process Communication Two processes connected by a pipe CS422S: Operating Systems Organization

  33. System Calls • Interface between running program and the operating system • Generally written in assembly-language • Wrapper libraries provide high-level interface • Three general methods are used to pass parameters: • Pass parameters in registers. • Store the parameters in a table in memory. • Push (store) the parameters onto the stack by the program. CS422S: Operating Systems Organization

  34. Steps in Making a System Call There are 11 steps in making the system call read (fd, buffer, nbytes) CS422S: Operating Systems Organization

  35. Some System Calls For Process Management CS422S: Operating Systems Organization

  36. Some System Calls For File Management CS422S: Operating Systems Organization

  37. Some System Calls For Directory Management CS422S: Operating Systems Organization

  38. Some System Calls For Miscellaneous Tasks CS422S: Operating Systems Organization

  39. System Calls - Process Management • A stripped down shell: while (TRUE) { /* repeat forever */ type_prompt( ); /* display prompt */ read_command (command, parameters) /* input from terminal */ if (fork() != 0) { /* fork child process */ /* Parent code */ waitpid( -1, &status, 0); /* wait for child to exit */ } else { /* Child code */ execve (command, parameters, 0); /* execute command */ }} CS422S: Operating Systems Organization

  40. System Calls (a) Two directories before linking/usr/jim/memo to ast's directory (b) The same directories after linking CS422S: Operating Systems Organization

  41. System Calls (a) File system before the mount (b) File system after the mount CS422S: Operating Systems Organization

  42. System Calls Some Win32 API calls CS422S: Operating Systems Organization

  43. Monolithic Design Simple structuring model for a monolithic system CS422S: Operating Systems Organization

  44. Layered Design Structure of the THE operating system CS422S: Operating Systems Organization

  45. Virtual Machines Structure of VM/370 with CMS CS422S: Operating Systems Organization

  46. Client-Server Model The client-server model CS422S: Operating Systems Organization

  47. Microkernel Design The client-server model in a distributed system CS422S: Operating Systems Organization

  48. Policy Versus Mechanism • Policy (What) - Specifies desired behavior or What should occur • Mechanisms (How) - how the policy is carried out - implementation of core processing. • The separation of policy from mechanism is a very important principle, it allows maximum flexibility if policy decisions are to be changed later. CS422S: Operating Systems Organization

  49. Metric Units The metric prefixes CS422S: Operating Systems Organization

More Related