previous: >>108565168
#define __NR_sched_setparam 142
#define __NR_sched_getparam 143
#define __NR_sched_setscheduler 144
#define __NR_sched_getscheduler 145
#define __NR_sched_get_priority_max 146
#define __NR_sched_get_priority_min 147
#define __NR_sched_rr_get_interval 148
#define __NR_sched_setattr 314
#define __NR_sched_getattr 315
https://man7.org/linux/man-pages/man7/sched.7.html
tl;dr:
process scheduling!
note that i'm skipping over get/setaffinity, since they're imo distinct enough to warrant their own thread
now *surely* this is a subject on which /g/ has opinions, right? everyone's taken an OS course if they've studied CS, and most all of those at least attempt to force you to play around with different scheduling algorithms (especially the round robin classic). so let's hear what you have to say on the matter!
looking at it now, the sched(7) manpage is actually pretty well-written. i wish i hadn't been scared off by manpages back when i was in university. a lot of times, reading them or the kernel source itself can be more enlightening than any textbook. depends on the subject, though, i guess
personally, i honestly didn't enjoy mucking about with scheduling algorithms. i was never a huge fan of algorithms in general :') but learning about it (and really, more so than just scheduling, the fundamentals of operating systems) was suuuper helpful as a foundation for learning basically everything else i know now
this is maybe a bit outside the normal scope of these threads, but i'll be nice and throw out an especially helpful resource for those of you who are interested in learning more: https://www.youtube.com/@Udacity/courses
don't want to come across as a shill or anything, but it's totally free (it's effectively just a video playlist... dunno why they're organized in this weird way), and some of them are *really* good. if you've enjoyed these threads so far and want to learn more, i'd strongly recommend taking a peek at the playlists available here and checking out some of the relevant ones. obviously the "developing scalable apps with java" course is going to be slightly less useful to you than "advanced operating systems parts 1-4"...
bonus activity: tag urself (me in the top right)
relevant resources:
man man
man syscalls
https://man7.org/linux/man-pages/
https://linux.die.net/man/
https://elixir.bootlin.com/linux/
https://elixir.bootlin.com/musl/
https://elixir.bootlin.com/glibc/