Free Essay

What Are the Differences Between an Interrupt and a Trap? Provide an Example of Each. What Is Their Importance?

In:

Submitted By VickieD
Words 317
Pages 2
The difference between Interrupts and Traps are simple. Interrupts are hardware interruptions as to where Traps are software – invoked interrupts.
Hardware interrupts are program controlled interruptions produced by some event external to the CPU. This stops the CPU from executing the code it was already running and to jump to the event that generated the interrupt. These type of interrupts can come from numerous sources, such as, expansion cards, timer chip, keyboards, and mouse, as well as peripheral devices. Most often, hardware interruptions do not ever occur because of event related program execution. When and interrupt occurs, the CPU is sent an interrupt request by the interrupt event, in order to provide service needed by the device and then returns to the normal program. Most often when a hardware interrupt occurs the CPU starts interrupt server routine (ISR) and other hardware interrupts are disabled.

The sole purpose of a Trap is to provide a fixed subroutine and can be identified as a transfer of control that is normally incorporated by the programmer. When a trap occurs, the CPU stops what is it doing like it does when an interrupt occurs, then it saves the context before jumping to the suitable trap routine. Then it completes and restores the context and continues execution.

Interrupts are a very important part of computer design. All computers have their own interrupt structure, which most of the functions are the same. An interrupt has to transfer control to the suitable ISR (interrupt service routine), in addition to being done in a timely matter. In a computer system only the established interrupts can occur, this allows the array of pointers, otherwise known as the “interrupted vector” used to store the address of interrupt routines. Traps and interrupts are associated with an index into that vector. The index values are a device number that provides the address of the ISR for interrupting device.

Similar Documents

Free Essay

Operating System Concepts

...Operating system concepts(Seventh edition) 2008.3 solutions to the exercises Chapter 1 1.1 In a multiprogramming and time-sharing environment, several users share the system simultaneously. This situation can result in various security problems. a. What are two such problems? b. Can we ensure the same degree of security in a time-shared machine as in a dedicated machine? Explain your answer. Answer: a. Stealing or copying one’s programs or data; using system resources (CPU, memory, disk space, peripherals) without proper accounting. b. Probably not, since any protection scheme devised by humans can inevitably be broken by a human, and the more complex the scheme, the more difficult it is to feel confident of its correct implementation. 1.2 The issue of resource utilization shows up in different forms in different types of operating systems. List what resources must be managed carefully in the following settings: a. Mainframe or minicomputer systems b. Workstations connected to servers c. Handheld computers Answer: a. Mainframes:memory and CPU resources, storage, network bandwidth. b. Workstations: memory and CPU resouces c. Handheld computers: power consumption, memory resources. 1.3 Under what circumstances would a user be better off using a timesharing system rather than a PC or single-user workstation? Answer: When there are few other users, the task is large, and the hardware is fast, time-sharingmakes sense. The full power of the system can be brought to bear on the...

Words: 26526 - Pages: 107

Premium Essay

Computer Organization and Architecture Designing for Performance 8th Edition

...COMPUTER ORGANIZATION AND ARCHITECTURE DESIGNING FOR PERFORMANCE EIGHTH EDITION William Stallings Prentice Hall Upper Saddle River, NJ 07458 Library of Congress Cataloging-in-Publication Data On File Vice President and Editorial Director: Marcia J. Horton Editor-in-Chief: Michael Hirsch Executive Editor: Tracy Dunkelberger Associate Editor: Melinda Haggerty Marketing Manager: Erin Davis Senior Managing Editor: Scott Disanno Production Editor: Rose Kernan Operations Specialist: Lisa McDowell Art Director: Kenny Beck Cover Design: Kristine Carney Director, Image Resource Center: Melinda Patelli Manager, Rights and Permissions: Zina Arabia Manager, Visual Research: Beth Brenzel Manager, Cover Visual Research & Permissions: Karen Sanatar Composition: Rakesh Poddar, Aptara®, Inc. Cover Image: Picturegarden /Image Bank /Getty Images, Inc. Copyright © 2010, 2006 by Pearson Education, Inc., Upper Saddle River, New Jersey, 07458. Pearson Prentice Hall. All rights reserved. Printed in the United States of America. This publication is protected by Copyright and permission should be obtained from the publisher prior to any prohibited reproduction, storage in a retrieval system, or transmission in any form or by any means, electronic, mechanical, photocopying, recording, or likewise. For information regarding permission(s), write to: Rights and Permissions Department. Pearson Prentice Hall™ is a trademark of Pearson Education, Inc. Pearson® is a registered trademark of...

Words: 239771 - Pages: 960

Premium Essay

Let Us C - Yashwant Kanetkar.Pdf

...prestigious “Best .NET Technical Contributor” award recently. He can be reached at kanetkar@kicit.com. Preface to the Fifth Edition It is mid 2004. World has left behind the DOTCOM bust, 9/11 tragedy, the economic downturn, etc. and moved on. Countless Indians have relentlessly worked for close to two decades to successfully establish “India” as a software brand. At times I take secret pleasure in seeing that a book that I have been part of, has contributed in its own little way in shaping so many budding careers that have made the “India” brand acceptable. Computing and the way people use C for doing it keeps changing as years go by. So overwhelming has been the response to all the previous editions of “Let Us C” that I have now decided that each year I would come up with a new edition of it so that I can keep the readers abreast with the way C is being used at that point in time. There are two phases in every C programmer’s life. In the first phase he is a learner trying to understand the language elements and their nuances. At this stage...

Words: 46379 - Pages: 186

Premium Essay

Let Us C

...Let Us C Fifth Edition Yashavant P. Kanetkar Dedicated to baba Who couldn’t be here to see this day... About the Author Destiny drew Yashavant Kanetkar towards computers when the IT industry was just making a beginning in India. Having completed his education from VJTI Mumbai and IIT Kanpur in Mechanical Engineering he started his training company in Nagpur. Yashavant has a passion for writing and is an author of several books in C, C++, VC++, C#, .NET, DirectX and COM programming. He is a much sought after speaker on various technology subjects and is a regular columnist for Express Computers and Developer 2.0. His current affiliations include being a Director of KICIT, a training company and DCube Software Technologies, a software development company. In recognition to his contribution Microsoft awarded him the prestigious “Best .NET Technical Contributor” award recently. He can be reached at kanetkar@kicit.com. Acknowledgments It has been a journey of almost a decade from the stage the book idea of “Let Us C” was conceived up to the release of this Fifth Edition. During this journey I have met so many students, developers, professors, publishers and authors who expressed their opinions about Let Us C. They have been the main motivators in my effort to continuously improve this book. In particular I am indebted to Manish Jain who had a faith in this book idea, believed in my writing ability, whispered the words of encouragement and made helpful suggestions...

Words: 46651 - Pages: 187

Free Essay

C Book

...Let Us C Fifth Edition Yashavant P. Kanetkar Dedicated to baba Who couldn’t be here to see this day... About the Author Destiny drew Yashavant Kanetkar towards computers when the IT industry was just making a beginning in India. Having completed his education from VJTI Mumbai and IIT Kanpur in Mechanical Engineering he started his training company in Nagpur. Yashavant has a passion for writing and is an author of several books in C, C++, VC++, C#, .NET, DirectX and COM programming. He is a much sought after speaker on various technology subjects and is a regular columnist for Express Computers and Developer 2.0. His current affiliations include being a Director of KICIT, a training company and DCube Software Technologies, a software development company. In recognition to his contribution Microsoft awarded him the prestigious “Best .NET Technical Contributor” award recently. He can be reached at kanetkar@kicit.com. Acknowledgments It has been a journey of almost a decade from the stage the book idea of “Let Us C” was conceived up to the release of this Fifth Edition. During this journey I have met so many students, developers, professors, publishers and authors who expressed their opinions about Let Us C. They have been the main motivators in my effort to continuously improve this book. In particular I am indebted to Manish Jain who had a faith in this book idea, believed in my writing ability, whispered the words of encouragement and made helpful suggestions...

Words: 46741 - Pages: 187

Free Essay

Comp Txt

...1 2 Acknowledgements p.1 tr ©iStockphoto.com/Dennys Bisogno, etc t = top, b = bottom, l = left, r = right, c = centre Computer hardware and software brand names mentioned in this book are protected by their respective trademarks and are acknowledged. Scratch is developed by the Lifelong Kindergarten Group at the MIT Media Lab. See http://scratch.mit.edu Every effort has been made to trace all copyright holders, but if any have been inadvertently overlooked the publishers will be pleased to make the necessary arrangements at the first opportunity. Although every effort has been made to ensure that website addresses are correct at time of going to press, Hodder Education cannot be held responsible for the content of any website mentioned in this book. It is sometimes possible to find a relocated web page by typing in the address of the home page for a website in the URL window of your browser. Photo credits p.1 © peno – Fotolia; p.15 © Dmitrydesigner/Fotolia; p.16 ©iStockphoto.com/Karl Yamashita; p.57 © Romanchuck – Fotolia; p.58 t © C Squared Studios/Photodisc/Getty Images, m ©Dmitriy Melnikov - Fotolia.com, b © Popova Olga/Fotolia; p.59 © picsfive – Fotolia; p.65 © Manfred Schmidt – Fotolia.com; p.67 © dja65 – Fotolia; p.68 © Konstantin Shevtsov – Fotolia; p.69 t © Miguel Navarro/Stone/Getty Images, b © Piero Cruciatti/Alamy; p.73 © Jamdesign/Fotolia; p.78 and 79 © adisa – Fotolia; p.81 © Mykola Mazuryk – Fotolia; p.82 t © Mauro Rodrigues/Fotolia...

Words: 49691 - Pages: 199

Premium Essay

Heuy2Kj4

...the essentials of Linda Null and Julia Lobur JONES AND BARTLETT COMPUTER SCIENCE the essentials of Linda Null Pennsylvania State University Julia Lobur Pennsylvania State University World Headquarters Jones and Bartlett Publishers 40 Tall Pine Drive Sudbury, MA 01776 978-443-5000 info@jbpub.com www.jbpub.com Jones and Bartlett Publishers Canada 2406 Nikanna Road Mississauga, ON L5C 2W6 CANADA Jones and Bartlett Publishers International Barb House, Barb Mews London W6 7PA UK Copyright © 2003 by Jones and Bartlett Publishers, Inc. Cover image © David Buffington / Getty Images Illustrations based upon and drawn from art provided by Julia Lobur Library of Congress Cataloging-in-Publication Data Null, Linda. The essentials of computer organization and architecture / Linda Null, Julia Lobur. p. cm. ISBN 0-7637-0444-X 1. Computer organization. 2. Computer architecture. I. Lobur, Julia. II. Title. QA76.9.C643 N85 2003 004.2’2—dc21 2002040576 All rights reserved. No part of the material protected by this copyright notice may be reproduced or utilized in any form, electronic or mechanical, including photocopying, recording, or any information storage or retrieval system, without written permission from the copyright owner. Chief Executive Officer: Clayton Jones Chief Operating Officer: Don W. Jones, Jr. Executive V.P. and Publisher: Robert W. Holland, Jr. V.P., Design and Production: Anne Spencer V.P., Manufacturing and...

Words: 118595 - Pages: 475

Premium Essay

Scientific Report

...ACKNOWLEDGEMENTS This thesis could not have been completed without the help and support from a number of people. First and foremost, I would like to express my sincere gratitude to Mrs. Hoang Tuyet Minh, my supervisor, who has patiently and constantly supported me through the stages of the study, and whose stimulating ideas, expertise, and suggestions have inspired me greatly through my growth as an academic researcher. A special word of thanks goes to other teachers of the Faculty of English at Hanoi Open University for their ideas, support, encouragement and help in supplying materials and their valuable suggestion for me to have this thesis accomplished. Thanks for encouraging of the students in Group of English language courses K2 to help me overcome difficulties to complete this thesis. Last but not least, I am greatly indebted to my family for the sacrifice they have devoted to the fulfillment of this academic work. This thesis cannot avoid limitation, so I wish to receive comments and opinions to make it better. Contents 1, Outline 3 2, Scientific notice 5 3, Article 6 4, Scientific report 10 5, Assignment 23 How to use body-language for second year major English students at Hanoi Open University effectively TABLE OF CONTENTS | | ...

Words: 9683 - Pages: 39

Premium Essay

Negotiation

...which serve their mutual interests. Negotiation is usually regarded as a form of alternative dispute resolution. The first step in negotiation is to determine whether the situation is in fact a negotiation. The essential qualities of negotiation are: the existence of two parties who share an important objective but have some significant difference(s). The purpose of the negotiating conference to seek to compromise the difference(s). The outcome of the negotiating conference may be a compromise satisfactory to both sides, a standoff (failure to reach a satisfactory compromise) or a standoff with an agreement to try again at a later time. Negotiation is something that we do all the time and is not only used for business purposes. For example, we use it in our social lives perhaps for deciding a time to meet, or where to go on a rainy day. Negotiation is usually considered as a compromise to settle an argument or issue to benefit ourselves as much as possible. Communication is always the link that will be used to negotiate the issue/argument whether it is face-to-face, on the telephone or in writing. Remember, negotiation is not always between two people: it can involve several members from two parties. There are many reasons...

Words: 9743 - Pages: 39

Premium Essay

Business

...IIBM Institute of Business Management Business Communication www.iibmindia.in SYLLABUS Business Communication S. No. Description 1 Communication in Business Organizations: Introduction; Meaning of Business Communication; Types of Information Exchanged in Business Organizations; Role of Communication in Business Organizations; Importance of Communication in Management of Business Organizations; Scope of Communication in Organizational Setting; Characteristics of Effective Business Communication; Ethical challenges and Traps in Business Communication; Role of Communication in Three Managerial Roles Defined by Henry Mintzberg 2 Nature, Scope and Process of Communication: Introduction; Defining Communication; Nature of Communication; Objectives/Purpose of Communication; Functions of Communication; Process of Communication; Elements of Communication Process; Process of Communication: Models; Thill and Bovee‘s Model of Communication Process; Working of the Process of Communication; Forms of Communication; On the Basis of Expression/Medium Used; On the Basis of Organisational Structure; On the Basis of the Number of Persons 2.13 (receivers); On the Basis of Direction/Flow of Communication 3 Channels and Networks of Communication: Introduction; Channels of Communication; Communication Flow in Organizations: Directions/Dimensions of Communication; The Concept of Ombudsperson; Patterns of Flow of Communication or Networks; Factors Influencing...

Words: 152539 - Pages: 611

Premium Essay

Canterbury

...member of the pilgrimage, who is not described. The other pilgrims narrate most of the tales. POINT OF VIEW · In the General Prologue, the narrator speaks in the first person, describing each of the pilgrims as they appeared to him. Though narrated by different pilgrims, each of the tales is told from an omniscient third-person point of view, providing the reader with the thoughts as well as actions of the characters. TONE · The Canterbury Tales incorporates an impressive range of attitudes toward life and literature. The tales are by turns satirical, elevated, pious, earthy, bawdy, and comical. The reader should not accept the naïve narrator’s point of view as Chaucer’s. TENSE · Past SETTING (TIME) · The late fourteenth century, after 1381 SETTING (PLACE) · The Tabard Inn; the road to Canterbury PROTAGONISTS · Each individual tale has protagonists, but Chaucer’s plan is to make none of his storytellers superior to others; it is an equal company. In the Knight’s Tale, the protagonists are Palamon and Arcite; in the Miller’s Tale, Nicholas and Alisoun; in the Wife of Bath’s Tale, the errant knight and the loathsome hag; in the Nun’s Priest’s Tale, the rooster Chanticleer. MAJOR CONFLICT · The struggles between characters, manifested in the links between tales, mostly involve clashes between social classes, differing tastes, and competing professions....

Words: 25904 - Pages: 104

Free Essay

Business Organization

...Computer Organization and Design The Hardware/Software Interface F I F T H E D I T I O N David A. Patterson University of California, Berkeley John L. Hennessy Stanford University With contributions by Perry Alexander The University of Kansas Peter J. Ashenden Ashenden Designs Pty Ltd Jason D. Bakos University of South Carolina Javier Bruguera Universidade de Santiago de Compostela Jichuan Chang Hewlett-Packard Matthew Farrens University of California, Davis David Kaeli Northeastern University Nicole Kaiyan University of Adelaide David Kirk NVIDIA James R. Larus School of Computer and Communications Science at EPFL Jacob Leverich Hewlett-Packard Kevin Lim Hewlett-Packard John Nickolls NVIDIA John Oliver Cal Poly, San Luis Obispo Milos Prvulovic Georgia Tech Partha Ranganathan Hewlett-Packard Table of Contents Cover image Title page In Praise of Computer Organization and Design: The Hardware/Software Interface, Fifth Edition Front-matter Copyright Dedication Acknowledgments Preface About This Book About the Other Book Changes for the Fifth Edition Changes for the Fifth Edition Concluding Remarks Acknowledgments for the Fifth Edition 1. Computer Abstractions and Technology 1.1 Introduction 1.2 Eight Great Ideas in Computer Architecture 1.3 Below Your Program 1.4 Under the Covers 1.5 Technologies for Building Processors and Memory 1.6 Performance 1.7 The Power Wall 1.8 The Sea Change: The Switch from Uniprocessors to Multiprocessors 1.9 Real Stuff: Benchmarking...

Words: 79060 - Pages: 317

Free Essay

Bsr 64k Command Reference Guide

...BSR 64000 Command Reference Guide Compass ID: 271820115 Version 3 Release 5.0.0 Notice Copyright © 2008 Motorola, Inc. All rights reserved No part of this publication my be reproduced in any form or by any means or used to make any derivative work (such as translation, transformation or adaptation) without written permission from Motorola, Inc. Motorola reserves the right to revise this publication and to make changes in content from time to time without obligation on the part of Motorola to provide notification of such revision or change. Motorola provides this guide without warranty of any kind, either implied or expressed, including, but not limited to, the implied warranties of merchantability and fitness for a particular purpose. Motorola may make improvements or changes in the product(s) described in this manual at any time. Motorola and the stylized M logo are registered trademarks of Motorola, Inc. Broadband Services Router, BSR, BSR 64000, RiverDelta, and SmartFlow are trademarks of Motorola, Inc. All other trademarks and registered trademarks are the property of their respective owners. Caring for the Environment by Recycling When you see this symbol on a Motorola product, do not dispose of the product with residential or commercial waste. Recycling your Motorola Equipment Please do not dispose of this product with your residential or commercial waste. Some countries or regions, such as the European Union, have set up systems to collect and recycle electrical...

Words: 97484 - Pages: 390

Premium Essay

Business Communication

...The reasons why people make unethical decisions include 4) 1) taking the easy way out. 2) doing whatever it takes to win. 3) rationalizing one's choices. 4) A, B, and C 5) B and C only View Feedback Question 4 0.1 / 0.1 points Which of the following statements comparing oral and written communication is least accurate? 1) Written communication is preferred when a permanent record is needed. Written messages are generally more organized and well-considered than oral messages. One advantage of oral communication such as a face-to-face meeting is that it 3) allows for immediate feedback. 2) 4) Oral communication is preferred when presenting formal or complex ideas. View Feedback Question 5 0.1 / 0.1 points Which of the following is an example of horizontal communication in an organization? 1) Four payroll clerks meet to discuss a new payroll processing procedure. 2) A supervisor submits a progress report about a current project to the vice president. 3) An employee suggests a way to improve customer service A supervisor sends an e-mail message to all division employees detailing the newest procedure for submitting expense account reports. View Feedback 4) Question 6 0.1 / 0.1 points Which of the following are means of...

Words: 18885 - Pages: 76

Premium Essay

Talking with an Older Person

...A CLINICIAN’S HANDBOOK Talking With Your Older Patient NAT I O NA L INS TITU TE O N AGING NATIONAL I NS TI TUTES OF HEA LTH DEPARTM EN T OF HEA LTH A ND HUMA N S ERV I CES Contents Foreword 1 1. Considering Health Care Perceptions “I’m 30 . . . until I look in the mirror.” 3 2. Understanding Older Patients “Tell me more about how you spend your days.” 6 3. Obtaining the Medical History “What brings you here today?” 13 4. Encouraging Wellness “I’d like you to try this exercise routine.” 19 5. Talking About Sensitive Subjects “Many people your age experience similar problems.” 23 6. Supporting Patients With Chronic Conditions “Let’s discuss living with . . .” 36 7. Breaking Bad News “I wish I had better news.” 40 8. Working With Diverse Older Patients “Cultural differences, not divides.” 44 9. Including Families and Caregivers “What would you like your family to know?” 48 10. Talking With Patients About Cognitive Problems “You mentioned having trouble with your memory.” 51 11. Keeping the Door Open “Effective Communication” 58 Publications At-a-Glance 60 Services At-a-Glance Tear-Off Card Foreword Good communication is an important part of the healing process. Studies find that effective physician-patient communication has specific benefits: patients are more likely to adhere to treatment and have better outcomes, they express greater satisfaction with their treatment, and they are less likely to bring malpractice suits. Research also shows that...

Words: 16913 - Pages: 68