Sunday, May 25, 2014

JVM

At the heart of the Java platform lies the Java Virtual Machine, or JVM. Most programming languages compile source code directly into machine code, suitable for execution on a particular microprocessor architecture. The difference with Java is that it uses bytecode - a special type of machine code. 
Java bytecode executes on a special type of microprocessor. Strangely enough, there wasn't a hardware implementation of this microprocessor available when Java was first released. Instead, the processor architecture is emulated by what is known as a "virtual machine". This virtual machine is an emulation of a real Java processor - a machine within a machine (Figure One). The only difference is that the virtual machine isn't running on a CPU - it is being emulated on the CPU of the host machine.

Figure One - JVM emulation run on a physical CPU
The Java Virtual Machine is responsible for interpreting Java bytecode, and translating this into actions or operating system calls. For example, a request to establish a socket connection to a remote machine will involve an operating system call. Different operating systems handle sockets in different ways - but the programmer doesn't need to worry about such details.  It is the responsibility of the JVM to handle these translations, so that the operating system and CPU architecture on which Java software is running is completely irrelevant to the developer.

Figure Two - JVM handles translations
The Java Virtual Machine forms part of a large system, the Java Runtime Environment (JRE). Each operating system and CPU architecture requires a different JRE. The JRE comprises a set of base classes, which are an implementation of the base Java API, as well as a JVM. The portability of Java comes from implementations on a variety of CPUs and architectures. Without an available JRE for a given environment, it is impossible to run Java software.

Differences between JVM implementations

Though implementations of Java Virtual Machines are designed to be compatible, no two JVMs are exactly alike. For example, garbage collection algorithms vary between one JVM and another, so it becomes impossible to know exactly when memory will be reclaimed. The thread scheduling algorithms are different between one JVM and another (based in part on the underlying operating system), so that it is impossible to accurately predict when one thread will be executed over another.
Initially, this is a cause for concern from programmers new to the Java language. However, it actually has very little practical bearing on Java development. Such predictions are often dangerous to make, as thread scheduling and memory usage will vary between different hardware environments anyway. The power of Java comes from not being specific about the operating system and CPU architecture - to do so reduces the portability of software.

Summary

The Java Virtual Machine provides a platform-independent way of executing code, by abstracting the differences between operating systems and CPU architectures. Java Runtime Environments are available for a wide variety of hardware and software combinations, making Java a very portable language. Programmers can concentrate on writing software, without having to be concerned with how or where it will run. The idea of virtual machines is nothing new, but Java is the most widely used virtual machine used today. Thanks to the JVM, the dream of Write Once-Run Anywhere (WORA) software has become a reality.

Compiler

A compiler is a computer program (or set of programs) that transforms source code written in a programming language (the source language) into another computer language (the target language, often having a binary form known as object code). The most common reason for wanting to transform source code is to create an executable program.

The name "compiler" is primarily used for programs that translate source code from a high-level programming language to a lower level language (e.g., assembly language or machine code).

 If the compiled program can run on a computer whose CPU or operating system is different from the one on which the compiler runs, the compiler is known as a cross-compiler.

 A program that translates from a low level language to a higher level one is a decompiler.

 A program that translates between high-level languages is usually called a language translator, source to source translator, or language converter.

 A language rewriter is usually a program that translates the form of expressions without a change of language.

Wednesday, April 16, 2014

CSV files

Comma-separated values

.CSV files are the common files used in databse management.Interesting thing is ,these types of files can be handleled in many programming lanugges and many databases use this fiile to implement data.

A comma-separated values (CSV) (also sometimes called character-separated values, because the separator character does not have to be a comma) file stores tabular data (numbers and text) in plain-text form. Plain text means that the file is a sequence of characters, with no data that has to be interpreted instead, as binary numbers. A CSV file consists of any number of records, separated by line breaks of some kind; each record consists of fields, separated by some other character or string, most commonly a literal comma or tab. Usually, all records have an identical sequence of fields

Sunday, March 16, 2014

Fragmentation

Fragmentation, in the context of a hard disk, is a condition in which the contents of a single file are stored in different locations on the disk rather than in a contiguous space. This results in inefficient use of storage space as well as occasional performance degradation. Users frequently create, modify, delete and save files. Back-end operating systems (OS) continuously store these files on hard drives, which inevitably creates scattered files. When fragmentation occurs, the OS needs to consolidate stored files to enhance processing efficiency.

Metadata

 Metadata is "data about data".

That is the metadata can be used to identify the information about the data file whetre it is image, webpage , song or any other file system.


Metadata (metacontent) are defined as the data providing information about one or more aspects of the data, such as:

    Means of creation of the data
    Purpose of the data
    Time and date of creation
    Creator or author of the data
    Location on a computer network where the data were created
    Standards used

Network operating system

Abbreviated as NOS, an operating system that includes special functions for connecting computers and devices into a local-area network (LAN). Some operating systems, such as UNIX and the Mac OS, have networking functions built in. The term network operating system, however, is generally reserved for software that enhances a basic operating system by adding networking features. Novell Netware, Artisoft's LANtastic, Microsoft Windows Server, and Windows NT are examples of an NOS.

Operating System

While living in the today tech world we are more acquainted with the word OS - operating system. But when we asked about it? we simply
say it is windows , Linux , UNIX , MAC os or android.
Operating System is a collection of software programs that manages hardware resources and provides an application interface towards user to interact with system.
The components of an operating system:--------

  1. Kernel
  2. Modes
  3. Program execution
  4. Interrupts
  5. Modes
  6. Memory management
  7. Virtual memory
  8. Multitasking
  9. Disk access and file systems
  10. Device drivers
  11. Networking
  12. Security
  13. User interface



 

 

 

 

 

 

 

Monday, March 10, 2014

Access control list (ACL)

An access control list (ACL), with respect to a computer file system, is a list of permissions attached to an object. An ACL specifies which users or system processes are granted access to objects, as well as what operations are allowed on given objects. Each entry in a typical ACL specifies a subject and an operation. For instance, if a file has an ACL that contains (Alice, delete), this would give Alice permission to delete the file.

RAID

RAID (Redundant array of independent Disks)

>>>allows information to access several disks.

RAID uses techniques such as disk striping (RAID Level 0), disk mirroring (RAID Level 1), and disk striping with parity (RAID Level 5) to achieve redundancy, lower latency, increased bandwidth, and maximized ability to recover from hard disk crashes.
RAID consistently distributes data across each drive in the array. RAID then breaks down the data into consistently-sized chunks (commonly 32K or 64k, although other values are acceptable). Each chunk is then written to a hard drive in the RAID array according to the RAID level employed. When the data is read, the process is reversed, giving the illusion that the multiple drives in the array are actually one large drive.

Who Should Use RAID?

System Administrators and others who manage large amounts of data would benefit from using RAID technology. Primary reasons to deploy RAID include:
  • Enhances speed
  • Increases storage capacity using a single virtual disk
  • Minimizes disk failure

Wednesday, January 8, 2014

Computer Cluster

Computer cluster is a set of loosely or tightly connected computers which works together and can be viewed as a single system.

They all are connected together with LAN , each computer working as a node.
Due to availability of high speed networks and low cost microprocessors it became possible to design such a system.Clusters are usually deployed to improve performance and availability over that of a single computer, while typically being much more cost-effective than single computers of comparable speed or availability.
The activities of the computing nodes are planned by "clustering middleware", a software layer that sits atop the nodes and allows the users to treat the cluster as by and large one cohesive computing unit.

Alike from peer to peer approach where computers are connected projects only a distributed approach but this clustering system just project a centralized approach.

Round Robin Algorithm

The Operating system can process a job in many ways , based on time , priority or first come first serve . But instead of all these we can go to another scheduling algorithm known as Round Robin Algorithm.

In this case
  • Each process is provided a fix time to execute called quantum.
  • Once a process is executed for given time period. Process is preempted and other process executes for given time period.
  • Context switching is used to save states of preempted processes.