public void addtoEnd(Process data1)
        {
            node temp = new node(data1);

            if (tail != null)
            {
                tail.setNext(temp);
                temp.setPrevious(tail);
            }
            tail = temp;
            if (chain == null)
            {
                chain = tail;
            }
        }
        public void add(Process data1)
        {
            node temp = new node(data1);

            temp.setNext(chain);
            if (chain != null)
            {
                chain.setPrevious(temp);
            }
            chain = temp;
            if (tail == null)
            {
                tail = chain;
            }
        }