Sunday, 5 July 2015

Operating System : PARTS OF OPERATING SYSTEM



PARTS OF OPERATING SYSTEM

Process Management
A process is an executing program. It has its code, data, a certain set of resources allowed to it, and one or more flows of execution through the code.
The OS manages the allocation of resources to these processes, and also provides system calls to manage these processes.

Memory Management
Memory must be shared between the OS and an application program.
The OS must manage the allocation of memory to processes and control the memory management hardware that determines which memory locations a process may access.

File System Management
Computers process information that must be transmitted, processed, or stored.
File systems are an abstract organized collection of file system objects.
The OS provides primitives to manipulate these objects

Device Management
Information is sent through a computer’s input and output devices.
Processes access these devices using the system call interface.
The OS tries to manage said devices in a manner that makes them efficiently shared among all processes requiring them.
A system call is a programming interface to the services provided by the OS, typically written in C/C++

Evolution of an Operating System

Hardware upgrades plus new types of hardware
New services & Tools
Fixes: Any OS has faults. These are discovered over the course of time and fixes are made.





•Reference :
•Stallings, William, Operating Systems, Second Edition, Prentice-Hall International Editions,
Englewood Cliffs, New Jersey, 1995.
•Tanenbaum, Andrew S., Modern Operating Systems, Prentice-Hall International Editions,
Englewood Cliffs, New Jersey, 1992.


Thank You ,  See You Again..



Saturday, 4 July 2015

Operating System : How Operating System Work ?



Role of Interrupts
Interrupts are signals sent to the CPU by external devices, normally I/O devices. They tell the CPU to stop its current activities and execute the appropriate part of the operating system.
1.Hardware Interupts are generated by hardware devices to signal that they need some attention from the OS.
2.Software Interupts are generated by programs when they want to request a system call to be performed by the operating system.
3.Traps are generated by the CPU itself to indicate that some error or condition occured for which assistance from the operating system is needed.

CPU Execution Mode
There are two modes of execution,known as user mode and kernel or supervisor mode.
User mode is restricted in thatcertain instructions cannot be executed, certain registers cannot be accessed, and I/O devices can not be accessed.
Kernel mode has none of these restrictions. A system call will set the CPU to kernel mode, as will traps and interrupts. Application programs cannot do this.

Supervisor mode
»Can execute all machine instructions
»Can reference all memory locations

User mode
»Can only execute a subset of instructions
»Can only reference a subset of memory locations

CPU Response to Interrupts
The CPU performs the following actions in response to an interrupt:
Using the pointer to the current process control block, the state and all register values for the process are saved for use when the process is later restarted.
The CPU mode bit is switched to supervisory mode.
Using the pointer to the interrupt handler table and the interrupt vector, the location of the kernel code to execute is determined. The interrupt vector is the IRQ for hardware interrupts 


 




 






•Reference :
•Stallings, William, Operating Systems, Second Edition, Prentice-Hall International Editions, Englewood Cliffs, New Jersey, 1995.
•Tanenbaum, Andrew S., Modern Operating Systems, Prentice-Hall International Editions,
Englewood Cliffs, New Jersey, 1992.
 

Thank You




Friday, 3 July 2015

COMPUTER ARCHITECTURE



COMPUTER ARCHITECTURE

The computer is in a sense a communication system.
Data is constantly being moved between the CPU, memory and the various devices.
The CPU uses I/O addresses to direct data to particular devices.
The devices in turn use interrupts to notify the CPU and operating system of their needs.



The Von-Neumann Architecture



CPU Control Unit



Arithmetic Logic Unit



The Von-Neumann Loop

Fetch Phase
Fetch the next instruction and store it in the instruction register
Execute Phase
The ALU or I/O unit executes the instruction ALU does calculations
I/O unit loads or stores data between main memory and registers

 


 
 


•Reference :
•Stallings, William, Operating Systems, Second Edition, Prentice-Hall International Editions,Englewood Cliffs, New Jersey, 1995.
•Tanenbaum, Andrew S., Modern Operating Systems, Prentice-Hall International Editions, Englewood Cliffs, New Jersey, 1992.



Thank You