Log inRegister an accountBrowse CSDbHelp & documentationFacts & StatisticsThe forumsAvailable RSS-feeds on CSDbSupport CSDb Commodore 64 Scene Database
 Welcome to our latest new user tubesockor ! (Registered 2024-05-12) You are not logged in - nap
CSDb User Forums


Forums > C64 Coding > kernal or kernel
2006-02-26 19:43
Oswald

Registered: Apr 2002
Posts: 5025
kernal or kernel

In computer science the kernel is the core of an operating system. It is a piece of software responsible for providing secure access to the machine's hardware and to various computer processes (computer programs in a state of execution). Since there can be many processes running at the same time, and hardware access is limited, the kernel also decides when and how long a program should be able to make use of a piece of hardware: this function is called scheduling. Accessing the hardware directly can be very complex, since there are many different hardware designs for the same type of component. Kernels usually implement some hardware abstraction (a set of instructions universal to all devices of a certain type) to hide the underlying complexity from the operating system and provide a clean and uniform interface to the hardware, which helps application programmers to develop programs that work with all devices of that type. The Hardware Abstraction Layer (HAL) then relies upon a software driver that provides the instructions specific to that device's manufacturing specifications.

...


a kernel is/does:

- a core of an operating system
- secure access to the machine's hardware
- secure access to various computer processes
- scheduling (when and how long a program should be able to make use of a piece of hardware)
- usually implements some hardware abstraction

which of the above is applicable to kernal ?

none.

kernal does basic IO stuff.
 
... 26 posts hidden. Click here to view all posts....
 
2006-03-01 17:07
Graham
Account closed

Registered: Dec 2002
Posts: 990
@trident:

Then try some disk drive action. You cannot run the same program on Atari and C64 although both BASIC variants are coded by MicroSoft.
2006-03-01 18:56
Oswald

Registered: Apr 2002
Posts: 5025
anyone can post a link with a description of early kernels ?
2006-03-01 19:48
Puterman
Account closed

Registered: Jan 2002
Posts: 188
oswald: http://en.wikipedia.org/wiki/History_of_operating_systems

Or try google.
2006-03-01 20:36
trident

Registered: May 2002
Posts: 75
Quote: @trident:

Then try some disk drive action. You cannot run the same program on Atari and C64 although both BASIC variants are coded by MicroSoft.


So what? They are two completely different systems - why would we expect them to be 100% compatible? It does not matter that both systems were developed by the same company. A C64 BASIC program cannot be run under Microsoft Windows either, despite both operating systems being written by the same company.

Oswald: for an example of a system with very small kernel, take a look at the MIT Exokernel project: http://en.wikipedia.org/wiki/Exokernel The basic idea of the exokernel was to reduce the kernel to only perform secure multiplexing of hardware resources and leave all the rest - including multithreading, memory allocation, networking, etc - to a "library OS" that was built on top of the tiny kernel.

You who don't think that the KERNAL is the kernel of the C64 OS - where would you draw the line between the kernel and the user space of the C64 OS? I would say that the line is much more difficult to draw for the C64 than for an operating system designed for processors with a supervisory mode. For such systems, the kernel typically is defined as the software running in supervisory mode and the user space is defined as all software not running in supervisory mode. Transfer of control and information between the kernel and user space is done with system calls. In my view, the closest equivalent of system calls on the C64 is the KERNAL jump table, which provides an abstract API to the KERNAL services and does so in an address-independant way that is very similar to how a system call interface typically is designed.

I seems to me that the most natural division of kernel/user space for the C64 OS would be to view the KERNAL as the kernel and the rest (the BASIC interpreter and all user programs) as the user space. The reason for me to make this division is that the KERNAL is useful on its own - without the BASIC - whereas the BASIC requires the KERNAL. Also, since the KERNAL is located in ROM it has a form of memory protection against user programs. Yes, the BASIC is also located in ROM but that does not change the fact that the KERNAL is protected.

One could also argue that the entire C64 system (BASIC + KERNAL) could be considered to be the kernel of the C64 OS. However, this would go against the traditional definition of a kernel as being the *innermost* part of an operating system as there would be nothing *outside* of the kernel. Thus it would be pointless to speak of a kernel and a user space and we might just as well just call it "the OS".

Another approach would be to say that the KERNAL is the C64 OS and that the BASIC is only an application running on top of the OS. The problem with this definition would be that a user cannot directly interact with the KERNAL. If there were no BASIC ROM, a user could not do much with his C64. Since the purpose of an operating system is to allow users to interact with the system, we cannot really call the KERNAL itself the operating system of the C64.

Finally, we could say that the kernel of the C64 OS only comprises parts of the KERNAL. This is a fine definition, but it is also a problematic one as we must then be very specific where to draw the line between the kernel and the user space. Does SETLFS belong to the kernel or the user space? How about CINT? It soon becomes quite difficult and does not really help us in any way.

It seems that the most natural definition is to call the KERNAL the kernel of the C64 OS.
2006-03-02 06:52
Oswald

Registered: Apr 2002
Posts: 5025
trident, yes it is possible to look at the c64 "OS" as a kernel and higher level package. but if you dont want to rape it with this concept you wouldnt do that.

the OS&kernel concept and the c64 OS is as far as a modern car, and one pulled by horses. Of course you can say that the car pulled by horses already has the concept of the engine, chassis, gears, etc, but how wrong you are with that ?

There are several functions of kernal which is pretty extreme too high level to be considered as a kernel function. load a file, print to screen, read keyboard, show me a kernel function that does any of those ???
2006-03-02 08:46
trident

Registered: May 2002
Posts: 75
The C64 OS was developed in the late 1970s and the early 1980s for an 8-bit computer with 64k RAM. Nobody would expect such a system to be very similar to an operating system for a workstation from the same time and age, or for a contemporary PC for that matter.

"There are several functions of kernal which is pretty extreme too high level to be considered as a kernel function. load a file, print to screen, read keyboard, show me a kernel function that does any of those ???"

For BSD and Linux kernels the corresponding kernel functions would be open(), write(), and read(), respectively.
2006-03-02 17:30
chatGPZ

Registered: Dec 2001
Posts: 11136
and if you look at the implementation of the c-library for cc65 you will notice that many posix functions map practically directly to kernal routines - _just_ like its done in *nix/bsd
2006-03-18 11:16
Rayne
Account closed

Registered: Jan 2002
Posts: 30
The KERNAL was known as kernel inside of Commodore since the PET days, but in 1980 Robert Russell misspelled the word in his notebooks forming the word kernal. When commodore technical writers Neil Harris and Andy Finkel collected Russells notes and used them as the basis for the VIC-20 programmer's manual, the misspelling followed them along and stuck.

According to early Commodore 'myth' and reported by writer/programmer Jim Butterfield among others, the word KERNAL is an acronym (or maybe more likely, a backronym) standing for Keyboard Entry Read, Network, And Link, which in fact makes good sense considering its role. Berkeley Softworks later used it when naming the core routines of its GUI OS for 8-bit home computers: the GEOS KERNAL.

The (completely different) OS core in the 16/32-bit Commodore Amiga series was called the Amiga ROM Kernel, i.e. using the correct spelling of kernel.
2006-03-18 12:37
PopMilo

Registered: Mar 2004
Posts: 145
Well said!
2007-06-19 17:01
Oswald

Registered: Apr 2002
Posts: 5025
Quote: The KERNAL was known as kernel inside of Commodore since the PET days, but in 1980 Robert Russell misspelled the word in his notebooks forming the word kernal. When commodore technical writers Neil Harris and Andy Finkel collected Russells notes and used them as the basis for the VIC-20 programmer's manual, the misspelling followed them along and stuck.

According to early Commodore 'myth' and reported by writer/programmer Jim Butterfield among others, the word KERNAL is an acronym (or maybe more likely, a backronym) standing for Keyboard Entry Read, Network, And Link, which in fact makes good sense considering its role. Berkeley Softworks later used it when naming the core routines of its GUI OS for 8-bit home computers: the GEOS KERNAL.

The (completely different) OS core in the 16/32-bit Commodore Amiga series was called the Amiga ROM Kernel, i.e. using the correct spelling of kernel.


according to "on the edge" the first version is the truth. I stop my kernal mania at last.
Previous - 1 | 2 | 3 | 4 - Next
RefreshSubscribe to this thread:

You need to be logged in to post in the forum.

Search the forum:
Search   for   in  
All times are CET.
Search CSDb
Advanced
Users Online
sebalozlepsi
eryngi
apprentix
MaD ][/Starship
El Jefe/Slackers^sidD
Guests online: 83
Top Demos
1 13:37  (9.8)
2 Next Level  (9.8)
3 Mojo  (9.7)
4 Coma Light 13  (9.7)
5 Edge of Disgrace  (9.6)
6 Comaland 100%  (9.6)
7 No Bounds  (9.6)
8 Uncensored  (9.6)
9 Wonderland XIV  (9.6)
10 Multiverse 100%  (9.6)
Top onefile Demos
1 It's More Fun to Com..  (9.7)
2 Party Elk 2  (9.7)
3 Cubic Dream  (9.6)
4 Layers  (9.6)
5 Copper Booze  (9.5)
6 TRSAC, Gabber & Pebe..  (9.5)
7 Rainbow Connection  (9.5)
8 Dawnfall V1.1  (9.5)
9 Quadrants  (9.5)
10 Daah, Those Acid Pil..  (9.5)
Top Groups
1 Oxyron  (9.3)
2 Booze Design  (9.3)
3 Nostalgia  (9.3)
4 Censor Design  (9.3)
5 Crest  (9.3)
Top Diskmag Editors
1 Jazzcat  (9.4)
2 Magic  (9.4)
3 hedning  (9.2)
4 Elwix  (9.1)
5 A Life in Hell  (9.1)

Home - Disclaimer
Copyright © No Name 2001-2024
Page generated in: 0.213 sec.