adding a link to the thesis and cleaning it up a little
This commit is contained in:
parent
81ec45fa65
commit
db620f05cb
@ -116,10 +116,13 @@
|
|||||||
or write a
|
or write a
|
||||||
= succeed "." do
|
= succeed "." do
|
||||||
=ext_link "mail to the group" , "https://groups.google.com/forum/#!forum/ruby-x"
|
=ext_link "mail to the group" , "https://groups.google.com/forum/#!forum/ruby-x"
|
||||||
|
|
||||||
%h2.center News
|
%h2.center News
|
||||||
%p
|
%p
|
||||||
Last but not least, I try to get recent developments down on paper when they are
|
Last but not least, I try to get recent developments down on paper when they are
|
||||||
still fresh.
|
still fresh. Though not much has happened lately, as we bought
|
||||||
|
=ext_link "this" , "https://www.hubfeenix.fi/"
|
||||||
|
|
||||||
%p=post_link(Post.posts.values[0])
|
%p=post_link(Post.posts.values[0])
|
||||||
%p=post_link(Post.posts.values[1])
|
%p=post_link(Post.posts.values[1])
|
||||||
%p=post_link(Post.posts.values[2])
|
%p=post_link(Post.posts.values[2])
|
||||||
|
@ -3,3 +3,4 @@
|
|||||||
%li= link_to "Threads (rumble)" , "threads.html"
|
%li= link_to "Threads (rumble)" , "threads.html"
|
||||||
%li= link_to "Optimisation (ideas)" , "optimisations.html"
|
%li= link_to "Optimisation (ideas)" , "optimisations.html"
|
||||||
%li= link_to "SOML (old)", "soml.html"
|
%li= link_to "SOML (old)", "soml.html"
|
||||||
|
%li= link_to "SynthesisOS" , "/synthesis/index"
|
||||||
|
@ -30,3 +30,20 @@ effort to bring them down to earth.
|
|||||||
%p
|
%p
|
||||||
I was also thinking this section could serve as an intermediate discussion reference.
|
I was also thinking this section could serve as an intermediate discussion reference.
|
||||||
Formulating ideas on the list and writing intermediate designs down here.
|
Formulating ideas on the list and writing intermediate designs down here.
|
||||||
|
|
||||||
|
%h2 Synthesis
|
||||||
|
%p
|
||||||
|
At some point i downloaded and saved a copy of
|
||||||
|
= ext_link "Alexia Massalin" , "https://en.wikipedia.org/wiki/Alexia_Massalin"
|
||||||
|
phd thesis about Synthesis. If memory serves it was from
|
||||||
|
= ext_link "Valerie Aurora" , "valerieaurora.org"
|
||||||
|
|
||||||
|
%p
|
||||||
|
By chance i noticed that my links don't work and so i googled it and could
|
||||||
|
not find another copy of the whole thesis online. So i am making my copy of
|
||||||
|
= link_to "SynthesisOS" , "/synthesis/index"
|
||||||
|
available. But i must apologise that the formatting is whacked, and in the
|
||||||
|
conversion to haml some layout got inacurate. My only excuse is that this
|
||||||
|
was never intended for anyone but me. But it is a very important milestone
|
||||||
|
in our understanding of how to implement new and good ideas, so i will continue
|
||||||
|
to host it and put a link up on wikipedia too.
|
||||||
|
@ -64,7 +64,7 @@
|
|||||||
%p
|
%p
|
||||||
Alexia has raised questions about the nature of code and ways of programming which are still unresolved.
|
Alexia has raised questions about the nature of code and ways of programming which are still unresolved.
|
||||||
I regularly reread the thesis and especially the chapter on
|
I regularly reread the thesis and especially the chapter on
|
||||||
%a{:href => "http://valerieaurora.org/synthesis/SynthesisOS/ch4.html"} Quajects
|
%a{:href => "https://en.wikipedia.org/wiki/Quaject"} Quajects
|
||||||
in the endeavour to understand what
|
in the endeavour to understand what
|
||||||
they are in any higher language terms.
|
they are in any higher language terms.
|
||||||
.row
|
.row
|
||||||
|
@ -275,7 +275,7 @@
|
|||||||
.code
|
.code
|
||||||
%pre
|
%pre
|
||||||
:preserve
|
:preserve
|
||||||
|
|
||||||
char buf[100], *bufp = &buf[0], *endp = &buf[100];
|
char buf[100], *bufp = &buf[0], *endp = &buf[100];
|
||||||
Put(c)
|
Put(c)
|
||||||
{
|
{
|
||||||
@ -283,7 +283,7 @@
|
|||||||
if(bufp == endp)
|
if(bufp == endp)
|
||||||
flush();
|
flush();
|
||||||
}
|
}
|
||||||
|
|
||||||
Put: // (character is passed register d0)
|
Put: // (character is passed register d0)
|
||||||
move.l (bufp),a0 // (1) Load buffer pointer into register a0
|
move.l (bufp),a0 // (1) Load buffer pointer into register a0
|
||||||
move.b d0,(a0)+ // (2) Store the character and increment the a0 register
|
move.b d0,(a0)+ // (2) Store the character and increment the a0 register
|
||||||
@ -299,7 +299,7 @@
|
|||||||
.code
|
.code
|
||||||
%pre
|
%pre
|
||||||
:preserve
|
:preserve
|
||||||
|
|
||||||
Put: // (character is passed register d0)
|
Put: // (character is passed register d0)
|
||||||
move.l (P),a0 // Load buffer pointer into register a0
|
move.l (P),a0 // Load buffer pointer into register a0
|
||||||
move.b d0,(a0,D) // Store the character
|
move.b d0,(a0,D) // Store the character
|
||||||
@ -416,7 +416,7 @@
|
|||||||
.code
|
.code
|
||||||
%pre
|
%pre
|
||||||
:preserve
|
:preserve
|
||||||
|
|
||||||
proc:
|
proc:
|
||||||
:
|
:
|
||||||
:
|
:
|
||||||
@ -426,7 +426,7 @@
|
|||||||
{Restore necessary context}
|
{Restore necessary context}
|
||||||
:
|
:
|
||||||
:
|
:
|
||||||
|
|
||||||
swtch:
|
swtch:
|
||||||
move.l (Current),a0 // (1) Get address of current thread's TTE
|
move.l (Current),a0 // (1) Get address of current thread's TTE
|
||||||
move.l sp,(a0) // (2) Save its stack pointer
|
move.l sp,(a0) // (2) Save its stack pointer
|
||||||
@ -552,7 +552,7 @@
|
|||||||
.code
|
.code
|
||||||
%pre
|
%pre
|
||||||
:preserve
|
:preserve
|
||||||
|
|
||||||
intr: move.l a0,-(sp) // Save register a0
|
intr: move.l a0,-(sp) // Save register a0
|
||||||
move.l (P),a0 // Get buffer pointer into reg. a0
|
move.l (P),a0 // Get buffer pointer into reg. a0
|
||||||
move.l (cd_port),(a0,D) // Store CD data into address P+D
|
move.l (cd_port),(a0,D) // Store CD data into address P+D
|
||||||
@ -566,7 +566,7 @@
|
|||||||
.code
|
.code
|
||||||
%pre
|
%pre
|
||||||
:preserve
|
:preserve
|
||||||
|
|
||||||
s.intr:
|
s.intr:
|
||||||
move.l a0,-(sp) // Save register a0
|
move.l a0,-(sp) // Save register a0
|
||||||
tst.b (cd_active) // Is the CD device active?
|
tst.b (cd_active) // Is the CD device active?
|
||||||
@ -604,13 +604,13 @@
|
|||||||
.code
|
.code
|
||||||
%pre
|
%pre
|
||||||
:preserve
|
:preserve
|
||||||
|
|
||||||
s_intr:
|
s_intr:
|
||||||
movem.l <d0-d2,a0-a2>,-(sp)
|
movem.l <d0-d2,a0-a2>,-(sp)
|
||||||
bsr _sound_intr
|
bsr _sound_intr
|
||||||
movem.l (sp)+,<d0-d2,a0-a2>
|
movem.l (sp)+,<d0-d2,a0-a2>
|
||||||
rte
|
rte
|
||||||
|
|
||||||
sound_intr()
|
sound_intr()
|
||||||
{
|
{
|
||||||
if(cd_active) {
|
if(cd_active) {
|
||||||
@ -703,13 +703,13 @@
|
|||||||
.code
|
.code
|
||||||
%pre
|
%pre
|
||||||
:preserve
|
:preserve
|
||||||
|
|
||||||
// --- User-level stub procedure ---
|
// --- User-level stub procedure ---
|
||||||
proc:
|
proc:
|
||||||
moveq #N,d2 // Load procedure index
|
moveq #N,d2 // Load procedure index
|
||||||
trap #15 // Trap to kernel
|
trap #15 // Trap to kernel
|
||||||
rts // Return
|
rts // Return
|
||||||
|
|
||||||
// --- Dispatch to kernel procedure ---
|
// --- Dispatch to kernel procedure ---
|
||||||
trap15:
|
trap15:
|
||||||
cmp.w #MAX,d2 // Check that procedure index is in range
|
cmp.w #MAX,d2 // Check that procedure index is in range
|
||||||
@ -717,7 +717,7 @@
|
|||||||
move.l (tab$,pc,d2*4),a2 // Get the procedure address
|
move.l (tab$,pc,d2*4),a2 // Get the procedure address
|
||||||
jsr (a2) // Call it
|
jsr (a2) // Call it
|
||||||
rte // Return to user-level
|
rte // Return to user-level
|
||||||
|
|
||||||
.align 4 // Table of kernel procedure addresses...
|
.align 4 // Table of kernel procedure addresses...
|
||||||
tab$:
|
tab$:
|
||||||
dc.l fn0, fn1, fn2, fn3, ..., fnN
|
dc.l fn0, fn1, fn2, fn3, ..., fnN
|
||||||
|
@ -104,11 +104,10 @@
|
|||||||
%h3 4.1.1 Quaject Interfaces
|
%h3 4.1.1 Quaject Interfaces
|
||||||
%p
|
%p
|
||||||
The interface to a quaject consists of callentries, callbacks, and callouts. A client uses the services of a quaject by calling a callentry. Normally a callentry invocation simply returns. Exceptional situations return along callbacks. Callouts are places in the quaject where external calls to other quaject's callentries happen. Tables 4.2, 4.3, and 4.4 list the interfaces to the Synthesis basic kernel quajects.
|
The interface to a quaject consists of callentries, callbacks, and callouts. A client uses the services of a quaject by calling a callentry. Normally a callentry invocation simply returns. Exceptional situations return along callbacks. Callouts are places in the quaject where external calls to other quaject's callentries happen. Tables 4.2, 4.3, and 4.4 list the interfaces to the Synthesis basic kernel quajects.
|
||||||
/ - - FINISH - THIS SHOULD BE A FIGURE - -
|
|
||||||
.code
|
.code
|
||||||
%pre
|
%pre
|
||||||
:preserve
|
:preserve
|
||||||
|
|
||||||
+-----------+--------------------+-----------+
|
+-----------+--------------------+-----------+
|
||||||
| Qput | | Qget |
|
| Qput | | Qget |
|
||||||
+-----------+ ---+--+--+ +-----------+
|
+-----------+ ---+--+--+ +-----------+
|
||||||
|
@ -70,9 +70,8 @@
|
|||||||
.code
|
.code
|
||||||
%pre
|
%pre
|
||||||
:preserve
|
:preserve
|
||||||
|
|
||||||
int data_val;
|
int data_val;
|
||||||
|
|
||||||
AtomicUpdate(update_function)
|
AtomicUpdate(update_function)
|
||||||
{
|
{
|
||||||
retry:
|
retry:
|
||||||
@ -86,7 +85,6 @@
|
|||||||
.code
|
.code
|
||||||
%pre
|
%pre
|
||||||
:preserve
|
:preserve
|
||||||
|
|
||||||
CAS(mem_addr, compare_value, update_value)
|
CAS(mem_addr, compare_value, update_value)
|
||||||
{
|
{
|
||||||
if(*mem_addr == compare_value) {
|
if(*mem_addr == compare_value) {
|
||||||
@ -105,7 +103,7 @@
|
|||||||
.code
|
.code
|
||||||
%pre
|
%pre
|
||||||
:preserve
|
:preserve
|
||||||
|
|
||||||
CAS2(mem_addr1, mem_addr2, compare1, compare2, update1, update2)
|
CAS2(mem_addr1, mem_addr2, compare1, compare2, update1, update2)
|
||||||
{
|
{
|
||||||
if(*mem_addr1 == compare1 && *mem_addr2 == compare2) {
|
if(*mem_addr1 == compare1 && *mem_addr2 == compare2) {
|
||||||
@ -166,7 +164,7 @@
|
|||||||
.code
|
.code
|
||||||
%pre
|
%pre
|
||||||
:preserve
|
:preserve
|
||||||
|
|
||||||
Insert(elem)
|
Insert(elem)
|
||||||
{
|
{
|
||||||
retry:
|
retry:
|
||||||
@ -175,7 +173,7 @@
|
|||||||
if(CAS(&list_head, old_head, elem) == FAIL)
|
if(CAS(&list_head, old_head, elem) == FAIL)
|
||||||
goto retry;
|
goto retry;
|
||||||
}
|
}
|
||||||
|
|
||||||
Delete()
|
Delete()
|
||||||
{
|
{
|
||||||
retry:
|
retry:
|
||||||
@ -201,7 +199,7 @@
|
|||||||
.code
|
.code
|
||||||
%pre
|
%pre
|
||||||
:preserve
|
:preserve
|
||||||
|
|
||||||
Push(elem)
|
Push(elem)
|
||||||
{
|
{
|
||||||
retry:
|
retry:
|
||||||
@ -211,7 +209,7 @@
|
|||||||
if(CAS2(&SP, new_SP, old_SP, old_val, new_SP, elem) == FAIL)
|
if(CAS2(&SP, new_SP, old_SP, old_val, new_SP, elem) == FAIL)
|
||||||
goto retry;
|
goto retry;
|
||||||
}
|
}
|
||||||
|
|
||||||
Pop()
|
Pop()
|
||||||
{
|
{
|
||||||
retry:
|
retry:
|
||||||
@ -242,7 +240,7 @@
|
|||||||
.code
|
.code
|
||||||
%pre
|
%pre
|
||||||
:preserve
|
:preserve
|
||||||
|
|
||||||
Put(elem)
|
Put(elem)
|
||||||
{
|
{
|
||||||
retry:
|
retry:
|
||||||
@ -256,7 +254,7 @@
|
|||||||
if(CAS2(&Q_head, new_head, old_head, old_elem, new_head, elem) == FAIL)
|
if(CAS2(&Q_head, new_head, old_head, old_elem, new_head, elem) == FAIL)
|
||||||
goto retry;
|
goto retry;
|
||||||
}
|
}
|
||||||
|
|
||||||
Get()
|
Get()
|
||||||
{
|
{
|
||||||
retry:
|
retry:
|
||||||
@ -284,7 +282,7 @@
|
|||||||
.code
|
.code
|
||||||
%pre
|
%pre
|
||||||
:preserve
|
:preserve
|
||||||
|
|
||||||
VisitNextNode(current)
|
VisitNextNode(current)
|
||||||
{
|
{
|
||||||
nextp = & current->next; // Point to current node's next-node field
|
nextp = & current->next; // Point to current node's next-node field
|
||||||
@ -299,7 +297,7 @@
|
|||||||
}
|
}
|
||||||
return next_node;
|
return next_node;
|
||||||
}
|
}
|
||||||
|
|
||||||
ReleaseNode(current)
|
ReleaseNode(current)
|
||||||
{
|
{
|
||||||
refp = & current->refcnt; // Point to current node's ref. count field
|
refp = & current->refcnt; // Point to current node's ref. count field
|
||||||
@ -418,7 +416,7 @@
|
|||||||
.code
|
.code
|
||||||
%pre
|
%pre
|
||||||
:preserve
|
:preserve
|
||||||
|
|
||||||
retry: move.l (head),d1 // Get head node into reg. d1
|
retry: move.l (head),d1 // Get head node into reg. d1
|
||||||
move.l d1,a0 // ... copy to register 'a0'
|
move.l d1,a0 // ... copy to register 'a0'
|
||||||
beq empty // ... jump if list empty
|
beq empty // ... jump if list empty
|
||||||
@ -434,7 +432,7 @@
|
|||||||
.code
|
.code
|
||||||
%pre
|
%pre
|
||||||
:preserve
|
:preserve
|
||||||
|
|
||||||
move.w %sr,d0 // Save CPU status reg. in reg. d0
|
move.w %sr,d0 // Save CPU status reg. in reg. d0
|
||||||
or.w #0x0700,%sr // Disable interrupts.
|
or.w #0x0700,%sr // Disable interrupts.
|
||||||
spin: tas lock // Obtain lock
|
spin: tas lock // Obtain lock
|
||||||
|
@ -121,7 +121,6 @@
|
|||||||
.code
|
.code
|
||||||
%pre
|
%pre
|
||||||
:preserve
|
:preserve
|
||||||
|
|
||||||
int residue=0, freq=0;
|
int residue=0, freq=0;
|
||||||
/* Master (reference frame) */ /* Slave (derived interrupt) */
|
/* Master (reference frame) */ /* Slave (derived interrupt) */
|
||||||
i1() i2()
|
i1() i2()
|
||||||
@ -139,7 +138,6 @@
|
|||||||
.code
|
.code
|
||||||
%pre
|
%pre
|
||||||
:preserve
|
:preserve
|
||||||
|
|
||||||
LoPass(x)
|
LoPass(x)
|
||||||
{
|
{
|
||||||
static int lopass;
|
static int lopass;
|
||||||
@ -184,7 +182,7 @@
|
|||||||
.code
|
.code
|
||||||
%pre
|
%pre
|
||||||
:preserve
|
:preserve
|
||||||
|
|
||||||
Integrate(x)
|
Integrate(x)
|
||||||
{
|
{
|
||||||
static int accum;
|
static int accum;
|
||||||
@ -195,7 +193,7 @@
|
|||||||
.code
|
.code
|
||||||
%pre
|
%pre
|
||||||
:preserve
|
:preserve
|
||||||
|
|
||||||
Deriv(x)
|
Deriv(x)
|
||||||
{
|
{
|
||||||
static int old_x;
|
static int old_x;
|
||||||
@ -244,12 +242,11 @@
|
|||||||
.code
|
.code
|
||||||
%pre
|
%pre
|
||||||
:preserve
|
:preserve
|
||||||
|
|
||||||
main()
|
main()
|
||||||
{
|
{
|
||||||
char buf[100];
|
char buf[100];
|
||||||
int n, fd1, fd2;
|
int n, fd1, fd2;
|
||||||
|
|
||||||
fd1 = open("/dev/cd", 0);
|
fd1 = open("/dev/cd", 0);
|
||||||
fd2 = open("/dev/speaker", 1);
|
fd2 = open("/dev/speaker", 1);
|
||||||
for(;;) {
|
for(;;) {
|
||||||
|
@ -381,7 +381,7 @@
|
|||||||
%p
|
%p
|
||||||
Perhaps the first question people ask is, "Why is Synthesis written in assembler?" This is soon followed by "How much of Synthesis could be re-written in a high-level language?" and "At what performance loss?".
|
Perhaps the first question people ask is, "Why is Synthesis written in assembler?" This is soon followed by "How much of Synthesis could be re-written in a high-level language?" and "At what performance loss?".
|
||||||
%p
|
%p
|
||||||
There are several reasons why assembler language was chosen, some of them researchrelated, and some of them historical. One reason is I felt that it would be an interesting experiment to write a medium-size system in assembler, which allows unrestricted access to the machine's architecture, and perhaps discover new coding idioms that have not yet been captured in a higher-level language. Later paragraphs talk about these. Another reason is that much of the early work involved discovering the most efficient way of working with the machine and its devices. It was a fast prototyping language, one in which I could write and test simple I/O drivers without the trouble of supporting a complex language runtime environment.
|
There are several reasons why assembler language was chosen, some of them research related, and some of them historical. One reason is I felt that it would be an interesting experiment to write a medium-size system in assembler, which allows unrestricted access to the machine's architecture, and perhaps discover new coding idioms that have not yet been captured in a higher-level language. Later paragraphs talk about these. Another reason is that much of the early work involved discovering the most efficient way of working with the machine and its devices. It was a fast prototyping language, one in which I could write and test simple I/O drivers without the trouble of supporting a complex language runtime environment.
|
||||||
%p
|
%p
|
||||||
But perhaps the biggest reason is that in 1984, at the time the seed ideas were being developed, I could not find a good, reliable (bug-free) C compiler for the 68000 processor. I had tried the compilers on several 68000-based
|
But perhaps the biggest reason is that in 1984, at the time the seed ideas were being developed, I could not find a good, reliable (bug-free) C compiler for the 68000 processor. I had tried the compilers on several 68000-based
|
||||||
%span.smallcaps Unix
|
%span.smallcaps Unix
|
||||||
@ -418,7 +418,7 @@
|
|||||||
%h3 7.4.2 Porting Synthesis to the Sony NEWS Workstation
|
%h3 7.4.2 Porting Synthesis to the Sony NEWS Workstation
|
||||||
%p
|
%p
|
||||||
Synthesis was first developed for the Quamachine, and like many substantial software systems, has gone through several revisions. The early kernel had several shortcomings. While the kernel showed impressive speed gains over conventional operating systems such as
|
Synthesis was first developed for the Quamachine, and like many substantial software systems, has gone through several revisions. The early kernel had several shortcomings. While the kernel showed impressive speed gains over conventional operating systems such as
|
||||||
= succeed "," do
|
= succeed "." do
|
||||||
%span.smallcaps Unix
|
%span.smallcaps Unix
|
||||||
%p
|
%p
|
||||||
The goal of the Synthesis port to the Sony workstation was to alleviate the shortcomings, for example, by cleaning up the kernel structure and adding virtual memory and networking support. In particular, we wanted to show that the additional functionality would not significantly slow down the Synthesis kernel. This section reports on the experience and discusses the problems encountered while porting.
|
The goal of the Synthesis port to the Sony workstation was to alleviate the shortcomings, for example, by cleaning up the kernel structure and adding virtual memory and networking support. In particular, we wanted to show that the additional functionality would not significantly slow down the Synthesis kernel. This section reports on the experience and discusses the problems encountered while porting.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user