0% found this document useful (0 votes)
38 views6 pages

1.2.1-Operating-Systems - Interput Handling

The document outlines key concepts related to operating systems, specifically focusing on interrupts and their role within the fetch-decode-execute cycle. It describes the types of interrupts, their priorities, and the necessity of servicing them to maintain system integrity and efficiency. Additionally, it includes instructions for further study and review of related materials.

Uploaded by

dariusbuciuta476
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
38 views6 pages

1.2.1-Operating-Systems - Interput Handling

The document outlines key concepts related to operating systems, specifically focusing on interrupts and their role within the fetch-decode-execute cycle. It describes the types of interrupts, their priorities, and the necessity of servicing them to maintain system integrity and efficiency. Additionally, it includes instructions for further study and review of related materials.

Uploaded by

dariusbuciuta476
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

A-LEVEL COMPUTER SCIENCE – YEAR 1

1.2.1 Operating Systems


• SECTION E - DISTRIBUTED, EMBEDDED, MULTI-TASKING, MULTI-USER AND REAL TIME OPERATING SYSTEMS
• SECTION A – THE NEED FOR, FUNCTION AND PURPOSE OF OPERATING SYSTEMS
• SECTION F - BIOS
• SECTION B – MEMORY MANAGEMENT (PAGING, SEGMENTATION AND VIRTUAL MEMORY).
• SECTION G – DEVICE DRIVERS
• SECTION C – INTERRUPTS, THE ROLE OF INTERRUPTS AND INTERRUPT SERVICE ROUTINES (ISR),
• SECTION H - VIRTUAL MACHINES, ANY INSTANCE WHERE SOFTWARE IS USED TO TAKE ON THE FUNCTION OF A MACHINE,
ROLE WITHIN THE FETCH DECODE EXECUTE CYCLE.

INCLUDING EXECUTING INTERMEDIATE CODE OR RUNNING AN OPERATING SYSTEM WITHIN ANOTHER.


• SECTION D – SCHEDULING: ROUND ROBIN, FIRST COME FIRST SERVED, MULTI-LEVEL FEEDBACK

QUEUES, SHORTEST JOB FIRST AND SHORTEST REMAINING TIME.


Interrupts
SECTION C – INTERRUPTS, THE ROLE OF INTERRUPTS AND INTERRUPT SERVICE ROUTINES (ISR), ROLE WITHIN THE FETCH DECODE EXECUTE CYCLE.

What is an interrupt?

• Messages sent to the processor to get it to stop what it is doing.


• When it receives an interrupt signal, it will halt the FDE cycle and not load the next process instruction. It will
deal with the emergency action indicated by the interrupt vector.
• This is necessary because integrity or efficiency of the running processes may be affected e.g. a
hard-disk failure may mean that all current processes need to be stopped because data written to
and read from the disk may be corrupt.
• Interrupts obtain processor time for higher priority tasks
• Tasks that are more important than the ones currently being processed
• Interrupts avoid delays in high priority task being dealt with (such as future corruption of files)
• Interrupts avoid data loss (if the interrupt is not attended to, the system is likely to crash)
• Interrupts are an indicator to the processor that a device or process needs to be serviced
Interrupts
SECTION C – INTERRUPTS, THE ROLE OF INTERRUPTS AND INTERRUPT SERVICE ROUTINES (ISR), ROLE WITHIN THE FETCH DECODE EXECUTE CYCLE.

Types of interrupt

• There are four types of interrupt.


• Each interrupt has a priority status indicating how critical it is

Priorities: Highest to Lowest

• Power interrupt: e.g. sudden loss of power detected

• Program interrupt e.g. arithmetic overflow (not enough space to hold the result of a
calculation)

• Clock interrupt: the allocated time for a process is finished

• I/O interrupt: e.g. printer is out of paper


Interrupts
SECTION C – INTERRUPTS, THE ROLE OF INTERRUPTS AND INTERRUPT SERVICE ROUTINES (ISR), ROLE WITHIN THE FETCH DECODE EXECUTE CYCLE.

Types of interrupt

1. Power interrupt: A. For example violation of memory use (a program trying to


use part of the memory reserved by the OS for other use) or
2. Program interrupt:
an attempt to execute an invalid instruction (such as division
3. Clock interrupt: by zero).
4. I/O interrupt:
Order of priority

B. Generated when the processor must attend to time critical


activities, e.g. A change of job by the scheduling system

C. For example, power failure which indicates to the OS that it


must shut down as safely as possible to avoid data loss

Match the description to the example. D. For example to signal a job is complete or an input is
required, e.g. printer out of paper, keyboard having a key
pressed.
Interrupts
SECTION C – INTERRUPTS, THE ROLE OF INTERRUPTS AND INTERRUPT SERVICE ROUTINES (ISR), ROLE WITHIN THE FETCH DECODE EXECUTE CYCLE.

Role of an interrupt within the FDE cycle


Start • This system is fine as long as no interrupts are
announced
This is know as the ISR
(Interrupt Service • How exactly does an interrupt affect the FDE cycle?
Fetch Instr. Routine)
No Interrupt • After current instruction has been executed the
status register is checked
Decode Status Reg.
• If the SR indicates an interrupt, the contents of
Instr. the current process are save into the Process
Yes Interrupt Control Block
• Interrupt is serviced in accordance with its
Execute PCB priority against the current task
Instr. Service • The service register is then checked again for
interrupt multiple interrupts. If there are more, the process
repeats until no interrupts require servicing
More Instr.?
• If no more interrupts require servicing, the
No contents are retrieved from the PCB and the
cycle is resumed
End • If there is no interrupt the cycle is resumed

LIFO stack is used to store contents in the PCB


Questions
SECTION C – INTERRUPTS, THE ROLE OF INTERRUPTS AND INTERRUPT SERVICE ROUTINES (ISR), ROLE WITHIN THE FETCH DECODE EXECUTE CYCLE.

Complete Section C on the worksheet 1.2.1 – Operating Systems

Extra:
• Read through page 20 of Revision Guide
• Answer questions 4 and 5

• Read through 1.2.2 – Revision Checklist: Section C and ensure you are
able to check off each point.
• Make a note of any areas you feel you need to work on

You might also like