Questions tagged [minix]

is a Unix-like computer operating system based on a microkernel architecture created by Andrew S. Tanenbaum for educational purposes.

MINIX is a Unix-like computer operating system based on a microkernel architecture created by Andrew S. Tanenbaum for educational purposes; MINIX also inspired the creation of the Linux kernel.

MINIX (from "mini-Unix") was first released in 1987, with its complete source code made available to universities for study in courses and research. It has been free and open source software since it was re-licensed under the BSD license in April 2000.

Sizeable subset of Minix source code is also published in the book by its creator Design and Implementation of Operating Systems.

230 questions
1
vote
1 answer

Reading wave files for mono conversion (Minix 3)

I'm about to start working on a project for Minix 3 (in C). My idea is to create some kind of a music player. I want to be able to read files (WAV) and then convert them to a stream of frequencies send to the Timer 2. Since, has far as I know, there…
ikyr9999
  • 115
  • 1
  • 1
  • 6
1
vote
2 answers

How to understand stdio.h are different on different operating systems

First of all, I am talking about UNIX-like systems. I look at the definition of the "FILE" struct at Mac OS, Linux, Minix and K&R C book, they are all different. In K&R C book, it is quite clear typedef struct _iobuf{ int cnt; char *ptr; …
Alfred Zhong
  • 6,773
  • 11
  • 47
  • 59
1
vote
0 answers

exec(gencat) failed (No such file or directory)

I'm trying to compile the source code of Minix 3.3.0 OS and I got troubles as following. make[5]: exec(gencat) failed (No such file or directory) *** Error code 1 Stop. make[5]: stopped in /usr/src/lib/libc *** Error code 1 …
XDxc-cuber
  • 11
  • 1
1
vote
1 answer

MINIX doesn't take advantage of x86 task switching, right?

I'm studying MINIX book version (3.1.0) source code and found MINIX 3 doesn't use the cpu's task switching function, instead it just performs a normal iret without NT flag being set. Is that right? _restart: ! Restart the current process or the…
d0nt18
  • 33
  • 3
1
vote
0 answers

Linker Complains Undefined Reference Under MINIX3.2.1

As you may imagine, it's a homework of Operating Systems and I'm asked to add function key Shift+F7 to show the number of running process. I read the source code of command ps on GitHub (MINIX version 3.2.1) and try to implement a function that can…
citrate
  • 189
  • 1
  • 1
  • 8
1
vote
1 answer

How can I print file path in C inside Minix OS?

I have to edit the exec syscall inside the Minix OS, in a way that every process created by it should print the program file path + program name: for example, if I type ls inside the terminal, the next line should show me path/to/ls/ls always in…
Gabomfim
  • 29
  • 6
1
vote
1 answer

Adding new system call to utility.c in Minix

I am trying to implement a system call in Minix and I'm having trouble understanding where I need to go. This is the system call I need to add which returns 0 on success and -1 on failure while also returning a+b, a-b, and a*b: int mycall(int a, int…
Josh Brown
  • 47
  • 1
  • 9
1
vote
2 answers

Printf not replacing format string parameters

I'm trying to do a homework assignment involving modifying some kernel code in minix and i'm having the strangest issue i've ever seen. I'm modifying alloc.c on the pm server (for those of you familiar with minix) and i've added a global variable to…
Ring
  • 2,249
  • 5
  • 27
  • 40
1
vote
1 answer

Adding custom flag to CAT command in MINIX

I am trying to modify cat command in MINIX 3.2.1, and I am having some problems with it. I want to add -H flag, so that when it is used, file name is printed before its contents. I have added some code in cat.c (referring to original lines'…
BEEET Hvcw
  • 49
  • 4
1
vote
2 answers

Function pointers pointing to fixed addresses

I was looking through the MINIX 3 headers and in include/signal.h there was some seemingly unusual definitions: /* Macros used as function pointers */ #define SIG_ERR ((sig_handler_t) -1) /* error return */ #define SIG_DFL ((sig_handler_t) 0) …
nanoman
  • 341
  • 4
  • 11
1
vote
0 answers

Minix 3.2 Kernel Call to access on CPU registers

I am minix developer beginner. I want to work on the MCE (machine check Exception) in minix. I read and applied the tutorials to make system calls and kernel calls but so far I haven't encountered any documentation on kernel calls that read…
hfmlcode
  • 11
  • 3
1
vote
1 answer

How is the global descriptor table copied in MINIX assembly code (x86)

This code in MINIX 3 copies boot monitor's (bootstrap) GDT to the Kernel space and switches over it. But I'm having a hard time understanding the code. In the code, _gdt is the address of an array of descriptor tables declared in C…
Suvrat Apte
  • 161
  • 10
1
vote
0 answers

MINIX 3 - server print information

I am trying to modify the sched server and have been attempting to have it print out some information to stdout or stderr but without luck. I tried printf, fprintf, sprintf, puts, fputs. Any ideas on how I should do this? I am starting to think that…
m_highlanderish
  • 499
  • 1
  • 6
  • 16
1
vote
1 answer

How to add code to MINIX bootloader?

I want MINIX to first execute my code and then continue with executing default bootloader. What I have so far is: org 0x7c00 jmp 0:start start: mov ax, cs mov ds, ax mov es, ax mov ss, ax mov sp,…
Jecke
  • 239
  • 2
  • 13
1
vote
2 answers

Loading old bootloader in assembly x86

I am writing my own bootloader in NASM x86 on x86_64 architechture, for starters I am just trying to copy the existing bootloader into second sector by using dd, then copy it back and run it from assembly. file.asm org 0x7c00 jmp…
MWaw
  • 144
  • 1
  • 2
  • 11