Showing posts with label BCA III. Show all posts
Showing posts with label BCA III. Show all posts

First-Come-First-Served [FCFS] Scheduling:
    First-Come-First-Served algorithm is the simplest scheduling algorithm is the simplest scheduling algorithm. Processes are dispatched according to their arrival time on the ready queue. Being a no preemptive discipline, once a process has a CPU, it runs to completion. The FCFS scheduling is fair in the formal sense or human sense of fairness but it is unfair in the sense that long jobs make short jobs wait and unimportant jobs make important jobs wait.
    FCFS is more predictable than most of other schemes since it offers time. FCFS scheme is not useful in scheduling interactive users because it cannot guarantee good response time. The code for FCFS scheduling  is simple to write and understand. One of the major draw back of this scheme is that the average time is often quite long.
    The First-Come-First-Served algorithm is rarely used as a master scheme in modern operating systems but it is often embedded within other schemes.

Program to implement First-Come-First-Serve [FCFS] Scheduling:

#include<iostream.h>
#include<dos.h>
#include<conio.h>
void main()
{
    clrscr();
    char p_name[10];    //variable declaration
    int a_time[10],e_time[10],n;    //variable declaration
    cout<<endl<<"Enter the number of processes:";
    cin>>n;
    cout<<endl<<"Enter the names of the processes:";
    for(int i=0;i<n;i++)    //This loop reads the process names
        cin>>p_name[i];
    cout<<endl<<"Enter the process execution times:";
    for(i=0;i<n;i++)    //This loop reads the execution times of the processes
        cin>>e_time[i];
    cout<<endl<<"The processes to be executed in this order in FCFS algorithm:";
    for(i=0;i<n;i++)    //This loop executes the process order
    {
        cout<<endl<<p_name[i];
        sleep(e_time[i]);
        cout<<"\nprocess"<<i+1<<"finished";
    }
    getch();
}

Output:

ROUND ROBIN SCHEDULING:
    Round-robin (RR) is one of the simplest scheduling algorithms for processes in an operating system, which assigns time slices to each process in equal portions and in circular order, handling all processes without priority. Round-robin scheduling is both simple and easy to implement, and starvation-free. Round-robin scheduling can also be applied to other scheduling problems, such as data packet scheduling in computer networks.

PROCESS SCHEDULING:
    Round-robin job scheduling may not be desirable if the sizes of the jobs or tasks are highly variable. A process that produces large jobs would be favoured over other processes. This problem may be solved by time-sharing, i.e. by giving each job a time slot or quantum (its allowance of CPU time), and interrupt the job if it is not completed by then. The job is resumed next time a time slot is assigned to that process.
A Simple CPP program to implement Round Robin Scheduling.




#include<iostream.h>
#include<conio.h>
#include<process.h>
void main()
{
    clrscr();
    int e_time[15],time,n,count=0;    //variable declaration
    char p_name[15];    //variable declaration
    cout<<endl<<"Enter the number of processes:";
    cin>>n;
    cout<<endl<<"Enter the time slice:";
    cin>>time;
    cout<<endl<<"Enter the process names:";
    for(int i=0;i<n;i++)    //This loop reads the process names
        cin>>p_name[i];
    cout<<endl<<"Enter the process execution time:";
    for(i=0;i<n;i++)    //This loop reads the execution time of the process
        cin>>e_time[i];
    if(n<0)
        cout<<endl<<"Invalid input";
    for(i=0;i<n;i++)    //This loop checks whether the given input is valid or not
    {
        if(e_time[i]<0)
        {
            cout<<endl<<"Invalid execution time";
            getch();
            exit(0);
        }
    }
    count=e_time[0];
    for(i=0;i<n;i++)    //The count variable in this loop finds the largest execution time
    {
        if(count<e_time[i])
            count=e_time[i];
    }
    for(i=0;i<count;i=i+time)    //This loop executes the order of the process names
    {
        for(int j=0;j<n;j++)
        {
            if(i<=e_time[j])
            {
                if(e_time[j]!=0 && e_time[j]>0)
                    cout<<p_name[j];
            }
            else if(e_time[j]<=time && e_time[j]>0)
            {
                cout<<p_name[j];
            }
            else if(e_time[j]>time)
            {
                if(e_time[j]!=0 && e_time[j]>0)
                    cout<<p_name[j];
            }
            e_time[j]=e_time[j]-time;
        }
    }
    getch();
}




Monday, August 23, 2010

Firewall by Abhilash

A firewall is a part of a computer system or network that is designed to block unauthorized access while permitting authorized communications. It is a device or set of devices which is configured to permit or deny computer applications based upon a set of rules and other criteria.

Firewalls can be implemented in either hardware or software, or a combination of both. Firewalls are frequently used to prevent unauthorized Internet users from Read It Online.....

A computer network, often simply referred to as a network, is a collection of computers and devices connected by communications channels that facilitates communications among users and allows users to share resources with other users. Networks may be classified according to a wide variety of characteristics. This article provides a general overview of types and categories and also presents the basic components of a network. Download Data communications & networking ppt

Thursday, July 1, 2010

Communication Skills by V.S. Swathi

The ability to communicate is the primary factor that distinguishes human beings from animals. And it is the ability to communicate well that distinguishes one individual from another. 

The fact, is that apart from the basic necessities, one needs to be equipped with habits for good communication skills, as this is what will make them a happy and successful social being. 

In order to develop these habits, one needs to first acknowledge the fact that they need to improve communication skills from time to time. They need to take stock of the way they interact and the direction in which their work and personal relations are going. The only constant in life is change, and the more one accepts one's strengths and works towards dealing with their shortcomings, especially in the area of communication skills, the better will be their interactions and the more their social popularity. Know more Download...


Reasoning is the cognitive process of looking for reasons, beliefs, conclusions, actions or feelings.
Different forms of such reflection on reasoning occur in different fields. In philosophy, the study of reasoning typically focuses on what makes reasoning efficient or inefficient, appropriate or inappropriate, good or bad. Philosophers do this by either examining the form or structure of the reasoning within arguments, or by considering the broader methods used to reach particular goals of reasoning. Psychologists andcognitive scientists, in contrast, tend to study how people reason, which cognitive and neural processes are engaged, how cultural factors affect the inferences people draw. The properties of logic which may be used to reason are studied in mathematical logic. The field ofautomated reasoning studies how reasoning may be modelled computationally. Lawyers also study reasoning. Take a peek Download..



Roman numerals are a numeral system of ancient Rome based on letters of the alphabet, which are combined to signify the sum (or in some cases, the difference) of their values. The first ten Roman numerals are
I, II, III, IV, V, VI, VII, VIII, IX, and X.
The Roman numeral system is decimal but not directly positional and does not include a zero. It is a cousin of the Etruscan numerals, and the letters derive from earlier non-alphabetical symbols; over time the Romans came to identify the symbols with letters of the Latin alphabet. The system was modified slightly during the Middle Ages to produce the system used today.
Roman numerals are commonly used in numbered lists (such as the outline format of an article), clock faces, pages preceding the main body of a book, chord triads in music analysis, dated notices of copyright, months of the year, successive political leaders or children with identical names, and the numbering of annual events.... know more Download...

Friday, June 18, 2010

SPAM by P.Vijaya Lakshmi

SPAM - Download

Remote Desktop & Terminal server  - Download PPT

Wednesday, June 16, 2010

Wireless LAN by B.L.Abilash

Wireless LAN - Download PPT

Computer Networking - Download PPT

Monday, June 14, 2010

Coming Topics by BCA students

Computer Networks by B.Shabhana

Protocols by V.S.Swathi
E-Commerce by R.Vandana
Multimedia Web designing by B.Praveena
SPAM by P.Vijaya Lakshmi
Multimedia by M.Pradeep Kumar
Wireless LAN by B.L.Abilash - Download Available
Computer Networks by G.Uday Kumar - Download Available
Artificial Intelligence by A.Chandana
Touch Screen by K.Rupa
Animation by K.Deepthi
Enterprise Solutions by A.Varalakshmi
JAVA by N.Siri
JAVA Programming Structure by K.Gunasekhar
Remote Desktop & Terminal server by V.Anil Kumar - Download Available