Unix/Linux Go Back    


Fedora is an operating system centered on the Linux open source kernel and is developed by the community-supported Fedora Project. Fedora is sponsored by Red Hat. Fedora contains software distributed under a free and open-source license. Fedora focuses on innovation, integrating and adopting new technologies and working closely with various Linux communities. The default desktop in Fedora is the GNOME desktop environment and the default user interface is the GNOME Shell. Other desktop environments include KDE Plasma, Xfce, LXDE, MATE and Cinnamon. Security is an important aspect of Fedora with one specific security feature, Security-Enhanced Linux, implementing a variety of software security policies, including mandatory access controls.

Is UNIX an open source OS ?

Fedora


Tags
architecture, faq, history, noob

Closed    
 
Thread Tools Search this Thread Display Modes
    #15  
Old Unix and Linux 07-30-2014
sreyan32 sreyan32 is offline
Registered User
 
Join Date: Nov 2012
Last Activity: 4 February 2017, 3:19 AM EST
Posts: 47
Thanks: 25
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by screenprintr View Post
Wonder if he confused my post with yours?
What are you talking about ??
Sponsored Links
    #16  
Old Unix and Linux 07-30-2014
Corona688 Corona688 is offline Forum Staff  
Mead Rotor
 
Join Date: Aug 2005
Last Activity: 22 February 2017, 11:00 AM EST
Location: Saskatchewan
Posts: 21,928
Thanks: 1,049
Thanked 4,095 Times in 3,794 Posts
Quote:
Originally Posted by sreyan32 View Post
I am sorry for being blunt first of all. But what you said makes absolutely no sense to me. Why would a terminal need a serial port to function ?
In the beginning, terminals and telecommunications equipment were always attached to serial ports; that's what they're there for. Quite a lot of features -- SIGINT on ctrl-C, EOF on ctrl-D, timeouts, line-based reading, simple translation, cleanup when the connection closes, etc etc etc -- were added to the serial port device driver to keep them simple to use. Modems and terminals had a fair amount in common, incidentally.

So, any interactive terminal program in UNIX talks to the terminal like a serial port. When you close an xterm or a PUTTY window, you expect things it was running to die with it, yes? Like a dialup teletype session would die when a modem hung up. It's the same thing.

But these days, they don't always have a serial port! Instead of rewriting everything imperfectly every time they created a new and special kind of terminal, they added a "virtual terminal" device to the UNIX standard. It's like a special kind of pipe where, if you write ctrl-C into one end, the other end dies... It has all the other usual features UNIX terminal programs have come to expect -- and should, since it's the same device driver.

Quote:
Also I have used the terminal in both Debian and Fedora distributions. I have never made any connection to any serial port before using them !
Run 'stty' in an xterm -- it will tell you your terminal's "baud rate". Which doesn't matter for virtual terminals, but it's there for historical reasons.

Quote:
Why would I need to do so?
The serial port driver handles things like
  • Should keystrokes be instantly delivered to the program, or should it wait until ENTER is pressed?
  • What key is backspace?
  • Should I send SIGINT on ctrl-C? Or some other key? Or not at all?

...and lots of other things. That's all in the device driver itself.

Using virtual terminals means you can run the exact same interactive program in a local terminal, remote terminal, GUI terminal, serial terminal, or whatever else and expect it to work the exact same way, right down to the weirdest bits of UNIX terminal history. (Try logging into a LINUX terminal as allcaps -- and watch the rest of the text become allcaps when it decides you're running a 6-bit terminal!)

Quote:
OSes like Windows also offer ctrl+c combination to kill the program(not that I like comparing Windows and UNIX I am just trying to get my point across).
ctrl-C is the only serial-like feature Windows has, and not even for serial ports. Windows actually put that feature inside each program -- but not all programs. Which means ctrl-C only works when it wants to.

Quote:
And what do you mean by it does that directly ? How can a serial port send signals to the CPU?
When you type ctrl-C, the kernel sends SIGINT to whatever's attached to your terminal. It's not a feature of your shell.

When you type a line and hit enter, the kernel delivers the complete line to whatever program's reading. Programs don't have to assemble each individual keystroke themselves (unless they want to.)

These and much more are features of the serial port device driver, which all interactive terminal programs in UNIX depend on.

Quote:
I am sorry but I don't understand what you are saying probably because I am starting out with UNIX. Do you think I should post a separate thread about this topic dealing with serial ports and terminal devices ? Because its getting off topic here.
Serial ports in UNIX are a complicated topic. Sure, if you want.


Quote:
If I am not mistaken you mean that you can move around partitions right ? For example I can unmount the /home partition and put it in a different hard disk all together and use it from there right ?
Depends what you mean by that.

When you mount something atop of /home/, you see the contents of that partition in it and not what was there before.
Quote:
But then why would you call it "partition nesting" ? because that sounds a partition within another partition.
Sorry for the confusion. Perhaps that was poorly worded.

Last edited by Corona688; 07-30-2014 at 04:00 PM..
The Following 2 Users Say Thank You to Corona688 For This Useful Post:
Scrutinizer (07-31-2014), sreyan32 (08-04-2014)
Sponsored Links
    #17  
Old Unix and Linux 07-30-2014
Don Cragun's Unix or Linux Image
Don Cragun Don Cragun is offline Forum Staff  
Administrator
 
Join Date: Jul 2012
Last Activity: 22 February 2017, 12:16 PM EST
Location: San Jose, CA, USA
Posts: 10,007
Thanks: 484
Thanked 3,444 Times in 2,941 Posts
Quote:
Originally Posted by sreyan32 View Post
Okay I am making this post to clarify one of the most confusing topics that I have had about Unix and Linux.

Why do you say that Linux is not Unix ? I mean they are both POSIX compliant and they use the same commands. Agreed that some options that are found in Solaris is not present in Debian, but the general working is same for both OSes.

Also since my college syllabus includes the UNIX OS this semester so I have been doing some amount of reading on the subject. And the book that is recommended to engineering students in India (UNIX Concepts and Applications by Sumitabha Das) goes as far to say -:

Now I just want to know how accurate this really is. And if so why do all the experts that Linux is not UNIX. Also as Corona688 mentioned above GNU is not Unix.

Why is it not ? Is it just because it does not have an official certification ? Or are there actual differences at the kernel level ?
No current Linux system meets POSIX requirements for OS or utilities behavior. On a POSIX conforming system, you never have to give a --posix option to make a utility behave as specified by the POSIX standard. On a POSIX conforming system, the command:

Code:
echo -n abc

will write the characters -n abc and a trailing <newline> character to standard output.

On a POSIX conforming system, each thread in a process shares a single process ID; on a Linux system each thread gets its own process ID.

There are hundreds of places where Linux systems do not conform to POSIX standard requirements. Fortunately, for a lot of the stuff you run into in daily run-of-the-mill programming, they are quite similar. But, if you try write portable code that will work on any POSIX system (and all UNIX branded systems are POSIX conforming systems and have to also meet additional requirements) there is no guarantee that it will run on a Linux system. (Of course no test suite is perfect, so a UNIX or POSIX branded system may have bugs that haven't been caught yet; but vendors of these branded systems once notified that a conformance bug is present have a contractual obligation to fix it within 6 months or lose their right to use the brand.)

As the POSIX standards evolve, they are picking up some new features from Linux systems. And, over time, many GNU Utilities are coming closer to meeting POSIX requirements. But, for the foreseeable future, Linux systems are most definitely not POSIX conforming systems and cannot be branded as UNIX systems or POSIX systems even if one of the Linux distro vendors was willing to pay the certification costs and fill out all of the paperwork involved.

There is also a standard for Linux systems (the Linux Standard Base AKA LSB), but the last I heard, no Linux system has ever conformed to any version of the LSB either.
The Following 2 Users Say Thank You to Don Cragun For This Useful Post:
Scrutinizer (07-31-2014), sreyan32 (08-04-2014)
    #18  
Old Unix and Linux 07-30-2014
Corona688 Corona688 is offline Forum Staff  
Mead Rotor
 
Join Date: Aug 2005
Last Activity: 22 February 2017, 11:00 AM EST
Location: Saskatchewan
Posts: 21,928
Thanks: 1,049
Thanked 4,095 Times in 3,794 Posts
Quote:
Originally Posted by Don Cragun View Post
On a POSIX conforming system, each thread in a process shares a single process ID; on a Linux system each thread gets its own process ID.
Most of your criticisms are quite true! But this one hasn't been true for 10 years. The old threading model -- which amounted to cloned processes sharing the same memory segments -- got thrown out when someone found a big design flaw, they replaced it with NPTL. That means "native POSIX threading library". I expect that's a fair bit closer to compliance.

I expect it would be quite a lot easier for an OS to become POSIX compliant if the tests were easier to get.
The Following 2 Users Say Thank You to Corona688 For This Useful Post:
Don Cragun (07-30-2014), sreyan32 (08-04-2014)
Sponsored Links
    #19  
Old Unix and Linux 07-30-2014
Don Cragun's Unix or Linux Image
Don Cragun Don Cragun is offline Forum Staff  
Administrator
 
Join Date: Jul 2012
Last Activity: 22 February 2017, 12:16 PM EST
Location: San Jose, CA, USA
Posts: 10,007
Thanks: 484
Thanked 3,444 Times in 2,941 Posts
Quote:
Originally Posted by Corona688 View Post
Most of your criticisms are quite true! But this one hasn't been true for 10 years. The old threading model -- which amounted to cloned processes sharing the same memory segments -- got thrown out when someone found a big design flaw, they replaced it with NPTL. That means "native POSIX threading library". I expect that's a fair bit closer to compliance.

I expect it would be quite a lot easier for an OS to become POSIX compliant if the tests were easier to get.
Thanks for letting me know. I said: many GNU Utilities are coming closer to meeting POSIX requirements.
I should have said: many GNU Utilities, Linux libraries, and the Linux kernel are coming closer to meeting POSIX requirements.

Surprisingly enough, the vendors who fund the development and maintenance of the UNIX and POSIX conformance test suites so that their systems can be branded or certified haven't accepted the idea that they should give away the test suites so their competitors in the open source community will have an easier time putting them out of business. Nonetheless, I believe some Linux distro vendors do occasionally pay The Open Group to run the tests for them to see what areas still need work to actually become POSIX certified or UNIX branded. Certification or branding will happen some day, but we aren't there yet.
The Following 3 Users Say Thank You to Don Cragun For This Useful Post:
Corona688 (07-30-2014), Scrutinizer (07-31-2014), sreyan32 (08-04-2014)
Sponsored Links
    #20  
Old Unix and Linux 08-04-2014
sreyan32 sreyan32 is offline
Registered User
 
Join Date: Nov 2012
Last Activity: 4 February 2017, 3:19 AM EST
Posts: 47
Thanks: 25
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by Corona688 View Post
Serial ports in UNIX are a complicated topic. Sure, if you want.
Thanks a lot first of all Corona688 for being extremely patient with all my queries and answer them as simply as possible. Now I am thinking of starting a new thread about Serial ports, but before that I am asking for some reading material on serial ports and terminal devices. So that when I come back to ask my doubts here they don't need to be quite so noobish and obvious questions.

Any links to some study materials for beginners for this topic would really help. Also if anyone can suggest a good book which contains material on this topic will also be nice.

I am asking here because googling on the topic didn't give me any concrete starting point.

Serial ports maybe complex but I am already interested in how they work Linux. First time coming across a design where a terminal communicates to the kernel through a COM port.

Moderator's Comments:
Is UNIX an open source OS ? edit by bakunin: You should indeed start a new thread with this. We try to confine each question/theme to a separate thread so that the knowledge base we are building is easier and better to search for information. I will cut this part out and open a new thread with it.

See here: Serial Lines Explained


---------- Post updated at 08:20 PM ---------- Previous update was at 08:17 PM ----------

Quote:
Originally Posted by Don Cragun View Post
There is also a standard for Linux systems (the Linux Standard Base AKA LSB), but the last I heard, no Linux system has ever conformed to any version of the LSB either.
Could you elaborate on this point further. I mean if no one conformed to a standard how on earth is that standard still surviving. And also why is it there ??

Last edited by bakunin; 08-04-2014 at 12:20 PM..
Sponsored Links
    #21  
Old Unix and Linux 08-04-2014
bakunin bakunin is offline Forum Staff  
Bughunter Extraordinaire
 
Join Date: May 2005
Last Activity: 22 February 2017, 10:07 AM EST
Location: In the leftmost byte of /dev/kmem
Posts: 5,345
Thanks: 98
Thanked 1,457 Times in 1,085 Posts
Quote:
Originally Posted by sreyan32 View Post
Could you elaborate on this point further. I mean if no one conformed to a standard how on earth is that standard still surviving. And also why is it there ??
For the same reason why there is a OSI-reference protocol stack which is (almost) nowhere implemented. It is an ideal against which each "real existing implementation" is measured. Even if no implementation fully conforms to it every one is - at least in theory - striving to do so and asymptotically converging towards it.

Take the OSI-reference model for networks as an example: to my knowledge the whole seven layers of it where only once being implemented (in some obscure DEC network stack working under VMS), but every network protocol is compared against it and we say that "IP is a layer-3 protocol", even though TCP/IP was not built with the OSI reference model in mind and in fact - from a theoretical POV - really covers only the layers 3, 4 and 5.

I hope this helps.

bakunin
Sponsored Links
Closed

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Linux More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Open-source projects to learn concurrency-managed network programming in Unix? TheTaoOfPhil UNIX for Dummies Questions & Answers 2 08-25-2012 05:40 AM
need open source KB software for UNIX RJ45 UNIX and Linux Applications 0 02-03-2011 11:38 AM



All times are GMT -4. The time now is 02:13 PM.