Os Lab Manual
Os Lab Manual
2018-19
LABORATORY MANUAL
OF
CSE Page 1
LAB MANUAL CONTENT
Operating Systems Laboratory
(15A05510)
Department Vision:
To produce Industry ready Software Engineers to meet the challenges of
21st Century.
Department Mission:
Impart core knowledge and necessary skills in Computer Science and
Engineering through innovative teaching and learning methodology.
CSE Page 2
2. PO, PEO& PSO Statements
CSE Page 3
Program Educational Objectives (PEOs):
PEO 1:Graduates will be prepared for analyzing, designing, developing and testing the
software solutions and products with creativity and sustainability.
PEO 2: Graduates will be skilled in the use of modern tools for critical problem solvingand
analyzing industrial and societal requirements.
PEO 3:Graduates will be prepared with managerial and leadership skills for career and
starting up own firms.
Program Specific Outcomes (PSOs):
PSO 1:Develop creative solutions by adapting emerging technologies / tools for real time
applications.
PSO 2: Apply the acquired knowledge to develop software solutions and innovative mobile
apps for various automation applications
MON
TUE
WED
THU
FRI OS LAB
SAT
CSE Page 4
INDEX
S. No Name of the
Program
Simulate the following CPU scheduling algorithms
1
a) Round Robin b) SJF c) FCFS d) Priority
5
Simulate Banker‟s Algorithm for Dead Lock Avoidance and Dead Lock
Prevention.
6 Simulate all page replacement algorithms
a) FIFO b) LRU c) LFU
7 Simulate Paging Technique of memory management.
8
Simulate how parent and child processes use shared memory and address space
13
Develop a code to convert virtual address to physical address
CSE Page 5
JAWAHARLAL NEHRU TECHNOLOGICAL UNIVERSITY ANANTAPUR
Course Objectives:
4. Simulate all File Organization Techniques a) Single level directory b) Two level c)
Hierarchical d) DAG
9. Control the number of ports opened by the operating system with a) Semaphore b) monitors
10. Simulate how parent and child processes use shared memory and address space
CSE Page 6
12. Simulate dining philosopher„s problem
13. Simulate producer and consumer problem using threads (use java)
14. Simulate little„s formula to predict next burst time of a process for SJF
schedulingAlgorithm.
advance.
CSE Page 7
SVR ENGINEERING COLLEGE
Department: COMPUTER SCIENCE & ENGINEERING
Course Outcome Attainment - Internal Assessments
A.HARI PRASAD
Name of the faculty : REDDY / SIRAJ HUSSAIN Academic Year: 2018-2019
COMPUTER SCIENCE
Branch & Section: & ENGINEERING Exam: 15A05510
Operating Systems
Course: Laboratory Semester: III-I SEM
Attainment
Course Outcomes Level
15A05510.1 Ensure the development of applied skills in operating systems related areas. 3
Able to write software routines modules or implementing various concepts of operating
15A05510.2
system. 3
15A05510.3 Understand process life cycle and able to tell process status. 3
CSE Page 8
SVR ENGINEERING COLLEGE
DEPARTMENT COMPUTER SCIENCE & ENGINEERING
15A05510.1 3 3 3
15A05510.2 3 3 3
15A05510.3 3 3 3
15A05510.4 3 3 3
15A05510.5 3 3 3
CSE Page 9
3 2 1 1 1 1 1 3 3
15A05510.2
3 3 2 2 2 1 1 1 3 3
15A05510.3
3 1 2 2 3 2 2 2 3 3
15A05510.4
3 2 2 2 2 1 2 3 3
15A05510.5
AVERAGE 3.0 2.7 1.6 1.8 1.5 1.6 1.0 2.0 2.0 1.0 1.5 1.8 3.0 3.0
PO-
ATTAINMEN
T
PO PO PO PO PO PO PO PO PO PS PS
PO1 2 PO3 PO4 5 6 7 8 9 10 11 12 O1 O2
15A0551
0.1 9 9 6 6 3 6 6 3 6 9 9
15A0551
INTERNAL
0.2 9 6 3 3 3 3 3 9 9
15A0551
0.3 9 9 6 6 6 3 3 3 9 9
15A0551
0.4 9 3 6 6 9 6 6 6 9 9
15A0551
0.5 9 6 6 6 6 3 6 9 9
15A0551
0.1 9 9 6 6 3 6 6 3 6 9 9
15A0551
UNIVERSITY
0.2 9 6 3 3 3 3 3 9 9
15A0551
0.3 9 9 6 6 6 3 3 3 9 9
15A0551
0.4 9 3 6 6 9 6 6 6 9 9
15A0551
0.5 9 6 6 6 6 3 6 9 9
15A0551
0.1 3 3 3 3 3 3 3 3 3 3 3
OVERALL
15A0551
0.2 3 3 3 3 3 3 3 3 3
15A0551
0.3 3 3 3 3 3 3 3 3 3 3
15A0551
0.4 3 3 3 3 3 3 3 3 3 3
CSE Page 10
15A0551
0.5 3 3 3 3 3 3 3 3 3
Attainment 3 3 3 3 3 3 3 3 3 3 3 3 3 3
Head of the
A.HARI PRASAD REDDY Department
CSE Page 11
EXPERIMENT-1.1
1.1.1 OBJECTIVE:
1.1.3 PROGRA
M:
#include<stdio
.h>
#include<conio int
.h> void main() ts,need[10],wt[10],tat[10],i
{ ,j,n,n1; int
bt[10],flag[10],ttat=0,twt=0
;
float
awt,atat;
clrscr();
printf("\n Round Robbin
Scheduling \n"); printf("
Enter the number of processes
"); scanf("%d",&n);
n1=n;
printf(" Enter the
time slice ");
scanf("%d",&ts);
for(i=1;i<=n;i++)
{
printf("Enter the burst time
for process %d ",i);
scanf("%d",&bt[i]);
need[i]=bt[i];
}
for(i=1;i<=n;i++)
{
flag[i
{
if((i!=j)&&(flag[i]==1)&&(need[j
]!=0)) wt[j]+=ts;
}
need[i]-
=ts;
if(need[i
]==0)
{
flag[i
]=0;
} n--;
}
else
{
for(j=1;j<=n;j++)
{
if((i!=j)&&(flag[i]==1)&&(need[j
]!=0)) wt[j]+=need[i];
}
need[i
]=0; n-
-;
flag[i]=0;
}
}
}
for(i=1;i<=n1;i++)
{
tat[i]=wt[i
]+bt[i];
twt=twt+wt[
i];
ttat=ttat+t
at[i];
}
awt=(float)twt/n1;
atat=(float)ttat/n1;
printf("process bt \t
wt \t tat \n");
for(i=1;i<=n1;i++)
printf("%d \t %d \t %d \t %d
\n",i,bt[i],wt[i],tat[i]);
printf("avgwt=%f \n\n",awt);
printf("avgtat=%f",atat);
1.2.1 OBJECTIVE
1.2.3 PROGRM:
#include<stdio
.h>
#include<conio
.h> void main()
int i,j,temp,n,k,h;
{ int b[10],w[10],t[10],br[10],pr[10];
char
p[10];
temp=0;
clrscr();
printf("enter the number of
processes"); scanf("%d",&n);
for(i=0;i<n;i++)
{
p[i]=0;
b[i]=0;
w[i]=0;
t[i]=0;
br[i]=0;
pr[i]=0;
}
for(i=0;i<n;i++)
{
printf("Enter the process
name %d \n",i);
scanf("%s",&p[i]);
printf("Enter the burst time of
process %d \n",i);
scanf("%d",&b[i]);
}
OPERATING SYSTEM R-15 Page 4
printf("\n
");
for(i=0;i<
n;i++)
{
t[i]=p[i];
}
for(i=0;i<n;i++)
{
for(j=0;j<(n-i-1);j++)
{
if(b[j]>b[j+1])
{
temp=b[j
];
b[j]=b[j
+1];
b[j+1]=te
mp;
temp=p[j
];
p[j]=p[j
+1];
p[j+1]=te
mp;
}
}
}
temp=0;
for(i=0;i<
n;i++)
{
pr[i]=temp;
temp=temp+b
[i];
}
for(i=0;i<n;i++)
{ for(j=0;j<n;j++)
{
if(t[i]==p[j])
{
br[i]=b[j];
w[i]=pr[j];
}
}
}
printf("\nprocess\tburst time\twaiting time
\tTurnaround time\n");
printf("===================================\n"
);
for(i=0;i<n;i++)
{
printf("%c\t ",t[i]);
printf("%d\t\t ",br[i]);
printf("%d\t\t ",w[i]);
printf("%d\t"
,br[i]);
printf("\n");
{
printf("Enter the process
name %d \n",i);
scanf("%s",&p[i]);
printf("Enter the burst time of
process %d \n",i);
scanf("%d",&b[i]);
}
for(i=0;i<n;i++)
{
w[i]=temp;
temp=temp+b
[i];
}
EXPERIMENT-1.4
1.4.1 OBJECTIVE
1.4.3 PROGRA
M:
#include<stdio
.h>
#include<conio int i,j,temp,n,k,h;
.h> void main() int
{ b[10],w[10],pr[10
]; char p[10];
temp=0;
clrscr();
printf("enter the number of
processes"); scanf("%d",&n);
for(i=0;i<n;i++)
{
p[i]=0;
b[i]=0;
w[i]=0;
}
for(i=0;i<n;i++)
{
printf("Enter the process
name %d \n",i);
scanf("%s",&p[i]);
printf("Enter the burst time of
process %d \n",i);
2. Write a collection of processes p1, p2, p3 which execute with same PID.
EXPERIMENT-2.2
2.2.1 OBJECTIVE
2.2.3 PROGRAM
#include<conio.h>
EXPERIMENT-2.3
2.3.3 PROGRAM
#include<stdio
.h>
#include<conio
.h> void main()
{
int
a[100],b[99],m,n,
i; int *p;
for(i=0;i<100;i+
+) a[i]=-1;
printf("enter the starting
address of file");
scanf("%d",&n);
printf("enter the number
of nodes");
scanf("%d",&m);
L1: for(i=0;i<m;i++)
{
printf("enter index %d
\n ",(i+1));
} scanf("%d",&b[i]);
p=&b[0];
a[n]=1
;
printf("\n\nfile 1 starting address is: %d\n Your indexed locations are\n",n);
for(i=0;i<m;i++)
{
if(a[b[i]
]==-1)
{ a[b[i]]=1;
printf("%d\n
",*p);
p=p+1;
}
else
{
Only
computation
Only printf s
Low computation, heavy console
output (printfs) Heavy File I/O
3.1.1 OBJECTIVE
Simulate Multi programming with fixed number of tasks and Multi programming with variable
number of tasks.
MFT
}
printf("total
fragmentation is
%d",intr); getch();
}
EXPERIMENT-3.2
3.2.1 OBJECTIVE
Simulate Multi programming with fixed number of tasks and Multi programming with
variable number of tasks
MVT
(a) Worst-Fit
(b) Best-Fit
(c) First-Fit
4.1.1 OBJECTIVE
4.2.1 OBJECTIVE
Simulate Two level directory File Organization Technique
4.2.3 PROGRAM
#include<stdio.h>
#include<graphics.h>
struct tree_element
{
char name[20];
int
x,y,ftype,lx,rx,nc,le
vel; struct
tree_element
*link[5];
};
typedef struct
tree_element node; void
main()
{
int
gd=DETECT,gm;
node *root;
EXPERIMENT-4.3
4.3.1 OBJECTIVE
Simulate Hierarchical level directory File Organization Technique
EXPERIMENT-4.4
4.4.1 OBJECTIVE
4.4.3 PROGRAM
#include<stdio.h>
#include<conio.h>
#include<graphics.h>
#include<string.h>
struct tree_element
{
char name[20];
int
x,y,ftype,lx,rx,nc,le
vel; struct
tree_element
*link[5];
};
typedef struct
tree_element node;
typedef struct
{
char
from[20];
char to[20];
}link;
Link
L[10]; Int
nofl; node
* root;
void
main()
{
int
gd=DETECT,gm;
root=NULL;
clrscr();
create(&root,0,"root",0,639,320);
read_links();
clrscr();
initgraph(&gd,&gm,"c:\\tc\\B
GI"); draw_link_lines();
display(roo
t);
getch();
closegraph(
);
}
read_links()
5.1 OBJECTIVE
Program for Bankers algorithm for deadlock avoidance and deadlock prevention.
5.2 PROGRAM LOGIC
5.3 PROGRAM
#include<stdio
.h>
#include<conio
.h> #define s
15
void main()
{
int n,m,a[5],e[5],c[5][5],r[5][5];
int
i,j,k,cou,l,flag,count
; cou=flag=count=0;
printf("enter no of
processes");
scanf("%d",&n);
printf("enter no of
resource classes");
scanf("%d",&m);
for(i=0;i<m;i++)
{
printf("\n enter instances of
resources class %d "i+1);
scanf("%d",&e[i]);
printf("\n enter free vectors of resources class %d
(resources available):",i+1); scanf("%d",&a[i]);
}
printf("\n enter the current
allocation matrix \n");
for(i=0;i<n;i++)
for(j=0;j<m;j++)
EXPERIMENT-6.2
6.2.1 OBJECTIVE
EXPERIMENT-6.3
6.3.1 OBJECTIVE
6.4.2 PROGRAM
#include<stdio
.h> int main()
{
int f,p;
int
pages[50],frame[10],hit=0,count[5
0],time[50]; int
i,j,page,flag,least,minTime,temp;
printf("Enter no of
frames : ");
scanf("%d",&f);
printf("Enter no of
pages : ");
scanf("%d",&p);
for(i=0;i<f;i++)
{
frame[i]=-1;
}
for(i=0;i<50;i++)
{
7.1.3 PROGRAM
#include
<stdio.h>
#include
<conio.h>
struct pstruct
{
int
fno;
int
pbit;
}ptable[10];
int pmsize,lmsize,psize,frame,page,ftable[20],frameno;
void info()
{
printf("\n\nMEMORY MANAGEMENT USING
PAGING\n\n"); printf("\n\nEnter the Size of
Physical memory: "); scanf("%d",&pmsize);
printf("\n\nEnter the size of
Logical memory: ");
scanf("%d",&lmsize);
printf("\n\nEnter the
partition size: ");
scanf("%d",&psize);
frame = (int)
pmsize/psize; page
= (int)
lmsize/psize;
printf("\nThe physical memory is divided into %d
no.of frames\n",frame); printf("\nThe Logical
memory is divided into %d no.of pages",page);
}
void assign()
{
EXPERIMENT-7.2
7.2.1 OBJECTIVE
struct segtab
{
int
sno;
int
baddr;
for(i=1;i<=so
st;i++)
{
void ptladdr()
{
int
i,swd,d=0,n,s,disp,
paddr; clrscr();
printf("\n\n\t\t\t SEGMENT TABLE \n\n");
printf("\n\t
SEG.NO\tBASE ADDRESS\t LIMIT
\n\n"); for(i=1;i<=sost;i++)
printf("\t\t%d
\t\t%d\t\t%d\n\n",st[i].sno,st[i
].baddr,st[i].limit); printf("\n\nEnter the
logical Address: ");
scanf("%d",&s
wd); n=swd;
while (n != 0)
{
n=n/1
0;
d++;
}
s = swd/pow(10,d-1);
disp = swd%(int)pow(10,d-1);
if(s<=sost)
{
if(disp < st[s].limit)
{
paddr = st[s].baddr + disp;
printf("\n\t\tLogical
Address is: %d",swd);
printf("\n\t\tMapped Physical
} address is: %d",paddr);
el printf("\n\tThe value is: %d",(
se st[s].val[disp] ) );
}
el
se printf("\n\t\tLimit of segment %d is high\n\n",s);
printf("\n\t\tInvalid Segment Address \n");
OPERATING SYSTEM R-15 Page 77
}
void main()
{
char
ch;
clrscr
();
gstinf
o();
do
{
ptladdr();
getch();
}
Value: 51 SEGMENT
TABLE
1 4 5
2 5 4
3 3 4
Simulate how parent and child processes use shared memory and address space.
8.3 PROGRAM
Client program to demonstrate shared
memory#include<sys/types.h>
#include<sys/ipc.h>
#include<sys/s
hm.h>
#include<stdio
.h>
#include<stdli
b.h> #define
SHMSZ 27
main()
{
int
shmid;
key_t
key; char
*shm, *s;
key=5678;
if((shmid=shmget(key,SHMSZ,0666))<0)
{
perror("shm
get");
exit(1);
}
if((shm=shmat(shmid,NULL,0))==(char*)-1)
{
perror("shm
at");
exit(1);
}
for(s=shm;*s!=
NULL;s++)
putchar(*s);
putchar('\n');
*shm='*';
exit(0);
}
1. Discuss the consequences of considering bounded and unbounded buffers in producer-consumer problem?
2. Can producer and consumer processes access the shared memory concurrently? If not which
techniqueprovidessuch a benefit?
EXPERIMENT-9
Barber():
while true:
wait(custReady)
wait(accessWRSeats)
numberOfFreeWRSeats
+= 1
signal(barberReady)
signal(accessWRSeat
s)
# (Cut hair here.)
def Customer():
wait(accessWRS
eats)
if
numberOfFreeWRSeats
> 0:
numberOfFreeWRSeats
-= 1
signal(custReady)
signal(accessWRSeats
) wait(barberReady)
else:
signal(accessWR
Seats)
# (Leave without a haircut.)
9.3 PROGRAM
#include
<stdio.h>
#include
<unistd.h>
#include
<stdlib.h>
#include
<stdio.h>
#include
<unistd.h>
#include
<stdlib.h>
#include
void *customer(void
*num); void
*barber(void *);
void
randwait(int
secs); sem_t
waitingRoom;
sem_t
barberPillow;
sem_t seatBelt;
int allDone = 0;
void *customer(void
*number) { int num =
*(int *)number;
printf("Customer %d leaving for
barber shop.\n", num); randwait(5);
printf("Customer %d arrived at barber shop.\n", num);
sem_wait(&waitingR
oom); printf("Customer %d entering waiting room.\n",
num);
sem_wait(&barberCh
air); sem_post(&waitingRoom);
printf("Customer %d waking the
barber.\n", num);
sem_post(&barberPillow);
sem_wait(&seatBelt); // Give
up the chair.
sem_post(&barberChair);
OPERATING SYSTEM R-15 Page 89
printf("Customer %d leaving barber shop.\n", num);
}
while (!allDone) {
printf("The barber is
sleeping\n");
sem_wait(&barberPillow
);
if (!allDone)
{
printf("The barber is
cutting hair\n");
randwait(3);
EXPERIMENT-10
10.3 PROGRAM
int tph, philname[20], status[20], howhung, hu[20], cho; main()
{
int
i;
clrsc
r();
printf("\n\nDINING PHILOSOPHER PROBLEM"); printf("\nEnter the total no. of
philosophers: "); scanf("%d",&tph);
for(i=0;i<tph;i++)
{
philname[i] =
(i+1);
status[i]=1;
}
printf("How many are
hungry : ");
scanf("%d", &howhung);
if(howhung==tph)
{
printf("\nAll are hungry..\nDead lock stage will occur");
printf("\nExiting..");
}
else
{
for(i=0;i<howhung;i++)
{
printf("Enter philosopher %d
position: ",(i+1)); scanf("%d",
&hu[i]); status[hu[i]]=2;
}
do
{
11.3 PROGRAM
import
java.io.*;
import
java.lang.*;
class Q
{
int n;
boolean
valueSet=false;
synchronized int
get()
{
if(!valu
eSet)
try
{
wait();
}
catch(InterruptedException e){
System.out.println("InterruptedExceptio
n caught");
}
System.out.println("Got:
12.3 PROGRAM
import
java.io.*;
import
java.util.*;
class Graph
{
private int V;
private
LinkedList<Integer>
adj[]; Graph(int v) {
V = v;
adj = new
LinkedList[v];
for(int i=0;
i<v; ++i)
adj[i] = new LinkedList();
}
void addEdge(int
v,int w) {
adj[v].add(w);
adj[w].add(v);
}
EXPERIMENT-13
13.3 PROGRAM
#include
<stdio.h>
#include
<conio.h>
struct pstruct
{
int
fno;
int
pbit;
}ptable[10];
int pmsize,lmsize,psize,frame,page,ftable[20],frameno;
void info()
{
printf("\n\nMEMORY MANAGEMENT USING
PAGING\n\n"); printf("\n\nEnter the Size of
Physical memory: "); scanf("%d",&pmsize);
printf("\n\nEnter the size of
Logical memory: ");
scanf("%d",&lmsize);
printf("\n\nEnter the
partition size: ");
scanf("%d",&psize);
frame = (int)
pmsize/psize; page
= (int)
lmsize/psize;
printf("\nThe physical memory is divided into %d
no.of frames\n",frame); printf("\nThe Logical
memory is divided into %d no.of pages",page);
}
void assign()
{
int i;
for (i=0;i<page;i++)
14.3 PROGRAM
#include<std
io.h>
#include<con
io.h> Void
main()
{
int
i,s[10],S,m,a[10],n,ch
,total=0; char p[10];
printf(“enter total no
of process”);
scanf(“%d”,&n);
for(i=0;i<n;i++)
{
printf(“enter the process
name %d”,i)
scanf(“%s”,&p[i])
printf(“enter the size of
each process %d”,i)
scanf(“%d”,&s[i])
}
printf(“enter total no
of frames”);
scanf(“%d”,&m);
printf(“enter ur
choice”);
scanf(“%d”,&ch);
switch(ch)
{
case 1: printf(“Fixed
Allocation”);
for(i=0;i<n;i++)
{
a[i]=m/n;
printf(“Allocation of frames to process %c is %d”,p[i],a[i]);
}
process Names: a
process Names: b
process Names: c
process Names: d
total No of frames:
40 Enter ur choice: 1
Fixed Allocation
Allocation of frames to
process a is 10 Allocation
of frames to process b is
10 Allocation of frames to
process c is 10 Allocation
of frames to process d is
10 Enter ur choice 2
Proportional Allocation
process a is 7 Allocation
process c is 10 Allocation
12
2. What is the process of mapping a logical address to physical address with respect to the paging
memorymanagement technique?
table?
3. Whether the paging memory management technique suffers with internal or external
fragmentationproblem.Why?
15.1 OBJECTIVE
Simulate the prediction of deadlock in operating system when all the processes
announce their resource requirement in advance.
0 1 0 0 1
0 0 1 0 1
0 0 0 0 1
1 0 1 0 1
Enter
availability
vector 0 0 0 0 1
is deadlock?
technique?
1. OBJECTIVE
Program to perform Optimal page replacement algorithm.
2. PROGRAM
#include<con
io.h>
#include<std
io.h>
int optimalframe(int
w[],int m); void
main()
{
int i,j,n,m,r,pagef,l,h,p;
int a[100],b[100],w[10];
pagef=
0;
clrscr
();
printf("enter the number
of pages\n");
scanf("%d",&n);
printf("enter the number of frames in
main memory\n"); scanf("%d",&m);
for(i=0;i<m;i++)
b[i]=-1;
for(i=0;i<n;i++)
{
printf("enter the
element %d\n",i);
scanf("%d",&a[i]);
}
for(i=0;i<m;i++)
{
b[i]=a[
i];
for(r=0;r<m printf("%d ",b[r]);
;r++)
printf("
\n");
} pagef++;
for(i=m;i<n
;i++)
{
for(j=0;j<m;j++)
{
if(b[j]==a[i])
{
printf("the page %d is already present in
main memory\n",a[i]); break;
return h;
}
1. OBJECTIVE
2. PROGRAM
# include <stdio.h>
include<pthrea
d.h> #
include<cursor
s.h>
int turn=0,
flag[2]={0,0},bal=0;
void longdelay()
for(t1=0;t1<64000;t1++);
for(t2=0;t2<64000;t2++);
void shortdelay()
int t3,t4;
for(t3=0;t3<32000
;t3++)
for(t4=0;t4<32000
;t4++)
void test(int i)
int
,c; j=1-i;
for(k=0;k<3
;k++)
flag[i]=1;
while(flag[j
])
if (turn==j)
flag[i]=0;
printf(“Iam
waiting:%d”,i);
while(turn==j);
flag[i]=1;
longdelay();
printf(“Iam
entering %d”,i);
c=bal;
/*critical
section*/
printf(“\n
process: %d”,l);
printf(“flag[%d]=%d,
flag[%d]=%d”,i,flag[i],j,flag[j]);
printf(“turn=%d\n”,turn);
bal=c+1000;
printf(“the balance
is %d”,bal); turn=j;
flag[i]=0;
printf(“Iam
exiting: %d”,i);
shortdelay();
int main()
pthread_t t1,t2;
pthread_creat(&t,NULL,(void*)&test,(voi
thread…..”);
pthread_creat(&t2,NULL,(void*)&test,(void
*)1); pthread_join(t1,NULL);
NULL); sleep(s);
printf(“Parent
terminated:%d”,bal);
return(0); }