0% found this document useful (0 votes)
11 views3 pages

Linux assignment 2

The document outlines a Linux assignment consisting of three tasks. Task 1 involves logical operations and checksum calculations based on the ASCII and 4B5B encoding of the name 'Haris'. Task 2 and Task 3 include memory management concepts and process scheduling with page faults and remaining times for various processes.

Uploaded by

harishussain2707
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
11 views3 pages

Linux assignment 2

The document outlines a Linux assignment consisting of three tasks. Task 1 involves logical operations and checksum calculations based on the ASCII and 4B5B encoding of the name 'Haris'. Task 2 and Task 3 include memory management concepts and process scheduling with page faults and remaining times for various processes.

Uploaded by

harishussain2707
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

Linux assignment 2

CSI task 1

A
B
X
C

A B C A xor b B xor c (a xor Not c (A xor x


b) and b) and
(b xor b xor c)
c) or not
c
0 0 0 0 0 0 1 1 1
0 0 1 0 1 0 0 0 1
0 1 0 1 1 1 1 1 0
0 1 1 1 0 0 0 0 1
1 0 0 1 0 0 1 1 0
1 0 1 1 1 1 0 1 0
1 1 0 0 1 0 1 1 0
1 1 1 0 0 0 0 0 0
B)

C B A Output
0 0 0 1
0 0 1 0
0 1 0 1
0 1 1 0
1 0 0 1
1 0 1 0
1 1 0 1
1 1 1 0
Task2

Character: H a r i s

ASCII code: 72 97 114 105 115


Binary code: 01001000 01100001 01110010 01101001 01110011

4B5B code: 1001 0001 0101 0011 0110

Add all of the 8-bit binary codes for each character in the message (including the 4B5B encoded
versions of the characters) and divide by 256 to get an 8-bit checksum for the aforementioned
communication. The checksum (8 bits) is the resulting value.

Using the name "Haris" from the previous question and its 4B5B encoding, we get:

Character: H a r i s

ASCII code: 72 97 114 105 115

Binary code: 01001000 01100001 01110010 01101001 01110011

4B5B code: 1001 0001 0101 0011 0110

Add all of the binary codes together to get the 8-bit checksum:

01001000 + 01100001 + 01110010 + 01101001 + 01110011 + 10010001 + 00110101 + 01011001 +


10110000

= 100011101 (in binary)

= 237 (in decimal)

237 mod 256 = 237

As a result, the message "Haris" has an 8-bit checksum of 237.

A recoverable HDB3-encoded signal at 8Mbps with the 7th harmonic requires at least 56MHz of
bandwidth.

Task 3

Page Memory Memory Memory Memory Page R bit 1 R bit 2 R bit 3 R bit 4
number page 1 page 2 page 3 page 4 fault
6 6 1 1 0 0 0
5 6 5 1 1 1 0 0
4 6 5 4 1 1 1 1 0
3 6 5 4 3 1 1 1 1 1
2 2 5 4 3 1 0 1 1 1
1 2 1 4 3 0 0 0 1 1
6 2 1 6 3 0 0 0 1 1
5 2 5 6 3 0 0 1 1 1
4 2 5 4 3 0 0 1 1 1
3 2 5 3 3 0 0 1 1 1
2 2 5 2 3 0 1 1 0 1
1 1 5 2 3 0 0 1 0 1
6 6 5 2 3 1 1 1 0 1
5 6 5 5 3 1 1 1 1 1

With 9 page defaults

Time Running A B C D E
process remaining remaining remaining remaining remaining
0 A 8
1 B 7 6
2 C 7 5 5
3 D 7 5 4 4
4 E 7 5 4 3 3
5 E 7 5 4 3 2
6 E 7 5 4 3 1
7 E 7 5 4 3 0
8 D 7 5 4 2
9 D 7 5 4 1
10 D 7 5 4 0
11 C 7 5 3
12 C 7 5 2
13 C 7 5 1
14 C 7 5 0
15 B 7 4
16 B 7 3
17 B 7 2
18 B 7 1
19 B 7 0
20 A 6
21 A 5
22 A 4
23 A 3
24 A 2
25 A 1
26 A 0

You might also like