Unit 4 Chapter-1 Multitasking. The Task State Segment.

Slides:



Advertisements
Similar presentations
Memory Management Unit
Advertisements

1/1/ / faculty of Electrical Engineering eindhoven university of technology Memory Management and Protection Part 3:Virtual memory, mode switching,
Chapter 2 (cont.) An Introduction to the 80x86 Microprocessor Family Objectives: The different addressing modes and instruction types available The usefulness.
Chapter 12: Interrupts. Copyright ©2009 by Pearson Education, Inc. Upper Saddle River, New Jersey All rights reserved. The Intel Microprocessors:
FEATURES OF 80386: Two versions of are commonly available: 1) 80386DX
16.317: Microprocessor System Design I
Intel MP.
Microprocessors system architectures – IA32 real and virtual-8086 mode Jakub Yaghob.
Set 20 Interrupts. INTERRUPTS The Pentium has a mechanism whereby external devices can interrupt it. Devices such as the keyboard, the monitor, hard disks.
Architectural Support for OS March 29, 2000 Instructor: Gary Kimura Slides courtesy of Hank Levy.
1 Hardware and Software Architecture Chapter 2 n The Intel Processor Architecture n History of PC Memory Usage (Real Mode)
X86 segmentation, page tables, and interrupts 3/17/08 Frans Kaashoek MIT
Linux Operating System
Introduction to Interrupts
Microprocessor Systems Design I Instructor: Dr. Michael Geiger Fall 2012 Lecture 15: Protected mode intro.
8086 emulation Using Virtual-8086 mode to execute real-mode procedures in a protected-mode environment.
UNIT 2 Memory Management Unit and Segment Description and Paging
Intel IA32 OS Support -Refresh
Intel
Interrupts  Interrupt is a process where an external device can get the attention of the microprocessor.  The process starts from the I/O device  The.
Interrupts. What Are Interrupts? Interrupts alter a program’s flow of control  Behavior is similar to a procedure call »Some significant differences.
80386DX.
Intel MP (32-bit microprocessor) Designed to overcome the limits of its predecessor while maintaining the software compatibility with the.
1/2002JNM1 With 20 bits, 1,048,576 different combinations are available. Each memory location is assigned a different combination. Each memory location.
Microprocessor system architectures – IA32 segmentation Jakub Yaghob.
Multitasking Mr. Mahendra B. Salunke Asst. Prof. Dept. of Computer Engg., STES SITS, Narhe, Pune-41 STES Sinhgad Institute of Tech. & Science Dept. of.
Khaled A. Al-Utaibi  Interrupt-Driven I/O  Hardware Interrupts  Responding to Hardware Interrupts  INTR and NMI  Computing the.
CSNB374: Microprocessor Systems Chapter 5: Procedures and Interrupts.
Virtual 8086 Mode  The supports execution of one or more 8086, 8088, 80186, or programs in an protected-mode environment.  An 8086.
EFLAG Register of The The only new flag bit is the AC alignment check, used to indicate that the microprocessor has accessed a word at an odd.
Microprocessor system architectures – IA32 tasks Jakub Yaghob.
Segment Descriptor Segments are areas of memory defined by a programmer and can be a code, data or stack segment. In segments need not be all the.
D P L s G D X U P Segment Descriptor A T Y P E
Page Replacement Implementation Issues Text: –Tanenbaum ch. 4.7.
Different Microprocessors Tamanna Haque Nipa Lecturer Dept. of Computer Science Stamford University Bangladesh.
Assembly 08 Interrupts. Introduction Interrupts are similar to procedures –They are used to alter a program’s control flow –The interrupt service is also.
ECE 353 Introduction to Microprocessor Systems Michael J. Schulte Week 11.
Information Security - 2. Other Registers EFLAGS – 32 Bit Register CFPFAFZFSFTFIFDFOFIO PL IO PL NTRFVM Bits 1,3,5,15,22-31 are RESERVED. 18: AC, 19:VIF,
بسم الله الرحمن الرحيم MEMORY AND I/O.
Microprocessor system architectures – IA32 security
Interrupt-Driven I/O There are different types of interrupts –Hardware Generated by the 8259 PIC – signals the CPU to suspend execution of the current.
Information Security - 2. Task Switching Every process has an associated Task State Segment, whose starting point is stored in the Task register. A task.
Information Security - 2. Descriptor Tables Descriptors are stored in three tables: – Global descriptor table (GDT) Maintains a list of most segments.
BIOS and DOS Interrupts Basic Input /Outpu System Disk Operating System.
Introduction to Exceptions 1 Introduction to Exceptions ARM Advanced RISC Machines.
The Microprocessor & Its Architecture A Course in Microprocessor Electrical Engineering Department Universitas 17 Agustus 1945 Jakarta.
Microprocessor Architecture
Virtualization D. J. Foreman 2009.
32- bit Microprocessor-Intel 80386
An Interrupt is either a Hardware generated CALL (externally derived from a hardware signal) OR A Software-generated CALL (internally derived from.
Descriptor Table & Register
16.317: Microprocessor System Design I
MICROPROCESSOR BASED SYSTEM DESIGN
Microprocessor and Assembly Language
Microprocessor Systems Design I
Microprocessor Systems Design I
Anton Burtsev February, 2017
Interrupts In 8085 and 8086.
Interrupts – (Chapter 12)
contains 8086 processor and several additional functional chips: clock generator 2 independent DMA channels PIC 3 programmable 16-bit timers.
x86 segmentation, page tables, and interrupts
System Segment Descriptor
Page Replacement Implementation Issues
Microprocessor and Assembly Language
Memory Management Paging (continued) Segmentation
CS 301 Fall 2002 Computer Organization
Page Replacement Implementation Issues
CNET 315 Microprocessor & Assembly Language
UNIT-VII Advanced Micro Processors Introduction to 80286
First Generation 32–Bit microprocessor
Presentation transcript:

Unit 4 Chapter-1 Multitasking

The Task State Segment

When task is created, LDT Selector (offset 60H), PDBR (1CH), protection level stack,T bit, I/O permission bit map are filled in. 20H to 5ch is change during task switching

TSS Descriptor As with any segment, the TSS utilize a descriptor that defines the various characteristics the segment will exhibit

Task Register TSS Descriptor may only be loaded into GDT The current TSS in use is accessed through the use of TR

Task Gates

The Pentium provides task gates as an additional way to facilitate task switching Task gate may stored in LDT or IDT It allows a single busy bit to be used for a segment

Task Switching Different ways 1.The current task JMP’s or CALLs a TSS Descriptor 2.The current task JMP’s or CALLs a Task gate 3.The current task executes an IRET when the NT flag is set 4.An interrupt or exception selects a task gate

Task switching

Nested task

I/O Permission Bitmap

Unit 4 Chapter-2 Virtual Mode

Virtual Mode 8086

Programmer’s model of Virtual mode External Memory address space I/o Address space 00000H 0000 H FFFFFH FFFF H

Virtual Mode instructions Instructions supported are : 1.LSS 2.LFS 3.LGS 4.PUSHA 5.POPA 6.ENTER & LEAVE 7.Single bit instruction 8.Byte set on condition 9.Double shift instruction 10.Generalized multiply 11.String I/O 12.Bit scan

Privilege & Protection CPL=3 Restricted instructions are: – HLT – CLTS – LGDT, LIDT, LLDT, LTR, LMSW, LAR, LSL – SLDT, STR – ARPL – Mov to/from control register – Mov to/from debus register – Mov to/from test register

VM 8086 program has a fixed privilege =3 & it is not able to change IOPL bits & so might be denied I/O permission, when its TSS is first created IOPL field & I/O Bitmap used in VM is different than protected mode

IOPL controls the following instruction only- – CLI – PUSHF – POPF – LOCK : assert bus lock signal – INT n : S/w interrupts – IRET (Sensitive instructions) which require VM86 monitor

Entering & Leaving virtual-8086 mode

Comparison between real, protected, virtual mode

I/O Instructions 1.Register I/O instructions -e.g. IN AL, 30h 2.String I/O instructions - DS: ESI or ES: EDI registers I/O Handling in Pentium – I/O port addressing

Unit - 4 Chapter – 3 Interrupt, Exception & IO

Interrupt Whenever the microprocessor is executing a program, an if a user wants service to an I/O device then an external asynchronous i/p would inform the microprocessor that it should complete the execution of current instruction & then fetch a new routine that will service the requesting I/O device 3 Types of interrupt: 1.Hardware interrupt 2.Software interrupt 3.Error condition(Exception or types)

1.Hardware Interrupt - Physical pins are provided in the chip - This interrupts are generated by changing the logic levels on the interrupt pins a)NMI (Non - maskable Interrupt) - compulsory execute - cannot be disabled - suitable for critical situations - when active type 2 interrupt is generated b)Interrupt - maskable interrupt - enabled & disabled by … - level sensitive - priority mechanism

2. Software Interrupt - generated by executing an instruction - The INT n instruction of the Pentium can be used to do one of the 256 interrupts (Type 0-255) Example: INT 0 instruction can be used to send execution to a divide by zero interrupt service routine With the help of these software interrupts we can call the routines from different programs in the system Example : BIOS

3.Error Conditions (Exception or Types) Divide by zero error

Exception Exceptions(error codes) are generated by internal events While Interrupts are generated by external events Exceptions are divided into 3 groups depending on the way they are reported, & whether or not restart of the instruction causing an exception is supported 1)Faults 2)Traps 3)Aborts

1)Faults: These are exceptions that are detected & serviced before the execution of the faulting instruction Eg.: Faults in virtual memory system 2) Traps: These are exceptions that are reported immediately after the execution of the instruction that caused the problem Eg.: User defined interrupts 3)Aborts: Used to report severe errors such as a h/w error, or illegal values in the system table

IVT for real mode Exception Handling Pentium supports total 256 types of interrupts Each of which reserve 4 bytes i.e. double word pointer Higher addressed word : New CS base address Lower addressed word: New IP– procedure’s offset from the beginning of the segment New CS: NEW IP – New physical address As each type, 4ytes(2 for CS & 2 for IP) are required, therefore it will occupy 1kb of low memory

The microprocessor receives NEW CS & NEW IP value from vector table, after calling ISR TYPE=4 location reserved -multiply the type with 4 that will give you address of that type Then 0CH/0DH location will provide OFFSET IP(NEW IP) and )EH/0FH will provide base address of the segment (New CS)