Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

succ_reqs.awk write an awk script succ_reqs.awk that prints the number of bytes requested, and then a 1 or a 0 depending on whether the request

  1. succ_reqs.awk
    1. write an awk script succ_reqs.awk that prints the number of bytes requested, and then a 1 or a 0 depending on whether the request was successful (1 means success). Your program should act like this:
    2. $ awk -f succ_reqs.awk malloc-out.txt | tail -5

      8 0

      3 1

      5 1

      10 0

      6 1

************************ malloc.txt ******************************

ptr[403] = Alloc(3) returned 1001 (searched 45 elements)

Free List [ Size 44 ]: [ addr:1000 sz:1 ] [ addr:1004 sz:1 ] [ addr:1005 sz:1 ][ addr:1016 sz:5 ] [ addr:1021 sz:1 ] [ addr:1022 sz:5 ] [ addr:1027 sz:1 ] [ adr:1035 sz:1 ] [ addr:1036 sz:1 ] [ addr:1037 sz:2 ] [ addr:1039 sz:1 ] [ addr:106 sz:2 ] [ addr:1048 sz:3 ] [ addr:1051 sz:6 ] [ addr:1057 sz:1 ] [ addr:1058 sz1 ] [ addr:1069 sz:2 ] [ addr:1071 sz:6 ] [ addr:1077 sz:2 ] [ addr:1079 sz:1 ] addr:1095 sz:1 ] [ addr:1096 sz:1 ] [ addr:1097 sz:1 ] [ addr:1098 sz:2 ]

Free(ptr[403]) returned 0

Free List [ Size 45 ]: [ addr:1000 sz:1 ] [ addr:1001 sz:3 ] [ addr:1004 sz:1 ][ addr:1012 sz:4 ] [ addr:1016 sz:5 ] [ addr:1021 sz:1 ] [ addr:1022 sz:5 ] [ adr:1031 sz:4 ] [ addr:1035 sz:1 ] [ addr:1036 sz:1 ] [ addr:1037 sz:2 ] [ addr:105 sz:1 ] [ addr:1046 sz:2 ] [ addr:1048 sz:3 ] [ addr:1051 sz:6 ] [ addr:1057 sz7 ] [ addr:1068 sz:1 ] [ addr:1069 sz:2 ] [ addr:1071 sz:6 ] [ addr:1077 sz:2 ] addr:1088 sz:7 ] [ addr:1095 sz:1 ] [ addr:1096 sz:1 ] [ addr:1097 sz:1 ] [ add

ptr[404] = Alloc(4) returned 1012 (searched 45 elements)

Free List [ Size 44 ]: [ addr:1000 sz:1 ] [ addr:1001 sz:3 ] [ addr:1004 sz:1 ][ addr:1016 sz:5 ] [ addr:1021 sz:1 ] [ addr:1022 sz:5 ] [ addr:1027 sz:1 ] [ adr:1035 sz:1 ] [ addr:1036 sz:1 ] [ addr:1037 sz:2 ] [ addr:1039 sz:1 ] [ addr:106 sz:2 ] [ addr:1048 sz:3 ] [ addr:1051 sz:6 ] [ addr:1057 sz:1 ] [ addr:1058 sz1 ] [ addr:1069 sz:2 ] [ addr:1071 sz:6 ] [ addr:1077 sz:2 ] [ addr:1079 sz:1 ] addr:1095 sz:1 ] [ addr:1096 sz:1 ] [ addr:1097 sz:1 ] [ addr:1098 sz:2 ]

.

.

.

ptr[405] = Alloc(3) returned 1001 (searched 44 elements)

Free List [ Size 43 ]: [ addr:1000 sz:1 ] [ addr:1004 sz:1 ] [ addr:1005 sz:1 ][ addr:1021 sz:1 ] [ addr:1022 sz:5 ] [ addr:1027 sz:1 ] [ addr:1028 sz:1 ] [ adr:1036 sz:1 ] [ addr:1037 sz:2 ] [ addr:1039 sz:1 ] [ addr:1040 sz:1 ] [ addr:108 sz:3 ] [ addr:1051 sz:6 ] [ addr:1057 sz:1 ] [ addr:1058 sz:1 ] [ addr:1059 sz2 ] [ addr:1071 sz:6 ] [ addr:1077 sz:2 ] [ addr:1079 sz:1 ] [ addr:1080 sz:1 ] addr:1096 sz:1 ] [ addr:1097 sz:1 ] [ addr:1098 sz:2 ]

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Oracle RMAN For Absolute Beginners

Authors: Darl Kuhn

1st Edition

1484207637, 9781484207635

More Books

Students also viewed these Databases questions

Question

Compare and contrast common stock and preferred stock.

Answered: 1 week ago