1 / 63

MARWADI EDUCATION FOUNDATION GROUP OF INSTITUTIONS FACULTY OF ENGINEERING CE & IT DEPARTMENT

Chapter- 1 : Introduction to Operating System. MARWADI EDUCATION FOUNDATION GROUP OF INSTITUTIONS FACULTY OF ENGINEERING CE & IT DEPARTMENT. Prepared By: Prof. Vipul Vekariya M.E(Computer). What is an operating system History of operating systems The operating system zoo

shiela
Download Presentation

MARWADI EDUCATION FOUNDATION GROUP OF INSTITUTIONS FACULTY OF ENGINEERING CE & IT DEPARTMENT

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. Chapter- 1 : Introduction to Operating System MARWADI EDUCATION FOUNDATION GROUP OF INSTITUTIONSFACULTY OF ENGINEERINGCE & IT DEPARTMENT Prepared By: Prof. Vipul Vekariya M.E(Computer)

  2. What is an operating system • History of operating systems • The operating system zoo • Computer hardware review • Operating system concepts • System calls • Operating system structure Content of the chapter.

  3. Operating System • A modern computer system consist of one or more processor, main memory, disk, keyboard, network interface and other I/P and O/P Devices. • Writing programs that keep track of all these component and use them correctly and optimally. • For this reason computers are equipped with a layer of software called operating system. • Whose job is to manage all the devices and provide user programs with simpler interface to the hardware.

  4. Fig -1. A computer system consists of hardware, system programs ,application programs

  5. Introduction • The lowest level contains physical devices, consisting of integrated chips, wires, power supplies, cathode ray tube, and similar physical device. • Next comes micro architecture level, in which physical devices are group together to form functional units. • This level contains some register internal to the CPU and data path containing an ALU. • The operation of data path is controlled by software, called the micro program. • The purpose of this data path is to execute some set of instruction. • ISA ( Instruction set Architecture) ( Machine Language) • This instruction may use the register or other hardware facilities.

  6. The machine language has between 50 to 300 instruction. • Device register: • To control the I/p & O/P Devices. • Operating system: To hide all this complexity. • It consist of layer of software. • Example : Read the block from Hard disk. • On the top of the OS is the rest of the system software and application software. • This is not a part of the operating system. • The OS is that the portion of the software that run in KERNEL mode or supervisor mode. • It is protected by the user tampering by the hardware. • Compilers and editors are run in user mode. • It is very difficult to draw a boundary between kernel mode and user mode.( Example: Password protection, file system)

  7. What is an Operating System • It is an extended machine • Hides the messy details which must be performed • Presents user with a virtual machine, easier to use • The program that hides the truth about hardware from programmer and present a nice and simple view. • Most basic command is read and write. • Each of which require 13 parameter passed by OS to read and write 13. • For example address of disk block, the number of sector per track, the recording mode, the insersector gap spacing etc…. • In this view function of operating system is to present the user with the equivalent of an extended machine or virtual machine. • That is easier to program than underlying hardware.

  8. It is a resource manager • Each program gets time with the resource • Orderly and controlled allocation of the various job to processor, memories, i/p and o/p devices. • The task of operating system is to keep track of • who is using which resource • to grant resource request • to account for usage • mediate conflicting request • Resource management includes sharing resource in two ways: • Time sharing examples: Printer, CPU, • Space sharing Example: Memory, Hard disk.

  9. 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

  10. The Operating System Zoo • Mainframe operating systems • Server operating systems • Multiprocessor operating systems • Personal computer operating systems • Real-time operating systems • Embedded operating systems • Smart card operating systems

  11. Main frame operating system • This operating system used for main frame computers.. • Those room sized computers still found in major corporate data centers. • This OS for mainframe are heavily oriented towards processing many jobs at once. • This OS used where need of more I/o Operation. • They typically offer three kind of service. 1) Batch 2) Transaction processing 3) Time sharing • it is used for large scale electronic commerce site and server for B2B transactions.

  12. Server operating system • One level down are the server operating system • It run on server which are either very large personal computer. • They serve multiple users over a network at a once. • User share hardware and software resources. • Example: print service, file service, web service. • UNIX and windows 2000 are server OS.

  13. Multi processor OS • Multi processor in a single system. • That required Multi processor OS. • This system are called parallel computers. Personal Computer OS: • Its job is to provide a good interface to a single user. • They are widely used for word processing, spread sheets, and internet access. • Example: WIN 98, XP, VISTA, Macintosh

  14. Real time OS • It is a multitasking operating system that aims at executing real-time applications. • Time is key parameter. • The main object of real-time operating systems is their quick and predictable response to event • Industrial process control system EMBEDDED OS • The operating systems designed for being used in embedded computer systems are known as embedded operating systems.. • They are designed to operate on small machines like PDAs with less autonomy. • They are very compact and extremely efficient by design. • Windows CE, FreeBSD and Minix 3 are some examples of embedded operating systems.

  15. Smart card OS • The smallest OS run on smart card. • Which are credit card sized devices containing a CPU chip. • ROM is on the smart card chip and JVM ( java virtual machine) is installed.

  16. A Computer’s Basic Elements • Processor: control the operation of computer and perform its data processing function. • Main Memory: Stores data and program • I/O Modules: move data between the computer and its external environment. • System Bus: Provides for communication among processor, main memory and I/O modules.

  17. Processor • It is brain of the computer system. • It fetch the instruction from memory and execute it. • Each CPU contains the some register inside to hold a key variables and temporary results. • Two internal registers • Memory address resister (MAR): it contains the address of memory for data read or write. • Memory buffer register (MBR): it contains the data to be written or read from memory. • I/O address register • I/O buffer register

  18. Top-Level View

  19. Processor(Conti.) • Processor contains two types of register. • User visible register : user can access or see the data of this register using assembly language • Control and status register: used by the processor to control the operation of the processor.

  20. User Visible register • Data register: contains the data • Address register: contains the main memory address of data or instruction. • Index register: related to memory • Stack pointer: point to the top of the stack contains in memory

  21. Control and status register • Program counter(PC): contains the address of the next instruction to be fetched. • Instruction register(IR): contains the instruction most recently fetched. • PSW( Program status word): it contain the condition code bits, which are set by comparison instruction, the CPU priority, the mode( user or kernel) and various other control bits.

  22. Instruction Execution • A program consists of a set of instructions stored in memory • Two steps • Processor reads (fetches) instructions from memory • Processor executes each instruction

  23. Basic Instruction Cycle

  24. Instruction Fetch and Execute • The processor fetches the instruction from memory • Program counter (PC) holds address of the instruction to be fetched next • PC is incremented after each fetch • Fetched instruction loaded into instruction register • Categories • Processor-memory: Data may be transferred from processor to memory or from memory to processor. • Processor-I/O: Data may be transferred to or from a peripheral device by transferring between the processor and an I/O module. • Data processing: The processor may perform some arithmetic or logic operation on data. • Control: An instruction may specify that the sequence of execution be altered.

  25. Example of Program Execution

  26. Interrupts • Interrupt the normal sequencing of the processor • Provided to improve processor utilization • Most I/O devices are slower than the processor • Processor must pause to wait for device • The length of this pause may be on the order of many thousands or even millions of instruction cycles. • Clearly, this is a very wasteful use of the processor.

  27. Common Classes of Interrupts

  28. Flow of Control without Interrupts

  29. Interrupts and the Instruction Cycle

  30. Transfer of Control via Interrupts

  31. Instruction Cycle with Interrupts

  32. Simple Interrupt Processing

  33. 1. The device issues an interrupt signal to the processor. 2. The processor finishes execution of the current instruction before responding to the interrupt. 3. The processor tests for a pending interrupt request, determines that there is one, and sends an acknowledgment signal to the device that issued the interrupt. • The acknowledgment allows the device to remove its interrupt signal. 4.The processor next needs to prepare to transfer control to the interrupt routine. 5. The processor then loads the program counter with the entry location of the interrupt-handling routine that will respond to this interrupt. 6. At this point, the program counter and PSW relating to the interrupted program have been saved on the control stack. 7. The interrupt handler may now proceed to process the interrupt. 8. The saved register values are retrieved from the stack and restored to the registers 9. The final act is to restore the PSW and program counter values from the stack.

  34. Memory Hierarchy • Major constraints in memory • Amount (capacity) • Speed (access time) • Expense(cost) • Faster access time, greater cost per bit • Greater capacity, smaller cost per bit • Greater capacity, slower access speed

  35. The Memory Hierarchy • Going down the hierarchy • Decreasing cost per bit • Increasing capacity • Increasing access time • Decreasing frequency of access to the memory by the processor • Thus, smaller, more expensive, faster memories are supplemented by larger, cheaper, slower memories.

  36. Computer Hardware Review (3) Typical memory hierarchy

  37. I/O Techniques • When the processor encounters an instruction relating to I/O, • it executes that instruction by issuing a command to the appropriate I/O module. • Three techniques are possible for I/O operations: • Programmed I/O • Interrupt-driven I/O • Direct memory access (DMA)

  38. Programmed I/OInstruction Set • With this technique, the processor is responsible for extracting data from main memory for output and storing data in main memory for input. • Control • Used to activate and instruct device • Status • Tests status conditions • Transfer • Read/write between process register and device

  39. Programmed I/O Example • Data read in a word at a time • Processor remains in status-checking look while reading

  40. Interrupt-Driven I/O • Processor issues an I/O command to a module • and then goes on to do some other useful work. • The I/O module will then interrupt the processor to request service when it is ready to exchange data with the processor.

  41. Interrupt-Driven I/O • Eliminates needless waiting • But everything passes through processor.

  42. Direct Memory Access • Performed by a separate module on the system • When needing to read/write processor issues a command to DMA module with: • Whether a read or write is requested • The address of the I/O device involved • The starting location in memory to read/write • The number of words to be read/written

  43. Direct Memory Access • I/O operation delegated to DMA module • Processor only involved when beginning and ending transfer. • Much more efficient.

  44. Buses • The system has eight buses • Cache • Local • Memory • ISA ( industry standard architecture)(16.67 MB/sec) • PCI ( peripheral component interconnect)( 528 MB/sec) • SCSI ( small computer interface) • USB ( universal serial buses) • IDE(Integrated Drive Electronics )

  45. Computer Hardware Review Structure of a large Pentium system

  46. How operating system boot? • BIOS (Basic input output system) • It contains the low level I/O Software. • When computer is turn on , BIOS are booted. • It first check to see how much RAM is installed • And whether keyboard and other basic device are installed and responding correctly. • The BIOS determines the boot devices by trying a list of devices stored in the BIOS memory. • The user can change the list of BOOTING devices by entering a BIOS programming just after booting. • If System booted from Hard disk. • The first sector of boot device read in to memory and executed. • This sector contains partition information and active partition.

  47. Cont. • Then secondary boot loader is read from partition. • The loader reads in the OS from the active partition and start it. • The OS then queries the BIOS to get the configuration information. • For each device it check to see if it has device driver, if not, it ask to user to insert CD for driver. • Then OS load driver in to kernel. • It initialize tables, create what ever back ground process are needed.

  48. System Call • The interface between the operating system and the user program is defined by the set of services provided by the OS. • Such as a reading a data from keyboard or file. • It has execute a trap or system call instruction to transfer control to the OS. • Count = read(fd,buffer,nbytes),

  49. Steps in Making a System Call There are 11 steps in making the system call read (fd, buffer, nbytes)

  50. Some System Calls For Process Management

More Related