Thursday, January 9, 2014

Operating System: Hardware and Software.

Operating System: Hardware and Software.


Stack current process process last previous process WP.EXE 640k barrier command.com WP.EXE CPU Bios

1 - When you type the name of an application program on the command line DOS, COMMAND.COM makes a request to
BIOS to get the path of this program and copy it from disk to RAM, from the first available address. If
an extensive program, it can override the actual COMMAND.COM.


Bios command.com WP.EXE 33 CPU interrupt service 5 interrupt controller

2 - Through the app, you send a command to the document to be printed. The program generates an interrupt one
special code that calls for immediate attention of the operating system. The value of the interrupt tells the operating system
which service is being requested. In the case of printing a character, the switching has two layers may be because
used to request various services. The interruption itself has the number 33 and the service used to send a single character
the printer, the number 5.

3 - The interrupt signal is intercepted by chip interrupt controller (interrupt controller), a special chip in
computer, whose sole function is to take care of these signals.

4 - The chip interrupt controller notifies the processor that an interrupt occurred and needs attention
shown.

5 - As the processor needs to keep the information that was running before the occurrence of the interruption, he puts
the address of the operation performed by the application program in a stack (stack). Stack is a special area of ​​memory which
stores the addresses, operating similarly to a stack of dishes in a restaurant. When placed a new dish,
This pushes down the stack and must be removed before any plate underneath it can be recovered.

6 - The processor fetches the part of RAM used to manage the interrupt vector address associated memory
the interrupt (interrupt) 33, service (service) 5.0 interrupt vector that indicates a memory address occupied by BIOS
ROM PC.

Note - In some PC configurations, a spooler is used to speed up printing. In this case, when the spooler
loaded, the interrupt vector for the 33, 5 service, may be changed to indicate the routine in RAM used by
spooler. The routine instructs the processor to send the character to the buffer area in extended memory, which will wait until
the spooler own routines send the character to the printer.


Stack last previous process process process command.com previous bios cpu

7 - The routine ends and the BIOS sends a character - a byte of data - via the parallel printer port.

8 - If, for some reason, the printer can not receive data - for lack of paper or being occupied with sending
characters typed before - it emits an error signal to the PC. The BIOS recognizes the error and try to fix this
situation without interfering with the application. The error recovery in this case is an attempt to resend the one character
certain number of times. If the attempt fails, the BIOS generates its own interrupt, which triggers a series of
similar operations that end with the processor running a routine loaded into RAM by the application. This routine displays
an error message on the screen.

9 - If the BIOS routine completes successfully, the BIOS generates an interrupt return (interrupt return) instruction or
IRET, which prompts the processor to retrieve the top address of the stack.

10 - The processor diverts execution to the address obtained from the stack. The address is the location of the program routine that
computer was running when the interrupt occurred 33. By shifting to this address, the processor resumes
execution at the point where it was interrupted.

11 - If the application program, when run, outweighs the COMMAND.COM file, the operating system retrieves the
file from disk to RAM when the program ends.


Source: Evolution of Computers

No comments:

Post a Comment