Operating System - Implementation of Process MINIX 3 - Notes, Study notes of Operating Systems

In this document topics covered which are Implementation of Processes in MINIX 3, Layers of Minix in Source Code, MINIX Memory, Clocks, Clock Software, include/ansi.h.

Typology: Study notes

2010/2011

Uploaded on 09/01/2011

visir66
visir66 🇮🇳

4.4

(74)

97 documents

1 / 84

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Implementation of Processes in
MINIX 3
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17
pf18
pf19
pf1a
pf1b
pf1c
pf1d
pf1e
pf1f
pf20
pf21
pf22
pf23
pf24
pf25
pf26
pf27
pf28
pf29
pf2a
pf2b
pf2c
pf2d
pf2e
pf2f
pf30
pf31
pf32
pf33
pf34
pf35
pf36
pf37
pf38
pf39
pf3a
pf3b
pf3c
pf3d
pf3e
pf3f
pf40
pf41
pf42
pf43
pf44
pf45
pf46
pf47
pf48
pf49
pf4a
pf4b
pf4c
pf4d
pf4e
pf4f
pf50
pf51
pf52
pf53
pf54

Partial preview of the text

Download Operating System - Implementation of Process MINIX 3 - Notes and more Study notes Operating Systems in PDF only on Docsity!

Implementation of Processes in

MINIX 3

Layers of Minix in Source Code

Location Layers src/kernel/ layer 1 (scheduling, messages, clock and system tasks). src/drivers/ layer 2 (device drivers for disk, console, printer, etc.). src/servers/ layer 3 (process manager, file system, other servers).

MINIX Memory (2)

Clocks

  • (^) A computer has a timer, not a clock.
  • (^) A timer is a precisely machined quartz crystal oscillating at a frequency that depends on how the crystal was cut and the amount of tension.

Clocks

  • (^) Two registers are associated with the crystal: a counter and a holding register. - (^) Each oscillation of the crystal decrements the counter by one. When counter is 0, an interrupt is generated. - (^) Each interrupt is called a clock tick. - (^) At each clock tick, the interrupt procedure adds one to the time stored in memory. The counter is reinitialized by the value in the holding register. - (^) A timer can be programmed to generate an interrupt n times per second.

Clock Software

  • (^) Let’s start with line 10468 which is the start of the clock_task() function - (^) Expects only type of message: Interrupt - (^) Gets this message when a quantum expires - (^) Results in a call to do_clocktick()
  • (^) The function clock_handler() function executes for each tick

Clock Software

  1. Maintaining the time of day.
  2. Preventing processes from running longer than they are allowed to.
  3. Accounting for CPU usage.
  4. Handling the alarm system call made by user processes.
  5. Doing profiling, monitoring, and statistics gathering.

Minix Source code files

include/ansi.h

  • (^) It shows the type of C Complier and its compatibility with Minix C code.

include/limits.h

include/errno.h

  • (^) The <errno.h> header defines the numbers of the various errors that can occur during program execution.
  • (^) They are visible to user programs and should be small positive integers.
  • (^) However, they are also used within MINIX, where they must be negative.

include/errno.h

include/unistd.h

  • (^) The <unistd.h> header contains a few miscellaneous manifest constants.