Operating system

What is an Operating system?
Operating system is a system software which acts as an Interface between the user and computer. This allocates and controls the use of all system resources like the processor, the main memory and all I/O devices. It also allows multitasking.

What is booting?
Booting is the process of loading the operating system from secondary memory to RAM.

Who carry out the process of booting?
Boot strap loader which is the set of instructions present in ROM as part of BIOS carry out the task of booting.

When user programs runs how the OS get control back to do its work?
It is achieved with the help of Interrupts

Interrupts

Three types of the Interrupts are recognized by the Processors
1)Hardware Interrupts
2)Software Interrupts
3)Trap

Hardware Interrupts

This is any type of h/w event such as Keyboard press, a hard disk reading/writing, receipt of Ethernet packet etc.
Example: When a h/w event such as a key press from the keyboard, the following series of events happen.

  • A h/w interrupt is generated CPU then reads a register to get a pointer to a stack where it will save some of the key register values. This is not the same stack what the user program uses
  • CPU then reads another register to get a pointer to a special table called interrupt descriptor table. It also checks with the interrupted h/w to get a vector for which interrupt has occurred.
  • Then depending on the interrupt occurred and the information of the descriptor table, the CPU process the routine called as Interrupt Service Routine (ISR). Once this routine completes. The interrupted program is resumed as the return address and other registers are stored on the stack.
  • Many operating systems program a clock to issue interrupts at regular intervals so that the OS kernel is guaranteed to get control on a regular basis even if no h/w events occur and a user program never releases the CPU.

Software Interrupt

When a user program needs to make a system call to the operating system, such as I/O or to request more memory, it may issue a special instruction called a s/w interrupt to cause the CPU to switch processing to the kernel. Ex: If your program has printing statement, reading statement etc.

Trap

This is issued by the CPU itself when it detects that something is wrong or needs special attention. Example: When a user program executes an illegal instruction like divide by zero

Re-entrant

Most of the OS kernel code is termed as this, meaning that additional interrupts may be received even while processing a previous interrupt. Interrupts can be turned on or off by issuing special instructions. Interrupts are turned off in critical sections of the kernel when an interrupt causes memory corruption in the kernel. When the interrupts are turned off, they are queued by the hardware and will be issued when interrupts are turned on again.

Bus Structure

If different functional units of a computer are connected in a organized way then only the computer will carry out the task. There are different ways in connecting. When a word of data is transferred between units, all its bits are transferred in parallel, so this requires many number of wires. A collection of lines that connects several devices is called a bus.


Fundamental Computer Architectures << Previous
Next>>Bus Structure Continued


Support us generously: contact@lessons2all.com

Our aim is to provide information to the knowledge seekers. 


comments powered by Disqus






Footer1