Log inRegister an accountBrowse CSDbHelp & documentationFacts & StatisticsThe forumsAvailable RSS-feeds on CSDbSupport CSDb Commodore 64 Scene Database
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: 5094
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-02-28 17:18
Graham
Account closed

Registered: Dec 2002
Posts: 990
If BASIC was the OS, why don't C64 programs without hardware banging run on Atari XL or Amstrad CPC? They also start with a BASIC prompt.
2006-02-28 18:00
Krill

Registered: Apr 2002
Posts: 2980
trident said: "KERNAL + BASIC is the OS of the C64" - BOTH together are the OS, and there's no debating about that. You switch on the computer and can immediately operate it via BASIC + KERNAL.
I totally agree with trident. See, we have a jump table at the end of the KERNAL. Looks like some hardware abstraction layer to me.
Also Oswald's connection only to linux is not quite clear to me. WinNT has a kernel, as well as unix systems and whatnot.
There are kernels that don't have some of the functionality of the KERNAL, and of course vice versa.
2006-02-28 18:17
Radiant

Registered: Sep 2004
Posts: 639
MSDOS.SYS isn't really that much more sophisticated...
2006-02-28 18:49
Oswald

Registered: Apr 2002
Posts: 5094
IMHO kernal is lightyears far from the concept kernel means.

I give up.



2006-02-28 19:34
trident

Registered: May 2002
Posts: 91
Quote: If BASIC was the OS, why don't C64 programs without hardware banging run on Atari XL or Amstrad CPC? They also start with a BASIC prompt.

Just because two operating systems share the same programming language doesn't necessarily mean that they are binary compatible (i.e. that programs written and compiled for one system can "just run" on another system).

Obviously simple BASIC programs run under both the C64 BASIC and most other BASICs (e.g. 10 print "hello world", 20 goto 10). A tokenized C64 BASIC program probably wouldn't run on an Atari without some kind of translator. This is similar to how a simple C program in source code would compile and run unmodified under x86 Linux and SPARC Solaris, whereas a compiled program wouldn't run without some type of emulator or translator software.
2006-03-01 15:55
chatGPZ

Registered: Dec 2001
Posts: 11386
Quote:

IMHO kernal is lightyears far from the concept kernel means.


i'd go back to the 70s and have a look at what kinda trivial stuff they called "kernel" of their OSs back then. the c64 "kernal" is lightyears ahead of them probably.

"kernal" is just the name for the "kernel" of the commodore operating system (not limited to c64 afterall) - just like "linux" is the name for the "kernel" of a typical gnu/linux <insert holy RMS pee> OS.
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: 5094
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: 91
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.
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
Alakran_64
Mike
slimeysmine
BYB/Hokuto Force
zzarko/Avatar
syntaxerror
Guests online: 173
Top Demos
1 Next Level  (9.7)
2 13:37  (9.7)
3 Mojo  (9.7)
4 Coma Light 13  (9.6)
5 The Demo Coder  (9.6)
6 Edge of Disgrace  (9.6)
7 What Is The Matrix 2  (9.6)
8 Uncensored  (9.6)
9 Comaland 100%  (9.6)
10 Wonderland XIV  (9.6)
Top onefile Demos
1 No Listen  (9.7)
2 Layers  (9.6)
3 Cubic Dream  (9.6)
4 Party Elk 2  (9.6)
5 Copper Booze  (9.6)
6 X-Mas Demo 2024  (9.5)
7 Dawnfall V1.1  (9.5)
8 Rainbow Connection  (9.5)
9 Onscreen 5k  (9.5)
10 Morph  (9.5)
Top Groups
1 Performers  (9.3)
2 Booze Design  (9.3)
3 Oxyron  (9.3)
4 Censor Design  (9.3)
5 Triad  (9.3)
Top Coders
1 Axis  (9.8)
2 Graham  (9.8)
3 Lft  (9.8)
4 Crossbow  (9.8)
5 HCL  (9.8)

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