Thursday, July 31, 2014


There may be different kind of errors rise up due to several reasons.
  •    Improper synchronization:  When processor request I/O resources for data most of times processor have to wait until I/O resources available in buffer. Some data may be lost or duplicate if the signaling mechanism not work well.
  •   Failed mutual exclusion: This happen when more than one user tries to use shared resources. As an example If one program try to write “Hello world” to a file. Same time another program tries to write “Operating system”. After the execution of program, output seems like “HeOerallot ing wosysterld”. Operating system should control the access of I/O resources to prevent this error.
  •  Non determinate program operations: This situation happen when multiple programs run in shared memory. If one program use second program memory, the second program memory (may be next instructions or required data) may be change. OS should control memory access to prevent this error.
  •   Deadlocks: Two or more program waiting for response of each other. Both programs not execute next instruction. Program stuck in cycle and not flows forward.

Process
Process contain three components
  •       Executable program
  •       Associated data
  •       Execution context of the program(process state): Information that OS need to manage process.



Friday, July 25, 2014


Operating system is one of most popular word in 21st century. Basically operating system provides basic functionality to users to maintain a computer. It provides functions to other application software for access memory, I/O resources, Files etc. Computer hardware and software contain several layers.
Linux, Ubuntu, Widows 8, Mac OS are several from famous OS's.

Mainly OS has 3 objectives.
  • Convenience:  Provide facility to use computer easy.
  • Efficiency: Use computer resource efficiency.
  • Ability to evolve: OS should be able to introduce new functionality without affecting to other services.

Here is the several services provide by OS.

  • Program development: This utility provides tools for create and debug programs.
  • Program execution: Instruction load into main memory, Initialize I/O devices, provide basic functions and control system resource.
  • Access to I/O devices: OS encapsulate I/O resource and provide interface for exchange data with I/O devices. Application software can only request for use I/O resource from OS. OS determine which operation should do.
  • Control access to files: OS provide interface to access files in storage device. OS can provide protection to the file using this interface when multiple users use same storage device.
  • System access: This access functions provide protection to resources and date in shared or public systems.
  • Error detection and response: there many errors can occur while computer is working. Sometimes these little errors are reason for stuck whole computer(eg:- dead lock). Therefore OS should have ability to find errors and then fixed the error or end the program.
  • Accounting: OS should provide ability to work with multiple users at single computer by providing different account for each user.


Earliest computers only contain display light, switches, printers. Program instructions enter to the system by using punch cards.
Early computers have several problems.

  • Scheduling: User can use computers only for multiple of time blocks. When user complete the task before time block, it waste remaining time.
  • Setup time: Users have to spend lots of time to setup  program to run.
  • Expensive: Used expensive materials and equipment. 

            Monitor is a piece of software to use batch-process. User submit job on card or tape sequentially. Monitor load this program and execute. Then it automatically load next program and continue process. It means processor time alternate between executions.
            Monitor first read next job and then pass the control to that job. After complete that job, monitor gets control and continue this cycle again and again until end the all jobs. Job control language (JCL) uses to provide instructions to the monitor.

Computer hardware should provide below facility to functionality of Monitor.
  • Memory protection: when program executing, memory area which contain monitor may be change by other program. Therefore processor hardware should detect this error and print the error and pass control to next program.
  • Timer: timer start at the beginning of the job. When timer expires, program stops and return to monitor.
  • Privileged instructions: program occur error if program use I/O devices directly. If user program need to perform I/O operation, then user program should request from Monitor perform that operation.

  • Interrupt: relinquishing control to and regaining control
There 2 types of process can be happen in processor.
Uni-programming
             When processor is working, processor have to wait until I/O resources reach the processor.
Multiprogramming:
             If processor have to wait until I/O resource, then processor switch to another job.

Time sharing system
This system also works as multiprogramming by share processor time among users. If there are n users using this system, then average 1/n of computer capacity consume by each programs.