Information Security - 2. Task Switching Every process has an associated Task State Segment, whose starting point is stored in the Task register. A task.

Slides:



Advertisements
Similar presentations
Intermediate x86 Part 3 Xeno Kovah – 2010 xkovah at gmail.
Advertisements

Memory Management Unit
Types of Code Segments Conforming Code Segment
Introduction to The x86 Microprocessor
Unit 4 Chapter-1 Multitasking. The Task State Segment.
16.317: Microprocessor System Design I
Intel MP.
Microprocessors system architectures – IA32 real and virtual-8086 mode Jakub Yaghob.
IA32 Paging Scheme Introduction to the Pentium’s support for “virtual” memory.
CS591 (Spring 2001) The Linux Kernel: Signals & Interrupts.
Operating Systems: Segments 1 Segmentation Hardware Support single user program system: – wish somehow to relocate address 0 to after operating system.
IA-32 Processor Architecture
Page-Faults in Linux How can we study the handling of page-fault exceptions?
Exceptions and Interrupts How does Linux handle service- requests from the cpu and from the peripheral devices?
X86 segmentation, page tables, and interrupts 3/17/08 Frans Kaashoek MIT
1 CE6105 Linux 作業系統 Linux Operating System 許 富 皓.
Linux Operating System
Linux Operating System
CS2422 Assembly Language & System Programming September 22, 2005.
Introduction to Interrupts
Microprocessor Systems Design I Instructor: Dr. Michael Geiger Fall 2012 Lecture 15: Protected mode intro.
UNIT 2 Memory Management Unit and Segment Description and Paging
Intel IA32 OS Support -Refresh
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.
80386DX.
Windows Kernel Internals Traps, Interrupts, Exceptions
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.
System Address Registers/Memory Management Registers Four memory management registers are used to specify the locations of data structures which control.
80386DX.
1 i386 Memory Management Professor Ching-Chi Hsu 1998 年 4 月.
1 iAPX86 Protection Electronic Computers M. 2 Protection The protection mechanism is active only after PE setting in CR0 and is used before any access.
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.
6. HAL and IDT ENGI 3655 Lab Sessions. Richard Khoury2 Textbook Readings  Interrupts ◦ Section  Hardware Abstraction Layer ◦ Section
80386DX.
D P L s G D X U P Segment Descriptor A T Y P E
1 Microprocessors CSE Protected Mode Memory Addressing Remember using real mode addressing we were previously able to address 1M Byte of memory.
Page Replacement Implementation Issues Text: –Tanenbaum ch. 4.7.
Assembly 08 Interrupts. Introduction Interrupts are similar to procedures –They are used to alter a program’s control flow –The interrupt service is also.
10. Epilogue ENGI 3655 Lab Sessions.  We took control of the computer as early as possible, right after the end of the BIOS  Our multi-stage bootloader.
Microprocessor system architectures – IA32 security
Lecture 5 Rootkits Hoglund/Butler (Chapters 1-3).
Information Security - 2. Descriptor Tables Descriptors are stored in three tables: – Global descriptor table (GDT) Maintains a list of most segments.
Information Security - 2. CISC Vs RISC X86 is CISC while ARM is RISC CISC is Compiler’s heaven while RISC is Architecture’s heaven Orthogonal ISA in RISC.
Privilege Check for Control Transfer(Code Access) Control transfers (except interrupts) are accomplished by the instructions JMP, CALL, and RET The "near"
An Interrupt is either a Hardware generated CALL (externally derived from a hardware signal) OR A Software-generated CALL (internally derived from.
Interrupts and exceptions
Introduction to The x86 Microprocessor
Descriptor Table & Register
16.317: Microprocessor System Design I
MICROPROCESSOR BASED SYSTEM DESIGN
Operating Systems Engineering
Microprocessor Systems Design I
Microprocessor Systems Design I
Anton Burtsev February, 2017
Privilege Levels.
Day 08 Processes.
Day 09 Processes.
Electronic Computers M
Protection UQ: Explain the protection mechanism of X86 Intel family microprocessor(10 Marks)
Information Security - 2
x86 segmentation, page tables, and interrupts
System Segment Descriptor
CNET 315 Microprocessor & Assembly Language
Information Security - 2
CS-401 Computer Architecture & Assembly Language Programming
Interrupts and System Calls
Presentation transcript:

Information Security - 2

Task Switching Every process has an associated Task State Segment, whose starting point is stored in the Task register. A task switch happens due to a jmp or call instruction whose segment selector points to a Task state segment descriptor, which in turn points to the base of a new task state segment

Task State Segment

Task Switching There are different types of descriptors in a Descriptor table. One of them is a task state segment descriptor. jmp 0x10: and that 0x10 points to a TGD, then the current process context is saved and the new process pointed out by the task state segment descriptor is loaded. A perfect context switch. TSS descriptor only in a GDT.

Task Switching process

Interrupt Handling Processor generates interrupts that index into a Interrupt Descriptor Table, whose base is stored in IDTR and loaded using the privileged instruction LIDT. The descriptors in IDT can be – Interrupt gate: ISR handled as a normal call subroutine – uses the interrupted processor stack to save EIP,CS, (SS, ESP in case of stack switch – new stack got from TSS). – Task gate: ISR handled as a task switch Needed for stack fault in CPL = 0 and double faults.

Interrupt Handling Processor handles a total of 255 interrupts 0-31 are used by machine or reserved are user definable 0 – Divide error, goes to first descriptor in IDT 1 – Debug 8 – Double Fault 12 – Stack Segment fault 13 – General Protection Fault 14 – Page Fault

End of Session-14 Thank You