PCC La1

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 8

LAB ASSEMENT 1 (LA1) SOFT-RECORD

CSE3035: PRINCIPLES OF CLOUD COMPUTING


PROGRAMME: B.TECH ; BRANCH: CSE
CLASS NUMBER: VL2023240506627;
SLOT: L59+L60
TIME: 5:40PM TO 7:20PM VENUE: SJT 216

REG NO: 20BDS0265


NAME: SRIRAMACHANDRAN RAMESH

School of Computer Science and Engineering


Assessment: Problem Statement-1
Date:
Configure a VM instance in your local machine and in cloud (by
creating a cloud account). Allocate CPU, memory and storage space as
per a specified requirement. Install Guest OS image in that instance,
launch the same and confirm the successful installation of the OS by
performing few OS commands.
a) updating the packages in OS
b) create a new directory
c) changing the name of the directory
d) show the current working directory
e) list of previously executed commands
f) create a new file with your registration number. Type information
such as Registration number, name, Department, email id, Mobile
number and view the content files

Output Screenshots

Reg. No.: 20BDS0265


Name: Sriramachandran Ramesh
Page: 1
© School of CSE, Vellore Institute of Technology-Vellore CSE3035 PRINCIPLES OF CLOUD
COMPUTING Lab
A)

B)

C)

D)

Reg. No.: 20BDS0265


Name: Sriramachandran Ramesh
Page: 2
© School of CSE, Vellore Institute of Technology-Vellore CSE3035 PRINCIPLES OF CLOUD
COMPUTING Lab
E)

F)

A) sudo apt-get update


B) mkdir <filename>
C) mv <old> <new>
Commands D) ls
E) history
F) cat > “File name” (Enter text and Control+D to save)

1) VM Configuration: Ensure allocated resources match specified


requirements; verify successful VM instance creation on both local machine
and cloud platform.

2) OS Installation: Confirm proper installation of the Guest OS on both local


and cloud-based virtual machines.

3) Command Execution: Execute OS commands successfully, noting any


errors or unexpected behavior during the process.
Observations
4) Directory Operations: Validate the creation, renaming, and navigation of
directories within the OS environment.

5) Command History: Verify the 'history' command displays a list of


previously executed commands, ensuring accurate tracking.

6) File Creation and Viewing: Confirm the creation of the registration_info.txt


file with accurate content and successful viewing of its details

References 1. https://linuxsimply.com/linux-basics/package-management/update-

Reg. No.: 20BDS0265


Name: Sriramachandran Ramesh
Page: 3
© School of CSE, Vellore Institute of Technology-Vellore CSE3035 PRINCIPLES OF CLOUD
COMPUTING Lab
packages/
2. https://www.javatpoint.com/linux-
mkdir#:~:text=The%20mkdir%20stands%20for%20'make,create%20and%
20then%20press%20enter.
3. https://hpc.nmsu.edu/onboarding/linux/commands/mv/
4. https://hpc.nmsu.edu/onboarding/linux/commands/cd/#:~:text=To%20know
%20your%20current%20directory,stands%20for%20Print%20Working%2
0Directory.&text=The%20name%20of%20the%20current,is%20the%20cur
rent%20working%20directory.
5. https://askubuntu.com/questions/624848/view-history-of-commands-run-in-
terminal
6. https://www.redswitches.com/blog/create-a-file-in-
linux/#:~:text=To%20create%20a%20new%20text%20file%20using%20na
no%2C%20you%20can,to%20give%20to%20the%20file.

Reg. No.: 20BDS0265


Name: Sriramachandran Ramesh
Page: 4
© School of CSE, Vellore Institute of Technology-Vellore CSE3035 PRINCIPLES OF CLOUD
COMPUTING Lab
Assessment: Problem Statement-2
Date:
To develop a cloud-based employee management system that utilizes
dynamic memory allocation for storing employee information. Design
a program that includes menu-driven functionalities for the following
operations:
•Allow the user to input the number of employees to allocate memory
for and dynamically allocate memory accordingly. Display the
addresses of the allocated memory.

•Allow the user to input the number of employees to free memory for.
Perform memory deallocation accordingly and display the available
memory addresses.

•Display the memory addresses of the currently allocated employee


memory.

•Exit: Exit the program.

Reg. No.: 20BDS0265


Name: Sriramachandran Ramesh
Page: 5
© School of CSE, Vellore Institute of Technology-Vellore CSE3035 PRINCIPLES OF CLOUD
COMPUTING Lab
printf("1. Allocate Memory\n");
printf("2. Free Memory\n");
printf("3. Display Memory Addresses\n");
printf("4. Exit\n");

int choice;
printf("Enter your choice: ");
scanf("%d", &choice);

switch (choice) {

case 1:
printf("Enter the number of employees to allocate memory for: ");
scanf("%d", &numEmployees);
allocateMemory(&employees, numEmployees);
break;
Program case 2:
if (employees != NULL) {
printf("Enter the number of employees to free memory for: ");
scanf("%d", &numEmployees);
freeMemory(&employees, numEmployees);
} else {
printf("No memory allocated yet.\n");
}
break;

case 3:
if (employees != NULL) {
displayAddresses(employees, numEmployees);
} else {
printf("No memory allocated yet.\n");
}
break;

case 4:
freeMemory(&employees, numEmployees); // Free memory before
exiting
printf("Exiting program.\n");
exit(0);

default:
printf("Invalid choice. Please enter a valid option.\n");
}
}
return 0;

Reg. No.: 20BDS0265


Name: Sriramachandran Ramesh
Page: 6
© School of CSE, Vellore Institute of Technology-Vellore CSE3035 PRINCIPLES OF CLOUD
COMPUTING Lab
Reg. No.: 20BDS0265
Name: Sriramachandran Ramesh
Page: 7
© School of CSE, Vellore Institute of Technology-Vellore CSE3035 PRINCIPLES OF CLOUD
COMPUTING Lab

You might also like