0% found this document useful (0 votes)
16 views21 pages

CC 4-7

The document outlines practical implementations of various scheduling algorithms in Java, including FCFS, SJF, and Round Robin, along with their respective code implementations. It also discusses cloud security management, identity management, and provides a case study on Amazon Web Services, detailing its services and historical development. The document emphasizes the importance of security in cloud computing and identity management processes.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
16 views21 pages

CC 4-7

The document outlines practical implementations of various scheduling algorithms in Java, including FCFS, SJF, and Round Robin, along with their respective code implementations. It also discusses cloud security management, identity management, and provides a case study on Amazon Web Services, detailing its services and historical development. The document emphasizes the importance of security in cloud computing and identity management processes.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 21

Practical No:04

AIM:- Implement Scheduling algorithms.


A) FCFS (First come First serve)

import java.util.*;
public class FCFS {
public static void main(String args[])
{
Scanner sc = new Scanner(System.in);
System.out.println("enter no of process: ");
int n = sc.nextInt();
int pid[] = new int[n];
int ar[] = new int[n];
int bt[] = new int[n];
int ct[] = new int[n];
int ta[] = new int[n];
int wt[] = new int[n];
int temp;
float avgwt=0,avgta=0;
for(int i = 0; i < n; i++)
{
System.out.println("enter process " + (i+1) + " arrival time: ");
ar[i] = sc.nextInt();
System.out.println("enter process " + (i+1) + " brust time: ");
bt[i] = sc.nextInt();
pid[i] = i+1;
}
for(int i = 0 ; i <n; i++)
{
for(int j=0; j < n-(i+1) ; j++)
{
if( ar[j] > ar[j+1] )
{
temp = ar[j];
ar[j] = ar[j+1];
ar[j+1] = temp;
temp = bt[j];
bt[j] = bt[j+1];
bt[j+1] = temp;
temp = pid[j];
pid[j] = pid[j+1];
pid[j+1] = temp;
}}}
for(int i = 0 ; i < n; i++)
{
if( i == 0)
{
ct[i] = ar[i] + bt[i];
}
else
{
if( ar[i] > ct[i-1])
{
ct[i] = ar[i] + bt[i];
}
else
ct[i] = ct[i-1] + bt[i];
}
ta[i] = ct[i] - ar[i] ;
wt[i] = ta[i] - bt[i] ;
avgwt += wt[i] ;
avgta += ta[i] ;
}
System.out.println("\npid arrival brust complete turn waiting");
for(int i = 0 ; i< n; i++)
{
System.out.println(pid[i] + " \t " + ar[i] + "\t" + bt[i] + "\t" + ct[i] + "\t" + ta[i] + "\t" + wt[i] ) ;
}
sc.close();
System.out.println("\naverage waiting time: "+ (avgwt/n));
System.out.println("average turnaround time:"+(avgta/n));
}}

OUTPUT:
B) SJF (Shortest path first)

import java.util.*;
public class SJF {
public static void main(String args[])
{
Scanner sc = new Scanner(System.in);
System.out.println ("enter no of process:");
int n = sc.nextInt();
int pid[] = new int[n];
int at[] = new int[n];
int bt[] = new int[n];
int ct[] = new int[n];
int ta[] = new int[n];
int wt[] = new int[n];
int f[] = new int[n];
int st=0, tot=0;
float avgwt=0, avgta=0;
for(int i=0;i<n;i++)
{
System.out.println ("enter process " + (i+1) + " arrival time:");
at[i] = sc.nextInt();
System.out.println ("enter process " + (i+1) + " brust time:");
bt[i] = sc.nextInt();
pid[i] = i+1;
f[i] = 0;
}
boolean a = true;
while(true)
{
int c=n, min=999;
if (tot == n)
break;
for (int i=0; i<n; i++)
{
if ((at[i] <= st) && (f[i] == 0) && (bt[i]<min))
{
min=bt[i];
c=i;
}
}
if (c==n)
st++;
else
{
ct[c]=st+bt[c];
st+=bt[c];
ta[c]=ct[c]-at[c];
wt[c]=ta[c]-bt[c];
f[c]=1;
tot++;
}
}
System.out.println("\npid arrival brust complete turn waiting");
for(int i=0;i<n;i++)
{
avgwt+= wt[i];
avgta+= ta[i];
System.out.println(pid[i]+"\t"+at[i]+"\t"+bt[i]+"\t"+ct[i]+"\t"+ta[i]+"\t"+wt[i]);
}
System.out.println ("\naverage tat is "+ (float)(avgta/n));
System.out.println ("average wt is "+ (float)(avgwt/n));
sc.close();
}
}

OUTPUT:
C) Round robin scheduling

import java.util.Scanner;
public class RoundRobin
{
public static void main(String args[])
{
int n,i,qt,count=0,temp,sq=0,bt[],wt[],tat[],rem_bt[];
float awt=0,atat=0;
bt = new int[10];
wt = new int[10];
tat = new int[10];
rem_bt = new int[10];
Scanner s=new Scanner(System.in);
System.out.print("Enter the number of process (maximum 10) = ");
n = s.nextInt();
System.out.print("Enter the burst time of the process\n");
for (i=0;i<n;i++)
{
System.out.print("P"+i+" = ");
bt[i] = s.nextInt();
rem_bt[i] = bt[i];
}
System.out.print("Enter the quantum time: ");
qt = s.nextInt();
while(true)
{
for (i=0,count=0;i<n;i++)
{
temp = qt;
if(rem_bt[i] == 0)
{
count++;
continue;
}
if(rem_bt[i]>qt)
rem_bt[i]= rem_bt[i] - qt;
else
if(rem_bt[i]>=0)
{
temp = rem_bt[i];
rem_bt[i] = 0;
}
sq = sq + temp;
tat[i] = sq;
}
if(n == count)
break;
}
System.out.print("--------------------------------------------------------------------------------");
System.out.print("\nProcess\t Burst Time\t Turnaround Time\t Waiting Time\n");
System.out.print("--------------------------------------------------------------------------------");
for(i=0;i<n;i++)
{
wt[i]=tat[i]-bt[i];
awt=awt+wt[i];
atat=atat+tat[i];
System.out.print("\n "+(i+1)+"\t "+bt[i]+"\t\t "+tat[i]+"\t\t "+wt[i]+"\n");
}
awt=awt/n;
atat=atat/n;
System.out.println("\nAverage waiting Time = "+awt+"\n");
System.out.println("Average turnaround time = "+atat);
}
}

OUTPUT:
Practical No:05

AIM:- To study cloud security management.


Objectives: From this experiment, the student will be able,
● To understand the security features of Cloud.
● To learn the technique of application security management and its complexity
● To understand the importance of cloud security management from application point of view

Outcomes: The learner will be able to


● Student can study and implement single-sign-on.
● To use current techniques, skills, and tools necessary for computing practice.
● To match the industry requirements in the domains of Database management, Programming
and Networking with the required management skills.

Hardware / Software Required: Ubuntu operating system, Virtual machine,


WAMP/ZAMP server, Any tool or technology can be used for implementation of web
application e.g., JAVA, PHP, etc.

Theory:
Cloud computing security is the set of control-based technologies and policies designed to
adhere to regulatory compliance rules and protect information, data applications and
infrastructure associated with cloud computing use. Because of the cloud's very nature as a
shared resource, identity management, privacy and access control are of particular concern. With
more organizations using cloud computing and associated cloud providers for data operations,
proper security in these and other potentially vulnerable areas have become a priority for
organizations contracting with a cloud computing provider.
Cloud computing security processes should address the security controls the cloud provider will
incorporate to maintain the customer's data security, privacy and compliance with necessary
regulations. The processes will also likely include a business continuity and databackup plan in
the case of a cloud security breach.
Physical security
Cloud service providers physically secure the IT hardware (servers, routers, cables etc.) against
unauthorized access, interference, theft, fires, floods etc. and ensure that essential supplies (such
as electricity) are sufficiently robust to minimize the possibility of disruption. This is normally
achieved by serving cloud applications from 'world-class' (i.e. professionally specified, designed,
constructed, managed, monitored and maintained) data centers.
Personnel security
Various information security concerns relating to the IT and other professionals associated with
cloud services are typically handled through pre-, para- and post-employment activities such as
security screening potential recruits, security awareness and training programs, proactive security
monitoring and supervision, disciplinary procedures and contractual obligations embedded in
employment contracts, service level agreements, codes of conduct, policies etc.
Application security
Cloud providers ensure that applications available as a service via the cloud (SaaS) are secure by
specifying, designing, implementing, testing and maintaining appropriate application security
measures in the production environment. Note that - as with any commercial software - the
controls they implement may not necessarily fully mitigate all the risks they have identified, and
that they may not necessarily have identified all the risks that are of concern to customers.
Consequently, customers may also need to assure themselves that cloud applications are
adequately secured for their specific purposes, including their compliance obligations.

Steps to perform cloud security:-


Step 1: go to aws.amazon.com

Step 2: Click on "My Account". Select "AWS management console" and click on it. Give Email
id in the required field.
Step 3: Addition of security features .

Step 4: Sign in to an AWS account


Step 5 : Creation of users
Step 6: Adding users to group

Step 7: Creating Access key


Step 8 : Setting permissions to users
Practical No:06

AIM:- To study and implementation of identity management.


Identity management (ID management) is the organizational process for ensuring that individuals
have the appropriate access to technology resources. More specifically, this includes the
identifying, authentication and authorization of a person, or persons, to have access to
applications, systems or networks.

This is done by associating user rights and restrictions with established identities. Managed
identities can also refer to software processes that need access to organizational systems. Identity
management can be considered an essential component for security. Identity management
includes authenticating users and determining whether they're allowed access to particular
systems. ID management works hand-in-hand with identity access manageme systems. Identity
management is focused on authentication, while access management is aimed at authorization.

The main goal of identity management is to ensure that only authenticated users are granted
access to the specific applications, systems or IT environments for which they are authorized.
This includes control over user provisioning and the process of onboarding new users such as
employees, partners, clients and other stakeholders. Identity management also includes control
over the process of authorizing system or network permissions for existing users and the
offboarding of users who are no longer authorized to access organization systems.

Step 1: OwnCloud is open source file sync and share software for everyone from individuals
operating the free ownCloud Server edition, to large enterprises and service providers operating
the ownCloud Enterprise Subscription. ownCloud provides a safe, secure, and compliant file
synchronization and sharing solution on servers that you control. You can share one or more files
and folders on your computer, and synchronize them with your ownCloud server.
Step 2 : By default, the ownCloud Web interface opens to your Files page. You can add,
remove, and share files, and make changes based on the access privileges set by you (if you are
administering the server) or by your server administrator. You can access your ownCloud files
with the ownCloud web interface and create, preview, edit, delete, share, and re-share files. Your
ownCloud administrator has the option to disable these features, so if any of them are missing on
your system ask your server administrator.

Step 3: Apps Selection Menu: Located in the upper left corner, click the arrow to open a
dropdown menu to navigate to your various available apps. Apps Information field: Located in
the left sidebar, this provides filters and tasks associated with your selected app. Application
View: The main central field in the ownCloud user interface. This field displays the contents or
user features of your selected app.
Step 4: Share the file or folder with a group or other users, and create public shares with
hyperlinks. You can also see who you have shared with already, and revoke shares by clicking
the trash can icon. If username auto-completion is enabled, when you start typing the user or
group name ownCloud will automatically complete it for you. If your administrator has enabled
email notifications, you can send an email notification of the new share from the sharing screen.
Step 5: Five Share permissions are :

Can share: allows the users you share with to re-share.

Can edit: allows the users you share with to edit your shared files, and to collaborate using the
Documents app.

Create: allows the users you share with to create new files and add them to the share.

Change: allows uploading a new version of a shared file and replacing it.

Delete: allows the users you share with to delete shared files.
Practical No:07

AIM:- Case Study - Amazon Web Services/Microsoft Azure/Google cloud


services.

Introduction to AWS(Amazon Web services)

Amazon web service is an online platform that provides scalable and cost-effective cloud
computing solutions. AWS is a broadly adopted cloud platform that offers several on-demand
operations like compute power, database storage, content delivery, etc., to help corporates scale
and grow. Amazon Web Services offers a broad set of global cloud-based products including
compute, storage, databases, analytics, networking, mobile, developer tools, management tools,
IoT, security, and enterprise applications: on-demand, available in seconds, with pay-as-you-go
pricing. From data warehousing to deployment tools, directories to content delivery, over 200
AWS services are available. New services can be provisioned quickly, without the upfront fixed
expense. This allows enterprises, start-ups, small and medium-sized businesses, and customers in
the public sector to access the building blocks they need to respond quickly to changing business
requirements. This whitepaper provides you with an overview of the benefits of the AWS Cloud
and introduces you to the services that make up the platform.

AWS is a comprehensive, easy to use computing platform offered Amazon. The platform is
developed with a combination of infrastructure as a service (IaaS), platform as a service
(PaaS) and packaged software as a service (SaaS) offerings History of AWS

• 2002- AWS services launched


• 2006- Launched its cloud products

• 2012- Holds first customer event

• 2015- Reveals revenues achieved of $4.6 billion

• 2016- Surpassed $10 billon revenue target

• 2016- Release snowball and snowmobile

• 2019- Offers nearly 100 cloud services

Important AWS Services

Amazon Web Services offers a wide range of different business purpose global cloudbased
products. The products include storage, databases, analytics, networking, mobile, development
tools, enterprise applications, with a pay-as-you-go pricing model. Here, are essential AWS
services. AWS Compute Services

Here, are Cloud Compute Services offered by Amazon:

1. EC2(Elastic Compute Cloud) - EC2 is a virtual machine in the cloud on which you have OS
level control. You can run this cloud server whenever you want.

2. LightSail -This cloud computing tool automatically deploys and manages the computer,
storage, and networking capabilities required to run your applications.

3. Elastic Beanstalk — The tool offers automated deployment and provisioning of resources like
a highly scalable production website.

4. EKS (Elastic Container Service for Kubernetes) — The tool allows you to Kubernetes on
Amazon cloud environment without installation.

5. AWS Lambda — This AWS service allows you to run functions in the cloud. The tool is a big
cost saver for you as you to pay only when your functions execute.

Storage

1. Amazon Glacier- It is an extremely low-cost storage service. It offers secure and fast storage
for data archiving and backup.

2. Amazon Elastic Block Store (EBS)- It provides block-level storage to use with Amazon EC2
instances. Amazon Elastic Block Store volumes are networkattached and remain independent
from the life of an instance.
3. AWS Storage Gateway- This AWS service is connecting on-premises software applications
with cloud-based storage. It offers secure integration between the company's on-premises and
AWS's storage infrastructure.

Security Services

1. IAM (Identity and Access Management) — IAM is a secure cloud security service which
helps you to manage users, assign policies, form groups to manage multiple users.

2. Inspector — It is an agent that you can install on your virtual machines, which reports any
security vulnerabilities.

3. Certificate manager-- The service offers free SSL certificates for your domains that are
managed by Route53.

4. WAF (Web Application Firewall) — WAF security service offers applicationlevel protection
and allows you to block SQL injection and helps you to block cross-site scripting attacks.

5. Cloud Directory — This service allows you to create flexible, cloud-native directories for
managing hierarchies of data along multiple dimensions.

6. Organizations — You can create groups of AWS accounts using this service to manages
security and automation settings.

7. Shield — Shield is managed DDoS (Distributed Denial of Service protection service). It offers
safeguards against web applications running on AWS.

8. Macie — It offers a data visibility security service which helps classify and protect your
sensitive critical content.

9. GuardDuty —It offers threat detection to protect your AWS accounts and workloads.

Database Services

1. Amazon RDS- This Database AWS service is easy to set up, operate, and scale a relational
database in the cloud.

2. Amazon DynamoDB- It is a fast, fully managed NoSQL database service. It is a simple


service which allow cost-effective storage and retrieval of data. It also allows you to serve any
level of request traffic.

3. Amazon ElastiCache- It is a web service which makes it easy to deploy, operate, and scale an
in-memory cache in the cloud.

4. Neptune- It is a fast, reliable and scalable graph database service.


5. Amazon RedShift - It is Amazon's data warehousing solution which you can use to perform
complex OLAP queries

Developer Tools

1. CodeStar — Codestar is a cloud-based service for creating, managing, and working with
various software development projects on AWS.

2. CodeCommit — It is AWS's version control service which allows you to store your code and
other assets privately in the cloud.

3. CodeBuild — This Amazon developer service help you to automates the process of building
and compiling your code.

4. CodeDeploy — It is a way of deploying your code in EC2 instances automatically.

5. CodePipeline — It helps you create a deployment pipeline like testing, building, testing,
authentication, deployment on development and production environments.

6. Cloud9 —It is an Integrated Development Environment for writing, running, and debugging
code in the cloud.

Mobile Services

1. Mobile Hub — Allows you to add, configure and design features for mobile apps.

2. Cognito — Allows users to signup using his or her social identity.

3. Device Farm — Device farm helps you to improve the quality of apps by quickly testing
hundreds of mobile devices.

You might also like