Lab3 To study and implement multi threading in Java catch Exception e

Lab3 to study and implement multi threading in java

This preview shows page 35 - 47 out of 73 pages.

Lab3 To study and implement multi-threading in Java catch (Exception e) { e.printStackTrace(); } } public static void main(String[] args) { try { ServerSocket ss = new ServerSocket(4000); while(true) { Socket s = ss.accept(); Myrunable st = new Myrunable(s); Thread t = new Thread (st); t.start(); } } catch(Exception ex) { System.out.println(""+ex); } } } OUTPUT: 35
Image of page 35
Lab3 To study and implement multi-threading in Java 36
Image of page 36
Lab 4 To study and execute basic Linux commands on a terminal Lab 4 To study and execute basic Linux commands on a terminal Linux is a Unix-like and mostly POSIX-compliant computer operating system (OS) assembled under the model of free and open-source software development and distribution. In this lab, we will work on Ubuntu, one of the flavors of Linux. For this purpose, we will use virtualization environment. Lab Tasks: 1. Using ls command find out the contents of current directory. 2. What are the permissions for normal user, group and world for each file. 3. Find out the name of current working directory. 37
Image of page 37
Lab 4 To study and execute basic Linux commands on a terminal 4. Create a new folder named “lab os” using the mkdir command. 5. Switch to the directory “lab os”. 38
Image of page 38
Lab 4 To study and execute basic Linux commands on a terminal 6. Create a file in the directory named “lab4.txt” using touch command. 39
Image of page 39
Lab 4 To study and execute basic Linux commands on a terminal 7. List down the contents of file using cat command. Try using “more” and “less” option 8. Find out the space consumed by directory using “du” command 40
Image of page 40
Lab 4 To study and execute basic Linux commands on a terminal 9. Copy the file to parent directory using cp command 10. Remove the file using rm command 11. Remove the directory using rmdir command 41
Image of page 41
Lab 4 To study and execute basic Linux commands on a terminal 12. Check the free space on disk using df command 13. Change the password of the user using passwd command 14. Switch to super user, using the command “su” 42
Image of page 42
Lab 4 To study and execute basic Linux commands on a terminal 15. Using the history command, list down the commands run on the terminal window 43
Image of page 43
Lab 4 To study and execute basic Linux commands on a terminal 44
Image of page 44
Lab 5 To study and execute system administration commands on a terminal Lab 5 To study and execute system administration commands on a terminal Instructions: Linux comprises a set of commands for basic system administration. In this lab, we will study these commands. Lab Tasks: 1. Using the ‘uptime' command, since how long your system is running and the number of users that are currently logged in. 2. Using the ‘w’, display the users currently logged in and their process along-with load averages 45
Image of page 45
Lab 5 To study and execute system administration commands on a terminal 3. Using the ‘users’ command, display the currently logged in users. 4. Using the ‘top’ command, display processor activity of your system and also displays tasks managed by kernel in real-time.
Image of page 46
Image of page 47

You've reached the end of your free preview.

Want to read all 73 pages?

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern

Stuck? We have tutors online 24/7 who can help you get unstuck.
A+ icon
Ask Expert Tutors You can ask You can ask You can ask (will expire )
Answers in as fast as 15 minutes
A+ icon
Ask Expert Tutors