private void startSlave() {
		Listener t = new Listener(port, this);
		t.start();
		System.out.println("Connecting to server " + masterAddr + "...");
		try {
			String[] str = masterAddr.split(":");
			sendTo("connect " + InetAddress.getLocalHost().getHostName() + " "
					+ t.serverSocket.getLocalPort(), str[0],
					Integer.parseInt(str[1]));
		} catch (UnknownHostException e2) {
			System.exit(-1);
		}
		while (true) {
			try {
				Thread.sleep(10);
			} catch (InterruptedException e1) {
				System.out.println("Thread sleep interrupted");
			}

			// Concurrent issues not solved
			for (Integer processID : slaveThread.keySet()) {
				Thread thread = slaveThread.get(processID);
				try {
					thread.join(10);
				} catch (InterruptedException e) {
					System.out.println("Thread join interrupted");
				}
				if (!thread.isAlive()) {
					System.out.println("thread dies");
					processList.remove((Integer) processID);
					processWorker.remove((Integer) processID);
					activeProcess.remove((Integer) processID);
					String[] str = masterAddr.split(":");
					sendTo("die " + processID, str[0], Integer.parseInt(str[1]));
					slaveThread.remove(processID);
				}
			}
		}
	}