Tutorial No. 11 Module 10.

Slides:



Advertisements
Similar presentations
Chapter 2 (cont.) An Introduction to the 80x86 Microprocessor Family Objectives: The different addressing modes and instruction types available The usefulness.
Advertisements

Cache Memory Exercises. Questions I Given: –memory is little-endian and byte addressable; memory size; –number of cache blocks, size of cache block –An.
Computer Organization and Assembly Languages Yung-Yu Chuang
Intel MP.
CSC 221 Computer Organization and Assembly Language
Lect 3: Instruction Set and Addressing Modes. 386 Instruction Set (3.4) –Basic Instruction Set : 8086/8088 instruction set –Extended Instruction Set :
Using one level of Cache:
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
Context Switch Animation Another one by Anastasia.
How caches take advantage of Temporal locality
X86 segmentation, page tables, and interrupts 3/17/08 Frans Kaashoek MIT
Context switch in Linux
© 2006 Pearson Education, Upper Saddle River, NJ All Rights Reserved.Brey: The Intel Microprocessors, 7e Chapter 2 The Microprocessor and its Architecture.
IA-32 Architecture COE 205 Computer Organization and Assembly Language Dr. Aiman El-Maleh College of Computer Sciences and Engineering King Fahd University.
Assembly Language for Intel-Based Computers Chapter 2: IA-32 Processor Architecture Kip Irvine.
Assembly Language Basic Concepts IA-32 Processor Architecture.
Microprocessors Introduction to ia32 Architecture Jan 31st, 2002.
ICS312 Set 3 Pentium Registers. Intel 8086 Family of Microprocessors All of the Intel chips from the 8086 to the latest pentium, have similar architectures.
Microprocessor Systems Design I Instructor: Dr. Michael Geiger Spring 2012 Lecture 2: 80386DX Internal Architecture & Data Organization.
Microprocessor Systems Design I Instructor: Dr. Michael Geiger Spring 2014 Lecture 4: x86 memory.
© 2006 Pearson Education, Upper Saddle River, NJ All Rights Reserved.Brey: The Intel Microprocessors, 7e Chapter 2 The Microprocessor and its Architecture.
Lect 4: Instruction Set and Addressing Modes. 386 Instruction Set (3.4)  Basic Instruction Set : 8086/8088 instruction set  Extended Instruction Set.
ESP int f(int x) {.... } int g(int y) { …. f(2); …. } int main() { …. g(1); …. } EIP 100: 200: 250: 300: 350:
Multitasking Mr. Mahendra B. Salunke Asst. Prof. Dept. of Computer Engg., STES SITS, Narhe, Pune-41 STES Sinhgad Institute of Tech. & Science Dept. of.
Fall 2012 Chapter 2: x86 Processor Architecture. Irvine, Kip R. Assembly Language for x86 Processors 6/e, Chapter Overview General Concepts IA-32.
COMP 2003: Assembly Language and Digital Logic Chapter 0: Some Background Notes by Neil Dickson.
IA32 (Pentium) Processor Architecture. Processor modes: 1.Protected (mode we will study) – 32-bit mode – 32-bit (4GB) address space 2.Virtual 8086 modes.
LINUX System : Lecture 7 Process Bong-Soo Sohn Lecture notes acknowledgement : The design of UNIX Operating System.
Microprocessor system architectures – IA32 tasks Jakub Yaghob.
80386DX. Programming Model The basic programming model consists of the following aspects: – Registers – Instruction Set – Addressing Modes – Data Types.
Chapter 2 Parts of a Computer System. 2.1 PC Hardware: Memory.
Register Allocation Harry Xu CS 142 (b) 02/11/2013.
Chapter 2 The Microprocessor Architecture Microprocessors prepared by Dr. Mohamed A. Shohla.
What You Need to Know for Project Three Steve Muckle Wednesday, February 19 th Spring 2003.
Information Security - 2. Descriptor Tables There are two descriptor tables – Global Descriptor Tables – Local Descriptor Tables The global descriptor.
Microprocessor, Programming & Interfacing Tutorial 2- Module 3.
The Microprocessor & Its Architecture A Course in Microprocessor Electrical Engineering Department Universitas 17 Agustus 1945 Jakarta.
Assembly Language Addressing Modes. Introduction CISC processors usually supports more addressing modes than RISC processors. –RISC processors use the.
What You Need to Know for Project Three Dave Eckhardt Steve Muckle.
Microprocessors CSE- 341 Dr. Jia Uddin Assistant Professor, CSE, BRAC University Dr. Jia Uddin, CSE, BRAC University.
Tutorial 7 Module 6.
Chapter Overview General Concepts IA-32 Processor Architecture
Microprocessor Architecture
Stack Operations Dr. Hadi AL Saadi.
Assembly language.
80486 Microprocessor The 32-bit is the next evolutionary step up from the One of the most obvious feature included in a is a built.
Operating Systems Engineering
CS-401 Computer Architecture & Assembly Language Programming
Anton Burtsev February, 2017
Computer skills CPU Jakub Yaghob.
Basic Microprocessor Architecture
Assembly IA-32.
x86 segmentation, page tables, and interrupts
Tutorial 7 MODULE 6.
Intel Microprocessor.
FIGURE 12-1 Memory Hierarchy
Set-Associative Cache
Interconnect with Cache Coherency Manager
CS 301 Fall 2002 Computer Organization
Lecture 22: Cache Hierarchies, Memory
Direct Mapping.
CSCI 6307 Foundation of Systems – Exercise (3)
Overheads for Computers as Components 2nd ed.
The Microprocessor & Its Architecture
Assembly Language (CSW 353)
Computer Architecture CST 250
REGISTER ORGANIZATION OF 80386
Low-Level Thread Dispatching on the x86
Register Allocation Harry Xu CS 142 (b) 05/08/2018.
Presentation transcript:

Tutorial No. 11 Module 10

Q1 The OS of an 80286 processor supports non-preemptive priority scheduling. There are 5 threads that have to be scheduled. The tasks and priority are shown in the table below. Give the order of the threads scheduled in the 1st five timeslots. Thread TH1 TH4 TH2 TH5 TH3 Priority 1 2 3 4 5

Q2 The following data is present in memory of size 16 locations 0000 0001 56 0010 3A 0011 79 0100 67 0101 8D 0110 9B 0111 78 1000 91 1001 AD 1010 BC 1011 78 1100 96 1101 70 1110 00 1111 FF

If the data is read by the processor in the following order from the addresses 0000 0001 0100 1000 Show the contents of the cache for direct-mapped; four line cache with each read operation.

Solution Main Memory Address – 4 bits Cache – 4 line Address – 2 bits Block No. – 2bits Tag 2- bits 00 01

Solution Block Tag Data 00 01 10 11

Solution – After 1st read Cold Miss Block Tag Data 00 F8 01 10 11

Solution – After 2nd read Cold Miss Block Tag Data 00 F8 01 56 10 11

Solution – After 3rd read Conflict Miss Block Tag Data 00 F8 01 56 10 11

Solution – After 3rd read Conflict Miss Block Tag Data 00 01 67 56 10 11

Solution – After 4th read Conflict Miss Block Tag Data 00 01 67 56 10 11

Solution – After 4th read Conflict Miss Block Tag Data 00 10 91 01 56 11

Q3 Repeat the problem if the cache for 2 way set associative, two line cache after every read operation.

Solution Main Memory Address – 4 bits Cache – 4 line Address – 1 bit Block No. – 1 bit Tag 3- bits 0001

Solution Block Tag Data 1 Set 0 Set 1

Solution – After 1st read Cold Miss Block Tag Data 000 F8 1 Set 0 Set 1

Solution – After 1st read Cold Miss Block Tag Data 000 F8 1 Set 0 Set 1

Solution – After 2nd read Cold Miss Block Tag Data 000 F8 1 56 Set 0 Set 1

Solution – After 3rd read Cold Miss Block Tag Data 000 F8 010 67 1 56 Set 0 Set 1

Solution – After 4th read Conflict Miss Block Tag Data 000 F8 010 67 1 56 Set 0 Set 1

Solution – After 4th read Conflict Miss Block Tag Data 100 91 010 67 1 000 56 Set 0 Set 1

Q 4 Assume that the system has a two-level cache: The level-1 cache has a hit rate of 90% and the level-2 cache has a hit rate of 97%. The level 1 cache access time is 4 ns, the level 2 cache access time is 15ns and access time of main memory is 80 ns. What is the average memory access time?

Solution h1 – 0.9 h2 - 0.1 x 0.97 tav = h1tL1 + h2tL2 + (1-h1 -h2)tmain tav = 0.9 x 4ns + 0.097 x 15ns + (1-0.9-0.097) 80ns 5.295 ns

Q5 Processor - 80286 GDTR – 100000H

GDT Address Data 100008 00 82 01 FF 100010 93 20 7F 100018 83 03 3F 100020 A1 0A 1F 100028 DF B0 100030 92 B1 0F 100038 BF 7B 100040 D2 7A 07 100048 9F 100050 C4 02 38 10 100058 85 100060 B3 50

LDT 1 Address Data 010000 00 82 01 FF 010008 20 010010 83 03 3F 010018 FC 0A 1F 010020 DF B0 010028 92 B1 0F 010030 B2 7B 010038 D2 7A 07 010040 9F A1 010048 B3 A3 010050 010058 50

LDT 2 Address Data 200000 00 82 01 FF 200008 20 200010 83 03 3F 200018 FC 0A 1F 200020 DF B0 200028 92 B1 0F 200030 B2 7B 200038 D2 7A 07 200040 9F A1 200048 B3 A3 200050 200058 50

Current CPL – 10 CALL 0051H , [1200H]

Solution 7B 10 00H

Current CPL 00 CALL 0058H , [1400H]

0000 0000 0000 0000 Link ESP0 SS0 ESP1 SS1 ESP2 SS2 CR3 EIP (00 00 10 00) EFLAGS EAX ECX EDX EBX ESP EBP

ESI EDI 0000 0000 0000 0000 ES CS (5000) SS DS FS GS LDT Available T Available to user