You will receive access to a new repository with the initial API design from another team. Your task is to review it. This task is done individually, which means that you will receive two reviews for your own design.
The task is split into two parts. In the first part, you are expected to create an (additional) example application using the provided API. In the second part, you are expected to summarize your API review in several paragraphs of text (not a bullet list).
Implement a skeleton of the numactl
command (see man page for details).
Keep in mind that the purpose of the task is learning the new API,
numactl features. Your skeleton application
is therefore expected to say what it would be doing, not actually do it,
just like in the following example:
args = ... // configure the arguments args.parse(argv) if args.has("--show"): printf("policy: default"); print("...") elif args.has("--hardware"): printf("available: 2 nodes (0-1)"); print("...") elif: printf("will run %s", args.get_command()) printf("CPU node bind: %s", args.get("-C").join(",")) ...
numactl skeleton must support the following invocation styles:
- Without any parameters, the program should print help.
- Given the
--hardwareswitch, it should emulate printing the current hardware configuration.
- Given the
--showswitch, it should emulate printing the current NUMA policy.
- Given options
-C, it should emulate running another program with the modified NUMA policy.
See slides for further examples.
Your review should adhere to the following (rough) outline:
Overall impression (1-2 paragraphs).
Here you should summarize the basic concepts provided by the library, check whether the API is reasonably comfortable and documented, and find out what the library can/cannot do in the context of the
task-1requirements. At this point, you should not (need to) discuss low-level technical details.
Writing numactl (1-2 paragraphs).
Here you should describe whether and how the concepts required to implement the
numactlexample match the concepts offered by the library. Point out what was easy (conceptual match), difficult (conceptual mismatch but workaround possible), or impossible to implement with the help of the library.
Here you should provide detailed comments on specific issues (or highlights). The checklist from slides provides a few guiding questions to aid in systematic API exploration.
Submit your work (the
numactl snippet and the comments) in a
single markdown text file placed in the root directory of
the master branch of your repository and name it
Tag the final commit using the