Posts

File Structure

  File A file is a named collection of related information that is recorded on secondary storage such as magnetic disks, magnetic tapes and optical disks. In general, a file is a sequence of bits, bytes, lines or records whose meaning is defined by the files creator and user. File Structure A File Structure should be according to a required format that the operating system can understand. A file has a certain defined structure according to its type. A text file is a sequence of characters organized into lines. A source file is a sequence of procedures and functions. An object file is a sequence of bytes organized into blocks that are understandable by the machine. When operating system defines different file structures, it also contains the code to support these file structure. Unix, MS-DOS support minimum number of file structure. File Type File type refers to the ability of the operating system to distinguish different types of file such as text files source files and binary files et

Disk Scheduling Algorithms

  As we know, a process needs two type of time, CPU time and IO time. For I/O, it requests the Operating system to access the disk. However, the operating system must be fare enough to satisfy each request and at the same time, operating system must maintain the efficiency and speed of process execution. The technique that operating system uses to determine the request which is to be satisfied next is called disk scheduling. Seek Time Seek time is the time taken in locating the disk arm to a specified track where the read/write request will be satisfied. Rotational Latency It is the time taken by the desired sector to rotate itself to the position from where it can access the R/W heads. Transfer Time It is the time taken to transfer the data. Disk Access Time Disk access time is given as, Disk Access Time = Rotational Latency + Seek Time + Transfer Time Disk Response Time It is the average of time spent by each request waiting for the IO operation. Purpose of Disk Scheduling The main p

General Register Organization

  A set of flip-flops forms a register. A register is a unique high-speed storage area in the CPU. They include combinational circuits that implement data processing. The information is always defined in a register before processing. The registers speed up the implementation of programs. Registers implement two important functions in the CPU operation are as follows − It can support a temporary storage location for data. This supports the directly implementing programs to have fast access to the data if required. It can save the status of the CPU and data about the directly implementing program. Example  − Address of the next program instruction, signals get from the external devices and error messages, and including different data is saved in the registers. The CPU bus system is managed by the control unit. The control unit explicit the data flow through the ALU by choosing the function of the ALU and components of the system. Consider R1 ← R2 + R3, the following are the functions imp

Types of Addressing modes

Image
  Implied / Implicit Addressing Mode Stack Addressing Mode Immediate Addressing Mode Direct Addressing Mode Indirect Addressing Mode Register Direct Addressing Mode Register Indirect Addressing Mode Relative Addressing Mode Indexed Addressing Mode Base Register Addressing Mode Auto-Increment Addressing Mode Auto-Decrement Addressing Mode 1. Implied Addressing Mode-   In this addressing mode, The definition of the instruction itself specify the operands implicitly. It is also called as  implicit addressing mode .   Examples-   The instruction “Complement Accumulator” is an implied mode instruction. In a stack organized computer, Zero Address Instructions are implied mode instructions. (since operands are always implied to be present on the top of the stack)   2. Stack Addressing Mode-   In this addressing mode, The operand is contained at the top of the stack.   Example-   ADD This instruction simply pops out two symbols contained at the top of the stack. The addition of those two opera