Minix

Wichtige NR's

NR_REGS
NR_SEGS
NR_TASKS
NR_PROCS
NR_PROCS
NR_HOLES

Wichtige Strukturen

struct mem_map {
    vir_clicks mem_vir;
    phys_clicks mem_phys;
    vir_clicks mem_len;
};

EXTERN struct proc {
    int p_reg [NR_REGS];
    ...
    struct mem_map [NR_SEGS];
    ...
} proc [NR_TASKS + NR_PROCS];

PRIVATE struct hole {
    phys_clicks h_base;
    phys_clicks h_len;
    struct hole *h_next;
} hole [NR_HOLES];

        typedef     unsigned        vir_bytes;
        typedef     unsigned        vir_clicks;
        typedef     long            phys_bytes;
        typedef     unsigned        phys_clicks;
        typedef     int             signed_clicks;

Wichtig

  1. Kernel
  2. Memory Manager
  3. File System, Dateisystem

kernel
mm
fs

h
kernel
mm
fs

h
    h/const.h
    h/callnr.h
    h/com.h
    h/error.h
    h/sgtty.h
    h/signal.h
    h/stat.h
    h/type.h
kernel
    kernel/const.h
    kernel/glo.h
    kernel/proc.h
    kernel/type.h
    kernel/main.c
    kernel/mpx88.s
    kernel/klib88.s
    kernel/proc.c
    kernel/memory.c
    kernel/floppy.c
    kernel/clock.c
    kernel/tty.c
    kernel/system.c
mm
    mm/const.h
    mm/glo.h
    mm/mproc.h
    mm/param.h
    mm/type.h
    mm/main.c
    mm/forkexit.c
    mm/exec.c
    mm/break.c
    mm/signal.c
    mm/getset.c
    mm/alloc.c

fs

h
    h/const.h
    h/callnr.h
    h/com.h
    h/error.h
    h/sgtty.h
        Datenstrukturen fuer IOCTL
            struct sggtyb {...}
            struct tchars {...}
    h/signal.h
        NR_SIGS
        N_SIGS
        SIGHUP
        SIGINT
        SIGQUIT
        SIGILL
        SIGTRAP
        SIGIOT
        SIGEMT
        ...
        SIGKILL
        ...
        SIGPIPE
        SIGSYS
        SIGALARM
        SIGTERM
    h/stat.h
    h/type.h
        typedef     unsigned        vir_bytes;
        typedef     unsigned        vir_clicks;
        typedef     long            phys_bytes;
        typedef     unsigned        phys_clicks;
        typedef     int             signed_clicks;
kernel
    kernel/const.h
        NR_REGS
        ES_REG
        DS_REG
        CS_REG
        SS_REG
        Interrupt Vektoren: DIVIDE_VECTOR, CLOCK_VECTOR, KEYBOARD_VECTOR, FLOPPY_VECTOR
        PIC 8259A
    kernel/glo.h
    kernel/proc.h
    kernel/type.h
    kernel/main.c
        main ()
        unexpected_int ()
        trap ()
        div_trap ()
        panic ()
        set_vec (vec_nr, addr, base_click)
    kernel/mpx88.s
        MINIX
        s_call
        tty_int
        lpr_int
        disk_int
        wini_int
        clock_int
        suprise
        trp
        divide
        save
        restart
        idle
        data
    kernel/klib88.s
        phys_copy
        cp_mess
        port_out
        port_in
        lock
        unlock
        restore
        build_sig
        csv
        cret
        get_chrome
        dma_read
        vid_copy
        get_byte
        reboot
        wreboot
    kernel/proc.c
        sys_call
        interrupt
        ready
        unready
        sched
        mini_send
        pick_proc
    kernel/memory.c
        mem_task
        do_mem
        do_setup
    kernel/floopy.c
        floppy_task
        do_rdwt
        dma_setup
        start_motor
        stop_motor
        seek
        transfer
        fdc_results
        fdc_out
        recalibrate
        reset
        clock_mess
        send_mess
    kernel/clock.c
        clock_task
        do_setalarm
        do_get_time
        do_set_time
        do_clock_tick
        accounting
        init_clock
    kernel/tty.c
        tty_task // Hauptroutine
        do_charint
        in_char
        make_break
        echo
        chuck
        do_read
        rd_chars
        finish
        do_write
        do_ioctl
        do_cancel
        tty_reply
        sigchar
        keyboard
        console
        out_char
        scroll_screen
        flush
        move_to
        escape
        set_6845
        beep
        tty_init
        putc
        func_key
    kernel/system.c
        sys_task
        do_fork
        do_newmap
        do_exec
        do_xit
        do_getsp
        do_times
        do_abort
        do_sig
        do_copy
        cause_sig
        inform
        umap
mm
    mm/const.h
    mm/glo.h
    mm/mproc.h
    mm/param.h
    mm/type.h
    mm/main.c
        main
        get_work
        reply
        mm_init
        do_brk2
        set_map
    mm/forkexit.c
        do_fork
        do_mm_exit
        mm_exit
        do_wait
        cleanup
    mm/exec.c
        do_exec
        read_header
        new_mem
        patch_ptr
        load_seg
    mm/break.c
        do_brk
        adjust
        size_ok
        stack_fault
    mm/signal.c
        do_signal
        do_kill
        do_ksig
        check_sig
        sig_proc
        do_alarm
        set_alarm
        do_pause
        unpause
        dump_core
    mm/getset.c
        do_getset
    mm/alloc.c
        alloc_mem
        free_mem
        del_slot
        merge
        max_hole
        mem_init
fs