-
Notifications
You must be signed in to change notification settings - Fork 0
/
os outputs
88 lines (78 loc) · 1.7 KB
/
os outputs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
mec@user:~$ gcc seqfile2.c
mec@user:~$ ./a.out
File allocated are:
Enter starting block and length:3
4
frames allocated:
3 1
4 1
5 1
6 1
File is allocated
Do you want to allocate more?(Yes-1 no-0)1
Enter starting block and length:2
5
frames allocated:
File is not allocatedDo you want to allocate more?(Yes-1 no-0)0
mec@user:~$ gcc linkedfile.c
mec@user:~$ ./a.out
Enter how many blocks already allocated: 4
Enter blocks already allocated: 1
3
5
7
Enter index starting block and length: 2
5
2-------->1
3 Block is already allocated
4-------->1
5 Block is already allocated
6-------->1
7 Block is already allocated
8-------->1
9-------->1
Do you want to enter more file(Yes - 1/No - 0)1
Enter index starting block and length: 2
5
2 starting block is already allocated
Do you want to enter more file(Yes - 1/No - 0)0
mec@user:~$ gcc indexfile.c
mec@user:~$ ./a.out
Enter the index block: 3
Enter no of blocks needed and no of files for the index 3 on the disk :
3
5
2
7
Allocated
File Indexed
3-------->5 : 1
3-------->2 : 1
3-------->7 : 1
Do you want to enter more file(Yes - 1/No - 0)1
Enter the index block: 2
2 index is already allocated
Enter the index block: 9
Enter no of blocks needed and no of files for the index 9 on the disk :
1
8
Allocated
File Indexed
9-------->8 : 1
Do you want to enter more file(Yes - 1/No - 0)0
mec@user:~$ gcc paging.c
mec@user:~$ ./a.out
Your memsize is 15
Enter page size:3
Enter the frame of page1:6
Enter the frame of page2:2
Enter the frame of page3:8
Enter the frame of page4:4
Enter the frame of page5:9
Enter a logical address:4
Physical address is:7
Do you want to continue(1/0)?:1
Enter a logical address:9
Physical address is:12
Do you want to continue(1/0)?:0
mec@user:~$