last week
play

Last Week Logic gates are built out of transistors There are many - PDF document

10/26/2009 Last Week Logic gates are built out of transistors There are many different logic gates NAND is functionally complete Digital circuits process data using gates Half and full adder 1 10/26/2009 This week


  1. 10/26/2009 Last Week  Logic gates are built out of transistors  There are many different logic gates  NAND is functionally complete  Digital circuits process data using gates  Half and full adder 1

  2. 10/26/2009 This week  Software  Operating systems  Kernels  Shells 2

  3. 10/26/2009 Programs  Programs tell the computer what to do  Very earliest computers had fixed programs  Program was part of computer  like e.g. a digital calculator  Programming involved physical redesign Stored programs  Since Manchester ―Baby‖ (1948)  Program is data  Program can now be processed by computer  Programmer can easily change it  Computer can change its own programs 3

  4. 10/26/2009 Hardware & Software  Hardware: physical parts of the computer  e.g. processor, RAM, mass storage  to improve you replace  Software: programs stored on computer  e.g. operating system, browser,  to improve you can update Firmware  Computer program run on non-CPU hardware  Can be updated by software  Examples  BIOS (Basic Input/Output System) controls bootup of PC  Optical drive (e.g. DVD) controller, can be updated as technology evolves  Halfway between software and hardware 4

  5. 10/26/2009 Software  System software  Basic operations of computer  Operating system: manages all activity  Utility software: supports routine tasks ○ e.g. defrag, virus scan, compression, ...  Application software: supports users’ needs  e.g. web browser, word processor 5

  6. 10/26/2009 Operating Systems  Software that manages activities and resources of computer  Windows, Linux, OS X, ...  Allows user to start programs  Environment for programs to run  Kernel surrounded by shell Operating systems  What is an operating system?  It is a program that manages all other programs. These other programs or applications make requests from the operating system (ex. Open program).  PC Operating systems ○ DOS ○ Windows 3.1, 95, 98, NT, 2000,ME, XP, Vista ○ Linux  Mac Operating systems ○ OS 8.6, 9.0, 9.1, X.2 , X.4… 6

  7. 10/26/2009 Why Study Operating Systems?  Most likely you won't write an OS, so why study them?  Primary intersection point: ○ It draws on many CS areas - software engineering, computer architecture, data structures, networking, algorithms.  Learn programming techniques: ○ One can apply data structures, conflict resolution, concurrency issues, resource management, etc., used in OS to other areas.  "Grungy" things sometimes do require modifications to OS. ○ You can't do this if you don't understand them!  Curiosity – ―look under the hood.‖ What is an Operating System?  An Operating System (OS) is a program that controls the execution of computer programs and act as the interface between the user and the hardware.  An OS functions as:  A resource manager ○ It manages and allocates resources such that the computer hardware can be used in an efficient manner. ○ Examples of resources: processes, CPU(s), memory, file system, networking, etc.  A virtual machine: ○ OS hides the details of the underlying hardware ○ OS provides a common API to applications and services.  An OS makes the machine convenient and efficient to use. 7

  8. 10/26/2009 History of Operating Systems.  Once upon a time …  Human Computer History of Operating Systems (cont)  Single program execution  First generation  Why? 1945 - 1955  Hardwire “programming”  vacuum  Programming slow, not “offline”! tubes, plug Plug board and punch cards.  boards No programming language.   Programmer spent quite a lot  ENIAC time to find the real “Bug”. (mid- 1940’s)  Just part of it!! 8

  9. 10/26/2009 History of Operating Systems (cont)  Second generation 1955 - 1965  transistors, batch systems.  Early batch system (overlapped CPU & I/O operations)  Buffer slow I/O onto fast tape drives connected to CPU, replicate I/O devices.  Spool data to disk.  Programming languages: Fortran or assembler (on punch cards!).   Two main applications: Scientific.  Data processing.  History of Operating Systems (cont)  Multi-programming  Third generation systems: 1965 – 1980  Run several programs  IBM 360 series (mid- at the same time. 1960s)  Spooling as jobs finished.  New problems:  Response time.  Thrashing.  File-systems. 9

  10. 10/26/2009 History of Operating Systems (cont)  Interactive timesharing systems:  Lots of cheap terminals and one computer ○ All users interact with the system at once ○ Debugging is much easier  Disks are cheap so put programs and data online ○ 1 punch card = 100 bytes  New problems: ○ Need pre-emptive scheduling to maintain adequate response time ○ Need to avoid thrashing (swapping programs in and out of memory too often) ○ Need to provide adequate security measures  UNIX developed at Bell Labs (Thompson, Ritchie) History of Operating Systems (cont)  Fourth generation 1980 – present  Personal computing  CPUs are cheap enough for everyone, yet powerful enough to be useful. There can be only one…IBM PC The only real competitor left… vs. IBM 8086 SUPERBOWL 10

  11. 10/26/2009 OS’s: The Bad News...  Modern operating system are:  Enormous: ○ Linux v2.6 – approx. 5.9 million lines of code (128MB RAM) ○ Win2000 - approx. 35 million lines of code (64MB RAM) ○ WinXP – approx. 40 million lines of code (128MB RAM) ○ Win2003 – approx 50 million lines of code (256MB RAM)  Complex: ○ Poorly understood – too large for one person to comprehend.  (Always) full of bugs and (often) unreliable.  Dependent on hardware in strange ways (makes porting difficult). Commercial-Released O/S A commercial-release operating systems is any operating system which has all of the following attributes:  It costs money, typically more than $50  Source code for the system is not available  There are strict limits as to how the system may be copied.  Consequently, Windows, MacOS, DEC Ultrix, Solaris, OS/2, and other similar platforms are commercial operating systems. 11

  12. 10/26/2009 The problems  The needs of the computer user have to be balanced with the companies need for profit.  Here is some of the issues:  Slow release pattern  High cost  Tech Support?  Lack of source code availability  Planned obsolescence of hardware  Crash-prone 12

  13. 10/26/2009 Windows  Hybrid kernel (NT)  System libraries: C:\windows\system32\  Shells: cmd.exe (CL) and explorer.exe (GUI)  System tools: cmd.exe 13

  14. 10/26/2009 The Unix Operating System  The UNIX operating system was designed to let a number of programmers access the computer at the same time and share its resources.  Bell Laboratories created the UNIX OS in 1969.  There goals were to design an operating system to satisfy the following objectives:  Simple and elegant  Written in a high level language rather than assembly language (It is written in C)  Allow re-use of code The Unix Structure  Structure: Kernel and shell  kernel (in assembly language, small)  shell (in C).  The benefit of this structure is that UNIX is highly customizable and new features are relatively simple to add . 14

  15. 10/26/2009 What is UNIX? 29 The Unix Kernel  This is the heart of the UNIX Operating System.  The kernel is at the core of each UNIX system and is loaded in whenever the system is started up  The kernel creates the same virtual machine 30 15

  16. 10/26/2009 The Unix Kernel  It performs the tasks that create and maintain the UNIX environment managing the entire resources of the system. It: ◦ Manages the machine's memory ◦ Schedules the work done by the CPU ◦ Organizes the transfer of data from one part of the machine to another ◦ Accepts instructions from the shell and carries them out ◦ Enforces access permissions ◦ Keeps track of the disks, tapes, printers, terminals, communication lines etc attached to the computer.  You do not need to know anything about the kernel in order to use a UNIX system 31 The Kernel  Core of the operating system  Coordinates activity of CPU, memory & I/O  Provides basic services to other software  Open a file  Create a directory  Connect to network host  ... 16

  17. 10/26/2009 Parts of the Kernel  File manager  Where files are stored, and free space  Which users allowed access  Device drivers  Communicate with attached I/O devices  Memory manager  Assign RAM space to individual tasks  Paging: when RAM is full it can overflow onto hard disk Kernels In Action  Optimised for different applications  Space: embedded devices (PalmOS)  Reliability: no-access environments (VxWorks)  Real-time response: guidance systems (QNX)  Scalability: mainframes (z/OS) 17

  18. 10/26/2009 Kernel Design  Monolithic: a single kernel does all the work  Microkernel: a simple kernel delegates services to many servers  Hybrid: core services in kernel + some servers The Shell  Interface between user and kernel  Command-line shell  GUI (Graphical User Interface) shell 18

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend