diff --git a/src/lescrampte/corr/42sh/index.pdf b/src/lescrampte/corr/42sh/index.pdf new file mode 100644 index 0000000..a5db02d Binary files /dev/null and b/src/lescrampte/corr/42sh/index.pdf differ diff --git a/src/lescrampte/corr/Intra Projects Learn2Slither Edit.html b/src/lescrampte/corr/Intra Projects Learn2Slither Edit.html new file mode 100644 index 0000000..74fd303 --- /dev/null +++ b/src/lescrampte/corr/Intra Projects Learn2Slither Edit.html @@ -0,0 +1,688 @@ + + + + + + + + + + + + + + + +Intra Projects Learn2Slither Edit + + + + + + + + + +
+ +
+ + + + + + +
+ +
+
+
+
+ +
+
+
+ +
+
+
+

Mandatory Part

+

+
+

Error Management

+

+

    +
  • During the defense, as soon as you need help verifying a point, the student +evaluated must help you.
  • +
  • If the language used is Python you must check the norm (use the flag if there's a norm error) +pip install flake8 +alias norminette_python=flake8 +norminette_python "student's project directory"
  • +
+ +

+
+ + +
+ + + + +
+
+

Part 1 Environment/Board

+

+

Does the board resemble a game of Snake?
+You can start a training session with a new model to verify.

+ +

Check the board rules:
+ • Board size: 10 by 10.
+ • Two green apples in a random cell.
+ • One red apple in a random cell.
+ • The snake starts with a length of 3 cells and randomly placed.
+ • If the snake hits a wall: Game over.
+ • If the snake collides with its own tail: Game over.
+ • The snake eats a green apple: increase snake's length by 1 and place a new green apple.
+ • The snake eats a red apple: decrease snake's length by 1 and place a new red apple.
+ • If the snake’s length drops to 0: Game over.
+(Verify the main rules; some, like dying by eating only red apples, are difficult to test).

+ +

The board's speed should be appropriate for human observation.

+ +

+
+ + +
+ + + + +
+
+

Part 2 State

+

+

The agent's vision (snake's head) should be displayed on the terminal with each movement of your snake.

+ +

The student should be able to demonstrate in their code that only the + vision of the snake's head is provided to the agent (the AI making +decisions).
+If more information than just the state is sent to the agent, you must set the "Forbidden function" flag.
+You are encouraged to review the subject thoroughly to fully understand which data is expected.

+ +

+
+ + +
+ + + + +
+
+

Part 3 Action

+

+

The agent must make choices between (UP, LEFT, DOWN, RIGHT), and display the choice in the terminal.
+The snake should move on the board accordingly.

+ +

+
+ + +
+ + + + +
+
+

Part 4 Rewards

+

+

The student should be able to show you a training session where the snake eats apples.
+They should also be able to explain how the rewards work
+and the points given for each type of action:

+ +

• Eating a green apple
+ • Eating a red apple
+ • Snake's death
+ • ...

+ +

+
+ + +
+ + + + +
+
+

Part 5 Q-learning

+

+

The student should be able to explain the Q-value and how they calculate it.
+Only a Q-table or a Neural Network is allowed.
+Use the "Forbidden function" tag/flag if any other model is used.
+The implemented algorithm includes some random from time to time.

+ +

+
+ + +
+ + + + +
+
+

Features and structure

+

+

Control that the remaining features are implemented:

+ +
    +
  • it is possible to train your model with a defined set of training sessions
  • +
  • it is possible to import and export models before and after a series of training sessions, and +multiple models with various training levels exist in the repository.
  • +
  • it is possible to simply use a model without training it, for verification purposes
  • +
  • a session can be carefully studied using the step-by-step flag. +Verify also that the suggested architecture is present, or eventually a more suitable and/or efficient one.
  • +
+ +

+
+ + +
+ + + + +
+
+

Testing trained models

+

+

Launch a few rounds with the best "backup" of the model (multiple ones are allowed, using
+various parameters in the Q learning). Use the "non-training" switch, to keep the model
+untouched.
+Is the snake's length equal to or greater than 10 at the end of a session?
+(The snake must have eaten 7 green apples, for example, without eating any red apples.)
+This should happen more than 50% of the time with at least one model.

+ +

+
+ + +
+ + + + +
+
+
+
+
+
+

Bonus part

+

Evaluate the bonus part if, and only if, the mandatory part has been entirely and perfectly done. +In case all the mandatory points were not passed during the defense, bonus points must be totally ignored. +

+
+

Bonus Length test

+

+

Launch a few rounds with the best "backup" of the model.
+You should award one point for every 5 units of length.
+For example:
+ • < 15 = 0 point
+ • 15 <= x < 20 = 1 point
+ • 20 <= x < 25 = 2 point
+ • 25 <= x < 30 = 3 point
+ • 30 <= x < 35 = 4 point
+ • => 35 = 5 points (you can give the "Outstanding project" flag in case of success in this test)

+ +

+
+ + +
Rate it from 0 (failed) through 5 (excellent)
+
+
+
+

Bonus Part 1

+

+

Is the board visually appealing, with starting and ending interfaces showing the score?

+ +

+
+ + +
+ + + + +
+
+

Bonus Part 2

+

+

If the board size is modified using the same model file,
+the snake should be able to continue playing without issues.
+If the snake cannot achieve a minimum length of 7 for a map size between 8x8 and 15x15 (not 10x10),
+this bonus should not be accepted.

+ +

+
+ + +
+ + + + +
+
+
+
+
+
+

Ratings

+

Don’t forget to check the flag corresponding to the defense

+
+ + +
+
+ + + + + + + +
+
+ +
+
+

Conclusion

+ +
+

Leave a comment on this evaluation ( 2048 chars max )

+ + +
+ +
+
+ +
+
+ +
+
+ + + +
+
+
+ + + +
+ + + + + + + + + + + diff --git a/src/lescrampte/corr/Intra Projects ft_linux Edit.html b/src/lescrampte/corr/Intra Projects ft_linux Edit.html new file mode 100644 index 0000000..6da0721 --- /dev/null +++ b/src/lescrampte/corr/Intra Projects ft_linux Edit.html @@ -0,0 +1,699 @@ + + + + + + + + + + + + + + + +Intra Projects ft_linux Edit + + + + + + + + + +
+ +
+ + + + + + +
+ +
+
+
+
+ +
+
+
+ +
+
+
+

Basics

+

+
+

Linux Kernel

+

+

Is the kernel a Linux one ? (If the kernel is a BSD, the scale
+stops here, if it's a DOS one, burn the student alive, kill his
+entire family, and grade -42.)

+ +

+
+ + +
+ + + + +
+
+

Linux Version

+

+

Is the Linux kernel version >= 4.0?

+ +

Check that the source code located in /usr/src/linux-<version> matches a kernel version >= 4.0.

+ +

Check the kernel version in the logs. It should include the student’s login, e.g.:
+Linux version <version>-<student_login>

+ +

+
+ + +
+ + + + +
+
+

Partitions

+

+

Is there at least 3 partitions on the system ? (root, /boot,
+swap)

+ +

+
+ + +
+ + + + +
+
+

Kernel Module loader

+

+

Is there a module loader on the system ? (udev like)

+ +

+
+ + +
+ + + + +
+
+

Bootloader

+

+

Is there a bootloader ? (LILO / GRUB / ...)

+ +

Check the kernel binary name in /boot. Must be something like
+vmlinuz-<linux_version>-<student_login>

+ +

+
+ + +
+ + + + +
+
+

Daemon manager

+

+

Is there a daemon manager ? (SysV, SystemD, ...)

+ +

+
+ + +
+ + + + +
+
+
+
+
+
+

Binaries

+

+Installed binaries +

+
+

Basic Linux tools

+

+

Test the script ft_linux_basic.sh, available at the top of the
+correction page. If the score is not perfect, the scale stop
+here.

+ +

+
+ + +
+ + + + +
+
+

Other binaries

+

+

Test the following script ft_linux_others.sh, available at the
+top of the correction page. Report the score below

+ +

+
+ + +
Rate it from 0 (failed) through 5 (excellent)
+
+
+
+

Editor

+

+

Test if an editor is present on the system. (More points if it's
+vim :D)

+ +

+
+ + +
+ + + + +
+
+
+
+
+
+

The interweb

+

+
+

Internet connection

+

+

Internet working ? (Net module + ping / curl / ...)

+ +

+
+ + +
+ + + + +
+
+
+
+
+
+

The real test

+

+
+

screen

+

+

Now the real test.

+ +

Ask the student to install the screen package. The package can
+be found
+Here.

+ +

If the student can't install the package the evaluation stop
+here, grade 0.

+ +

+
+ + +
+ + + + +
+
+
+
+
+
+

Bonus

+

+
+

Bonus Binaries

+

+

Time to make your demo ! Present your distribution, and the
+software on it. Bonus point for X Applications (Windows Manager,
+X Server)

+ +

+
+ + +
Rate it from 0 (failed) through 5 (excellent)
+
+
+
+
+
+
+
+

Ratings

+

Don’t forget to check the flag corresponding to the defense

+
+ + +
+
+ + + + + + + + +
+
+ +
+
+

Conclusion

+ +
+

Leave a comment on this evaluation ( 2048 chars max )

+ + +
+ +
+
+ +
+
+ +
+
+ + + +
+
+
+ + + +
+ + + + + + + + + + + \ No newline at end of file diff --git a/src/lescrampte/corr/Intra Projects ft_minecraft Edit.pdf b/src/lescrampte/corr/Intra Projects ft_minecraft Edit.pdf new file mode 100644 index 0000000..8c08b17 Binary files /dev/null and b/src/lescrampte/corr/Intra Projects ft_minecraft Edit.pdf differ diff --git a/src/lescrampte/corr/Intra Projects h42n42 Edit.html b/src/lescrampte/corr/Intra Projects h42n42 Edit.html new file mode 100644 index 0000000..baafce1 --- /dev/null +++ b/src/lescrampte/corr/Intra Projects h42n42 Edit.html @@ -0,0 +1,679 @@ + + + + + + + + + + + + + + + +Intra Projects h42n42 Edit + + + + + + + + + +
+ +
+ + + + + + +
+ +
+
+
+
+ +
+
+
+ +
+
+
+

Playability and respect of the guidelines

+

+This part will evaluate the mandatory part of the subject and check that +all the points required by the subject are valid. +

+
+

Creatures movements

+

+

Creatures movements must be smooth and realistic (rebounds in particular).
+There should be no creature outside the play area, even the berserk when
+they're close to the edge. Creatures must be able to go to the edges of
+the terrain.

+ +

+
+ + +
+ + + + +
+
+

Contamination

+

+

Sick creatures must disappear after a while. (1 point) Touch
+contamination with the river or a sick creature must be
+implemented. (2 points) Distance calculation must be accurate
+(no contamination without touch, potential contamination if
+touch). (2 points)

+ +

+
+ + +
Rate it from 0 (failed) through 5 (excellent)
+
+
+
+

Berserk and mean creatures

+

+

Some sick creatures will go berserk. They grow bigger, thus increasing the
+risk of touching another creature. (2 points) Berserk size must be taken
+into account in the contamination's calculation. (1 point) Some sick
+creatures must get mean. They run after the healthy creatures to
+contaminate them. (2 points)

+ +

+
+ + +
Rate it from 0 (failed) through 5 (excellent)
+
+
+
+

Hospital

+

+

When sick creatures are taken to the hospital, they must be healed when
+they get out.

+ +

+
+ + +
+ + + + +
+
+

Game

+

+

The difficulty must evolve and the game must be playable.(2
+points) No new creature should spawn if there is no healthy creature
+left.(3 points)

+ +

+
+ + +
Rate it from 0 (failed) through 5 (excellent)
+
+
+
+
+
+
+
+

Technical points

+

+
+

Competition

+

+

Each creature will be animated by a LWT thread, excluding any kind of
+competition (don't use a Javascript function like setTimeout in
+particular). Creature movement must be smooth(not jerky).

+ +

+
+ + +
+ + + + +
+
+

Handling HTML

+

+

Each creature must be an HTML element. All the dynamically
+generated elements of the page should be thanks to the TyXML
+library (Eliom_content.Html5 for instance).

+ +

+
+ + +
+ + + + +
+
+

Interacting with the DOM

+

+

When there's no more creature on the map, a message must appear,
+indicating the game is over.

+ +

+
+ + +
+ + + + +
+
+

Mouse events

+

+

The mouse events must be exclusively programmed with the Lwt_js_events
+library. Creatures should be easily movable and dropped anywhere in the
+page. Test the creature drop out of the game area and out of the window.

+ +

+
+ + +
+ + + + +
+
+
+
+
+
+

Bonus

+

+Bonus will be taken into account only if the mandatory part is PERFECT. +Perfect means it showed no error or random behavior during the test and the +evaluation. +

+
+

Grapnic design

+

+

The game is graphically pleasant. For instance:

+ +
    +
  • Each different type of creature show a specific graphic detail that +sets them apart.
  • +
  • The game environment is consistently and pleasantly stylised.
  • +
  • Etc.
  • +
+ +

+
+ + +
+ + + + +
+
+

Curseurs

+

+

A form allows to set the different parameters of the game. Overall,
+the assessed student has used cursors, radio knobs and check boxes to
+fix the game's and environment's parameters. Changing the form settings
+has a real impact on the game's environment.

+ +

+
+ + +
Rate it from 0 (failed) through 5 (excellent)
+
+
+
+

Effective collision detection

+

+

Ask the assessed student if the collision detection between
+the creatures has been optimized. Is it effectively implemented?
+Did the student use a quadtree type solution, for instance?

+ +

+
+ + +
+ + + + +
+
+
+
+
+
+

Ratings

+

Don’t forget to check the flag corresponding to the defense

+
+ + +
+
+ + + + + + + + +
+
+ +
+
+

Conclusion

+ +
+

Leave a comment on this evaluation ( 2048 chars max )

+ + +
+ +
+
+ +
+
+ +
+
+ + + +
+
+
+ + + +
+ + + + + + + + + + + \ No newline at end of file diff --git a/src/lescrampte/corr/Intra Projects krpsim Edit.html b/src/lescrampte/corr/Intra Projects krpsim Edit.html new file mode 100644 index 0000000..7a05d35 --- /dev/null +++ b/src/lescrampte/corr/Intra Projects krpsim Edit.html @@ -0,0 +1,811 @@ + + + + + + + + + + + + + + + +Intra Projects krpsim Edit + + + + + + + + + +
+ +
+ + + + + + +
+ +
+
+
+
+ +
+
+
+ +
+
+
+

Preliminaries

+

+
+

Basics

+

+

Let's look at the basic obligations:

+ +
    +
  • the entire group is here and on time.
  • +
  • the repo is complete.
  • +
  • it includes 3 elements: the krpsim program, the krpsim_verif program, +at least one of your own process files (several is better).
  • +
+ +

If one of the conditions has not been met, evaluation stops.

+ +

+
+ + +
+ + + + +
+
+

The swiss army lib

+

+

Make sure no module/library has been set to make the optimization job
+for you. You will be graded in regards of the time you've spent thinking
+about the subject, find answers by yourself and impplement your own
+solutions. This is not an integration project. If an external element is
+responsible for solving the problem, evaluation stops. The group goes
+back to work and tries harder this time.

+ +

+
+ + +
+ + + + +
+
+
+
+
+
+

Simple tests

+

+
+

Simple

+

+

We use simple tests, ideally provided with resources. But other
+kinds of tests are also fine. It's a simple chain, with a starting
+stock that is consumed and triggers processes one after the other.
+Does the krpsim reach the end of the process? Everytime? When you run
+the tests, keep in mind a short timeframe will give less opportunities to
+optimize or reach the objective. In contrast, a longer timeframe will
+make the objective more reachable (whether it's an accurate result or
+a better optimization) more often.
+You can run a test with the krpsim_verif, but this should
+not be necessary for these simple tests. Your own process description
+files must, depending on their natures and difficulties, be used for the
+sections/questions that suit them best.

+ +

+
+ + +
+ + + + +
+
+

Simple returns

+

+

Using the same process file, do you always reach the end in the minimum
+time? Everytime? Minimum time must logically be the simple addition of
+each process duration (since it's a simple process chain).

+ +

+
+ + +
+ + + + +
+
+

Ikea

+

+

Now, let's try an Ikea type configuration. Once again, it's better
+if there's a little more than an Ikea file. The goal, here, is to repeat
+and/or parallelize some actions to reach the objective. The stock should
+be used wisely to get all the necessary elements. There are only two
+stairs of process (all the stocks' possible paths from beginning to end
+include no more than 2 processes). Do we get the result each time (even
+if it's not completely accurate, once again)?

+ +

+
+ + +
+ + + + +
+
+

Ikea also returns

+

+

Is the time taken to reach the goal of Ikea (or any other similar file)
+otipimized? => ikea is achieved in 50 cycles for instance.

+ +

+
+ + +
+ + + + +
+
+

More complicated

+

+

This time, test a simple configuration containing at least one dead
+branch that consumes one resource (and cripples or stops the goal's
+achievement). Does it work? Do we reach the goal each time or so?

+ +

+
+ + +
+ + + + +
+
+

Fancy steak?

+

+

Test the steak file. If your krpsim is right, it should cook the whole
+thing in 30 sec every time.

+ +

+
+ + +
+ + + + +
+
+
+
+
+
+

Checking errors

+

+
+

syntax error

+

+

A file with misformed process/stock/optim: an error is displayed every
+time.

+ +

+
+ + +
+ + + + +
+
+

Missing parts

+

+

Are there any missing parts in te process description file ?

+ +

+
+ + +
+ + + + +
+
+

krpsim_verif

+

+

Make sure the krpsim_verif program displays an error message when the
+tranmitted file is not right. Also make sure the krpsim_verif displays
+an error message when the transmitted file contains an action made
+impossible because of the stock condition in the cycle in question.
+Finally, does the krpsim_verif indicate that everything is OK if it is
+so with a data tracing?

+ +

+
+ + +
+ + + + +
+
+
+
+
+
+

Open processes

+

+
+

non-stop

+

+

Test the "recre" configuration or any other simple process file that's
+self-sustained. There must be potential blocking situations, occurences
+where no process can be executed, that your krpsim should know how to
+avoid (as always, the more time it has, the better he will optimize the
+goal in order to avoid those blockings).

+ +

+
+ + +
+ + + + +
+
+

Performance

+

+

Is the performance better if you're playing with the timeframe offered
+to the program? (if the group can explain the performance is already
+optimized and they cannot do better, it's fine).

+ +

+
+ + +
+ + + + +
+
+

Bigger

+

+

Test with "apple" or any other process complex description, containing
+dead branches, loops (like the eggs), potential blocking situations... well,
+a lot of difficulties, that is :) Check with the assessor. Check with
+the controller.

+ +

+
+ + +
+ + + + +
+
+
+
+
+
+

Bonus

+

+
+

Performance

+

+

If you have already made this project, use your own krpsim to compare
+performances, for instance. Otherwise, here is a possible performance
+scale for apple after 50000 cycles:

+ +
    +
  • less thant 50 000 euros (no box sold) : 0pt
  • +
  • up to 100 000 euros
  • +
  • up to 200 000 euros
  • +
  • up to 500 000 euros
  • +
  • up to 1M euros
  • +
  • higher than 1M euros : 5pt. This scale will probably change along with +the evaluation and the various projects' results.
  • +
+ +

+
+ + +
Rate it from 0 (failed) through 5 (excellent)
+
+
+
+
+
+
+
+

Ratings

+

Don’t forget to check the flag corresponding to the defense

+
+ + +
+
+ + + + + + + + +
+
+ +
+
+

Conclusion

+ +
+

Leave a comment on this evaluation ( 2048 chars max )

+ + +
+ +
+
+ +
+
+ +
+
+ + + +
+
+
+ + + +
+ + + + + + + + + + + \ No newline at end of file diff --git a/src/lescrampte/corr/Intra Projects malloc Edit.html b/src/lescrampte/corr/Intra Projects malloc Edit.html new file mode 100644 index 0000000..2a3601c --- /dev/null +++ b/src/lescrampte/corr/Intra Projects malloc Edit.html @@ -0,0 +1,950 @@ + + + + + + + + + + + + + + + +Intra Projects malloc Edit + + + + + + + + + +
+ +
+ + + + + + +
+ +
+
+
+
+ +
+
+
+ +
+
+
+

Preliminaries

+

+
+

Preliminary tests

+

+

First check the following elements :

+ +
    +
  • There is something in the git repository
  • +
  • A Makefile is present and has all the requested rules
  • +
  • No cheating (unauthorized functions...)
  • +
  • 2 globals are authorised : one to manage the allocations, and +one to manage the thread-safe
  • +
+ +

If an element of this list isn't respected, the grading ends.
+Use the appropriate flag. You're allowed to debate some more
+about the project, but the grading will not be applied.

+ +

+
+ + +
+ + + + +
+
+

Library compilation

+

+

First we will check that the compilation of the library does
+generate the requested files by modifying HOSTTYPE:

+ +
$> export HOSTTYPE=Testing
+$> make re
+********
+$> ln -s libft_malloc_Testing.so libft_malloc.so
+$> ls -l libft_malloc.so
+lrwxrwxrwx 1 ** ** ** ** ** ** libft_malloc.so -> libft_malloc_Testing.so
+$>
+
+ +

The Makefile does use HOSTTYPE to define the name of the library
+(libft_malloc_$HOSSTYPE.so) and does create a symbolic link
+libft_malloc.so pointing towards libft_malloc_$HOSSTYPE.so ?

+ +

If that's not the case, the defense stops.

+ +

+
+ + +
+ + + + +
+
+

Functions export

+

+

Check with nm that the library does export the functions malloc,
+free, realloc and show_alloc_mem.

+ +
$> nm -g libft_malloc.so
+0000000000000000 T _free
+0000000000000000 T _malloc 
+0000000000000000 T _realloc 
+0000000000000000 T_show_alloc_mem 
+                 U _mmap 
+                 U _munmap 
+                 U _getpagesize (getpagesize under OSX or sysconf(_SC_PAGESIZE) under linux)
+                 U _write  
+$>
+
+ +

The functions exported by the library are marked with a T, the
+used one with a U (adresses have been replaced by 0, they change
+from one library to the next, same as the order of the lines).

+ +

If the functions are not exported, defense stops.

+ +

+
+ + +
+ + + + +
+
+
+
+
+
+

Feature's testing

+

+Please find the attached (MacOS X or Linux) script that will +only modifiy the environment variables while you run a test program. +

+
+

Malloc test

+

+

We are first going to make a first test program that does not
+use malloc, so that we have a base to compare to.

+ +

Use test0.c file attached in the scale
+WARNING: If you are using a linux vm, make sure that you are using the
+time binary that you can get with apt (sudo apt install time), else
+you won't have access to the -v option.

+ +

MAC:

+ +
  $> gcc -o test0 test0.c && /usr/bin/time -l ./test0 
+
+ +

LINUX:

+ +
  $> gcc -o test0 test0.c && /usr/bin/time -v ./test0
+
+ +

We will then add a malloc and write in each allocation to make
+sure that the memory page is allocated in physical memory by
+MMU. The system will only really allocate the memory of a page
+if you write in it, so even if we do a bigger mmap than the
+malloc request it won't modify the "page reclaims".

+ +

For Linux => Major, Minor

+ +

For Mac OS X => page reclaims, page faults

+ +

Using the test1.c file given as attachment, run the following tests
+MAC:

+ +
  $> gcc -o test1 test1.c && /usr/bin/time -l ./test1
+
+ +

LINUX:

+ +
  $> gcc -o test1 test1.c && /usr/bin/time -v ./test1
+
+ +

Our test1 program requested 1024 times 1024 bytes, so 1Mbyte. We
+can therefore check by doing the difference with the test0
+program:

+ +
    +
  • either between the "maximum resident set size" lines, we +obtain a little more than 1Mbyte
  • +
  • or between the page reclaims lines that we will multiply by +the value of getpagesize(3) under OSX or sysconf(_SC_PAGESIZE) under linux.
  • +
+ +

Let's test now both programs with our library:

+ +

MAC:

+ +
$>chmod 777 run_mac.sh
+
+ +
$>./run_mac.sh /usr/bin/time -l ./test0
+  ********    
+  202  page reclaims
+  0  page faults
+  ********
+
+ +
$>./run_mac.sh /usr/bin/time -l ./test1
+  ********
+  525  page reclaims
+  0  page faults
+  ********
+$>
+
+ +
+ +

LINUX:

+ +
$>chmod 777 run_linux.sh
+
+ +
$>./run_linux.sh /usr/bin/time -v ./test0
+  ********    
+  Major (requiring I/O) page faults: 0
+  Minor (reclaiming a frame) page faults: 64
+  ********
+
+ +
$>./run_linux.sh /usr/bin/time -v ./test1
+  ********    
+  Major (requiring I/O) page faults: 0
+  Minor (reclaiming a frame) page faults: 323
+  ********
+
+ +
+ +

Count the number of pages used in addition to the real malloc and adjust the score accordingly:

+ +
    +
  • less pages than the real malloc, allocated memory is insufficiant: 0
  • +
  • 181 pages and over, malloc works but the +overhead is very too big: 1
  • +
  • between 91 pages and 180 pages, malloc works but the +overhead is too big: 2
  • +
  • between 51 pages and 90 pages, malloc works but the overhead +is very big: 3
  • +
  • between 21 pages and 50 pages than real malloc, malloc works but the overhead +is big: 4
  • +
  • between 0 pages and 20 pages than real malloc, malloc works and the overhead is +fine: 5
  • +
+ +

+
+ + +
Rate it from 0 (failed) through 5 (excellent)
+
+
+
+

Pre-allocated zones

+

+

Check inside the source code that the pre-allocated zones for
+the different malloc sizes allow to store at least 100 times the
+maximum size for this type of zone. Check also that the size of
+the zones is a multiple of getpagesize() under OSX or
+sysconf(_SC_PAGESIZE) under linux.

+ +

If one of these points is missing, click NO.

+ +

+
+ + +
+ + + + +
+
+

Tests of free

+

+

We will simply add a free to our test program:

+ +
$> cat test2.c 
+
+ +

We will compare the number of "page reclaims / page faults" to those in test0
+and test1. If there are as many or more "page reclaims" than
+test1, the free doesn't work.

+ +

MAC:

+ +
  $> gcc -o test2 test2.c && ./run_mac.sh /usr/bin/time -l ./test2
+
+ +

LINUX:

+ +
  $> gcc -o test2 test2.c && ./run_linux.sh /usr/bin/time -v ./test2
+
+ +

Does the free function? (less "page reclaims / page faults" than test1)

+ +

+
+ + +
+ + + + +
+
+

Quality of the free function

+

+

Run test0 and test2. Test2 should not have more than 10 page reclaims
+compared to test0.

+ +

+
+ + +
+ + + + +
+
+

Realloc test

+

+

Using test3.c file given as attachment, test the following:

+ +

MAC:

+ +
$> gcc -o test3 test3.c -L. -lft_malloc && ./run_mac.sh ./test3
+Hello world!
+Hello world!
+$>
+
+ +

LINUX:

+ +
$> gcc -o test3 test3.c -L. -lft_malloc && ./run_linux.sh ./test3
+Hello world!
+Hello world!
+$>
+
+ +

The test must print out "Hello world!" two times.

+ +

Does it work as expected?

+ +

+
+ + +
+ + + + +
+
+

Show_alloc_mem test

+

+

Using test4.c file given as attachment, test the following:

+ +

MAC:

+ +
$> gcc -o test4 test4.c -L. -lft_malloc && ./run_mac.sh ./test4
+$>
+
+ +

LINUX:

+ +
$> gcc -o test4 test4.c -L. -lft_malloc && ./run_linux.sh ./test4
+$>
+
+ +

Does the display corresponds the subject and the TINY/SMALL/LARGE
+allocation of the project?

+ +

+
+ + +
+ + + + +
+
+

Alignement test

+

+

Using test5.c file given as attachment, test the following:

+ +

MAC:

+ +
$> gcc -o test5 test5.c -L. -lft_malloc && ./run_mac.sh ./test5
+$>
+
+ +

LINUX:

+ +
$> gcc -o test5 test5.c -L. -lft_malloc && ./run_linux.sh ./test5
+$>
+
+ +

You have no alignment errors.

+ +

+
+ + +
+ + + + +
+
+
+
+
+
+

Bonus

+

+
+

Competitive access

+

+

The project manages the competitive access of the threads with
+the support of the pthread library and with mutexes.

+ +

Count the applicable cases:

+ +
    +
  • a mutex prevents multiple threads to simulteanously enter +inside the malloc function
  • +
  • a mutex prevents multiple threads to simulteanously enter +inside the free function
  • +
  • a mutex prevents multiple threads to simulteanously enter +inside the realloc function
  • +
  • a mutex prevents multiple threads to simulteanously enter +inside the show_alloc_mem function
  • +
+ +

+
+ + +
Rate it from 0 (failed) through 5 (excellent)
+
+
+
+

Additional bonuses

+

+

If there are more bonuses, grade them here. Bonuses must be 100%
+functional and a minimum useful. (up to the grader)

+ +

Bonus example:

+ +
    +
  • During a free, the projet "defragments" the free memory while +regrouping the available simultaneous blocks.
  • +
  • Malloc has debugging environnement variables
  • +
  • A function allows to make an hexadecimal dump of the allocated +zones
  • +
  • A fonction allows to display an history of the memory +allocations done.
  • +
  • If there are other bonuses, add them up here. Bonuses +must be 100% functional and a minimum useful (at the +corrector's discretion)
  • +
+ +

+
+ + +
Rate it from 0 (failed) through 5 (excellent)
+
+
+
+
+
+
+
+

Ratings

+

Don’t forget to check the flag corresponding to the defense

+
+ + +
+
+ + + + + + + + + +
+
+ +
+
+

Conclusion

+ +
+

Leave a comment on this evaluation ( 2048 chars max )

+ + +
+ +
+
+ +
+
+ +
+
+ + + +
+
+
+ + + +
+ + + + + + + + + + + \ No newline at end of file