Quantcast

[SqNOS] Small fix and questions

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[SqNOS] Small fix and questions

Ryan Macnak
Hi,

The keyboard event integration needs a small change to work with
Squeak4.2.  In PS2Keyboard>>newKeyboardEvent:type:
at: 6 put: 0
needs to be
at: 6 put: aCharacter asciiValue
The Pharo-based image continues to work with this change.

I notice the idle primitive is implemented with a HLT now, but
SqueakNOS still uses full processor for me.  Any idea why?

I see what looks like work-in-progress for paging support.  What would
paging support be for?  A traditional operating system would use it to
isolate processes in separate address spaces, but Smalltalk is already
pointer safe.

Finally, what license is SqueakNOS under?

Thanks,
Ryan
_______________________________________________
SqueakNOS mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/squeaknos
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [SqNOS] Small fix and questions

melkyades


On Sun, Aug 14, 2011 at 6:38 PM, Ryan Macnak <[hidden email]> wrote:
Hi,

The keyboard event integration needs a small change to work with
Squeak4.2.  In PS2Keyboard>>newKeyboardEvent:type:
at: 6 put: 0
needs to be
at: 6 put: aCharacter asciiValue
The Pharo-based image continues to work with this change.

excelent! save it locally and send it to me so I can upload it to squeaksource. If you keep working I think richie may give you write permissions.

I notice the idle primitive is implemented with a HLT now, but
SqueakNOS still uses full processor for me.  Any idea why?

There must be something wrong, because it doesn't (use to) happen to us. On a core i3 380 laptop, over VMWare it should take 5% of CPU. I'd bet there is a smalltalk process running in background hogging the cpu. Does it happen with all images (squeak and pharo)?
 

I see what looks like work-in-progress for paging support.  What would
paging support be for?  A traditional operating system would use it to
isolate processes in separate address spaces, but Smalltalk is already
pointer safe.

Hardware paging requires many things, so yes, it's a work in progress. Buuuut
there's a lot of things solved now. That includes: 1. a st model of X86 mmu,
so that you can manage memory directly in smalltalk. 2. A mechanism to
handle page fault interrupts via callbacks, so that when they occur, a st
method is called in order to handle their resolution. 3. A st model of ATA
disks and FAT32 filesystems, so that you could mix them with paging. 
4. A good and heavy usage example, which is to save the image. When
saving the image, we set all the image as read only and then save its
contents. Should a page fault occur for writing, we place a copy of the
original contents in a buffer and then we set the page as read-only.

There still isn't a way for offloading segments of the image to disk, we didn't
take the time to develop it, so we can't swap memory yet. But as there is
disk support now, the way is cleared for that.

Lastly, a problem of smalltalk (at least in Pharo/Squeak) is that there isn't
any kind of isolation, all processes live in the same address space. It
would be really good to have a way of segmenting the image, having separate
processes in separate address spaces, an some kind of protection. I think
that's the next step.

 
Finally, what license is SqueakNOS under?

squeaksource.com says MIT, but Richie should know better.
 

Thanks,
Ryan

Hope it helps!

Best,
     Javier.
 
_______________________________________________
SqueakNOS mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/squeaknos



--
Lic. Javier Pimás
Ciudad de Buenos Aires

_______________________________________________
SqueakNOS mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/squeaknos
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [SqNOS] Small fix and questions

Ryan Macnak
>> I notice the idle primitive is implemented with a HLT now, but
>> SqueakNOS still uses full processor for me.  Any idea why?
>
> There must be something wrong, because it doesn't (use to) happen to us. On
> a core i3 380 laptop, over VMWare it should take 5% of CPU. I'd bet there is
> a smalltalk process running in background hogging the cpu. Does it happen
> with all images (squeak and pharo)?

This happens for both the March release (Pharo-based) and my version
with Newspeak (Squeak42-based).  I don't see anything suspicious in
the process browser.  I am using VirtualBox, not VMWare, but Ubuntu in
VirtualBox does not become a CPU hog, so I don't think that is it.

> Lastly, a problem of smalltalk (at least in Pharo/Squeak) is that there
> isn't
> any kind of isolation, all processes live in the same address space. It
> would be really good to have a way of segmenting the image, having separate
> processes in separate address spaces, an some kind of protection. I think
> that's the next step.

In my mind, the way to go is to use Newspeak's modularity to isolate
programs.  Of course, currently this can be undermined by accessing
Smalltalk classes and unenforced private methods, so there is still a
ways to go.

Ryan
_______________________________________________
SqueakNOS mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/squeaknos
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [SqNOS] Small fix and questions

melkyades


On Mon, Aug 15, 2011 at 3:20 PM, Ryan Macnak <[hidden email]> wrote:
>> I notice the idle primitive is implemented with a HLT now, but
>> SqueakNOS still uses full processor for me.  Any idea why?
>
> There must be something wrong, because it doesn't (use to) happen to us. On
> a core i3 380 laptop, over VMWare it should take 5% of CPU. I'd bet there is
> a smalltalk process running in background hogging the cpu. Does it happen
> with all images (squeak and pharo)?

This happens for both the March release (Pharo-based) and my version
with Newspeak (Squeak42-based).  I don't see anything suspicious in
the process browser.  I am using VirtualBox, not VMWare, but Ubuntu in
VirtualBox does not become a CPU hog, so I don't think that is it.

If you can, please try using VMWare to see if it keeps happening. We've seen
this full CPU usage before, but never nailed it down. It seemed to happen
pseudo-randomly with some images. Maybe it's the emulator, who knows.
 

> Lastly, a problem of smalltalk (at least in Pharo/Squeak) is that there
> isn't
> any kind of isolation, all processes live in the same address space. It
> would be really good to have a way of segmenting the image, having separate
> processes in separate address spaces, an some kind of protection. I think
> that's the next step.

In my mind, the way to go is to use Newspeak's modularity to isolate
programs.  Of course, currently this can be undermined by accessing
Smalltalk classes and unenforced private methods, so there is still a
ways to go.

That's interesting because I've been looking at newspeak for some time
and it might be the right anwser. I'm reading gilad's paper about mirrors
just by now, but I'd also like to see it working in practice to believe it hehe.

I'll commit your changes asap, but I'm pretty busy right now, so expect two
days until I open an image.

Cheers,
          Jaier.

Ryan



--
Lic. Javier Pimás
Ciudad de Buenos Aires

_______________________________________________
SqueakNOS mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/squeaknos
Loading...