Welcome, Guest. Please login or register.

Author Topic: Any Unix-like aspect in AmigaOS?  (Read 6953 times)

Description:

0 Members and 1 Guest are viewing this topic.

Offline Trev

  • Hero Member
  • *****
  • Join Date: May 2003
  • Posts: 1550
  • Country: 00
    • Show only replies by Trev
Re: Any Unix-like aspect in AmigaOS?
« Reply #14 from previous page: May 27, 2009, 05:41:24 AM »
Yeah, I think the short answer is that AmigaOS isn't very UNIX-like at all: there's no separation of kernel (privileged) and user (unprivileged) spaces, and there are clear differences between file and device I/O.
 

Offline tiffers

Re: Any Unix-like aspect in AmigaOS?
« Reply #15 on: May 27, 2009, 06:01:15 AM »
Quote from: marcfrick2112;456454
Well, yes, but the 3000UX ran AMIX System 5 Release 4 AND AmigaOS 2.1 ... (I'm guessing AmigOS was selected from the Early Startup)  

@trev: Ugggh! I hope no one ever tries to use all 4,294,967,296 possible 'protection bits' in Windows... man, and I thought the registry was a mess...

As for the rest, well I did say to correct me if I'm wrong :) That'll teach me to post after a few drinks... lol...


It's 32-bit. This gives a possible 4,294,967,296 possible combinations of those bits.

Lets look at Unix which uses at least 12 bits, which are divided thusly:

Code: [Select]
Special Modes | Owner  | Group  | Others
--------------+--------+--------+-----------
 U-G-S        | R-W-X  | R-W-X  | R-W-X
--------------+--------+--------+-----------
 1-1-1        | 1-1-1  | 1-1-1  | 1-1-1


These allow up to 4096 different combinations, and it's not at all hard to rememer any of them. Each of the Owner, Group and Others permissions uses 3 bits, 1 for Read permission, 1 for Write permission and 1 for Execute permission.

In usual binary fashion this makes 8 combinations for the Owner, 8 for the Group and 8 for the Others. Another 8 for special modes I won't discuss.

Code: [Select]
Permission   | Binary | Decimal
-------------+--------+------------
  -  -  -    |  000   |    0
-------------+--------+------------
  -  -  x    +  001   |    1
-------------+--------+------------
  -  w  -    |  010   |    2
-------------+--------+------------
  -  w  x    |  011   |    3
-------------+--------+------------
  r  -  -    |  100   |    4
-------------+--------+------------
  r  -  x    |  101   |    5
-------------+--------+------------
  r  w  -    |  110   |    6
-------------+--------+------------
  r  w  x    |  111   |    7
-------------+--------+------------

(You probably wouldn't use the first 4.)

Since the Owner, Group and Others sections are effectively the same permissions applied to different objects, you only have to remember 3 different permissions (R, W or X), but they can be applied to 9-bits of the permissions field, capable of being applied 512 different ways, some of which won't be used. So you remember 3 permission values, and 3 special permission values. So you remember 6 different permissions, and apply them in a possible 4096 combinations, none of which you have to memorize. You simply apply the 6 you know, in the pattern you want.

Don't let the 32-bit field scare you. It's going to be no worse than remembering 32 different permissions at the most.

Unix probably uses more than 12 bits, but this is all the user is usually exposed to.
« Last Edit: May 31, 2009, 07:13:31 AM by tiffers »
Amiga FTW!
 

Offline Dandy

  • Hero Member
  • *****
  • Join Date: Apr 2004
  • Posts: 1221
    • Show only replies by Dandy
    • http://www.wiehltalbahn.de/en/
Any Unix-like aspect in AmigaOS?
« Reply #16 on: May 27, 2009, 01:57:44 PM »
Quote from: marcfrick2112;456340


Well, I think there might be more similarities, but of course, if I'm wrong, feel free to correct me....

Both Amiga and Unix can be controlled entirely from the command prompt, and that the command prompt is always there, even if you can't see it...
the  ' . ' and '..' commands to go up one level, and to the root directory respectively... although in AmigaDos it's '/' and ':'
Both have more types of file protection bits than windows (I believe)


And there is more, I'm sure .... hmm, the ixemul.library ...  
The Amiga 3000UX won 'Best in Show' at the UnixWorld show, does that count?



Well, IIRC all (or at least most) of the DOS commands are the same in that sense, that e.g. in AmigaDOS you say "copy", while in Unix you use the abbrevation "cp" (that you could also use in e.g. Commodore Basic v4.0 instead of the full commands) - the syntax is the same.

I remember that back in 1989-1992 during my CAD studies - where I learned UNIX - I found it quite easy to learn the UNIX commands and their syntax because of the similarity to AmigaDOS.
As far as I remember Unix even had a directory structure similar to the Amigas directory structure back then - but since my CAD studies I had no root access on a UNIX machine to verify this...

Root Directory - that was one of the differences I remember and is related to the multiuser capability of UNIX that the Amiga does not have by standard (I know that a MultiUserFileSystem (MUFS) exists for PFS3, but haven't testet it so far).

I think only a person with admin rights had access to the root directory, as the system resides there.
All the best,

Dandy

Website maintained by me

If someone enjoys marching to military music, then I already despise him. He got his brain accidently - the bone marrow in his back would have been sufficient for him! (Albert Einstein)
 

Offline Trev

  • Hero Member
  • *****
  • Join Date: May 2003
  • Posts: 1550
  • Country: 00
    • Show only replies by Trev
Re: Any Unix-like aspect in AmigaOS?
« Reply #17 on: May 27, 2009, 04:45:24 PM »
Quote from: tiffers;456456
Don't let the 32-bit field scare you. It's going to be no worse than remembering 32 different permissions at the most.

But that's so much less fun. ;-) In practice, the lower 16-bits of the Windows access mask are used as a bit field for object-specific rights, and the next 8 bits are used for standard rights: delete, read permissions, write permissions, write owner, and synchronize are implemented. So that's 21 possible permissions, 16 of them object-specific. File system objects use 9 of the 16 object-specific bits.

Windows also supports generic read, write, and execute permissions. You can emulate UNIX-style file system permissions (and do when using Services for UNIX or POSIX APIs) by setting an object's owner and group and assigning permissions to CREATOR OWNER, CREATOR GROUP, and Everyone. With Microsoft's NFS server, you can continue to use full discretionary access control lists as well, but only the owner, group, and everyone permissions will be reflected in UNIX directory listings.

Many UNIX variants provide some form of discretionary access control lists, but most administrators are loathe to implement them, despite the flexibility they provide.
 

Offline obscurepanicTopic starter

  • Jr. Member
  • **
  • Join Date: May 2009
  • Posts: 52
    • Show only replies by obscurepanic
Re: Any Unix-like aspect in AmigaOS?
« Reply #18 on: June 03, 2009, 10:18:56 AM »
Wow, there are so many things to know about UNIX and Amiga. Perhaps we have a lot to learn about everything to understand Amiga. No worries, this is still a good motivation to understand Amiga.

In another thread, AmigaMan said something like

Quote from: AmigaMan;456136
You will also need to rewrite kickstart, but that had to be done anyway. Kickstart is unix based, so start from there with Amiga in mind.


Thank you, AmigaMan. :)
 

Offline Golem!dk

  • Sr. Member
  • ****
  • Join Date: Dec 2002
  • Posts: 414
    • Show only replies by Golem!dk
    • http://www.google.com/
Re: Any Unix-like aspect in AmigaOS?
« Reply #19 on: June 03, 2009, 10:49:52 AM »
Quote from: obscurepanic;508940
Wow, there are so many things to know about UNIX and Amiga. Perhaps we have a lot to learn about everything to understand Amiga. No worries, this is still a good motivation to understand Amiga.

In another thread, AmigaMan said something like

(No need to repeat that)

Thank you, AmigaMan. :)


Thank you indeed... you don't actually believe that? :)
~
 

Offline Einstein

  • Sr. Member
  • ****
  • Join Date: Dec 2004
  • Posts: 402
    • Show only replies by Einstein
Re: Any Unix-like aspect in AmigaOS?
« Reply #20 on: June 03, 2009, 02:10:51 PM »
Quote from: marcfrick2112;456340
Well, I think there might be more similarities, but of course, if
Both have more types of file protection bits than windows (I believe)

NT based Windows systems have more "protection bits" than unix even, let alone amiga.

*edit*

Not that my post offered anything new in this thread :o
« Last Edit: June 04, 2009, 10:42:37 AM by Einstein »
I have spoken !