home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   alt.os.development      Operating system development chatter      4,255 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 2,939 of 4,255   
   mutazilah@gmail.com to Scott Lurndal   
   Re: MBR and sector size   
   31 Oct 21 11:16:44   
   
   From: muta...@gmail.com   
      
   On Monday, November 1, 2021 at 1:07:33 AM UTC+11, Scott Lurndal wrote:   
      
   > >> Congratulations, you've re-invented Unix 'block' and 'character'   
   > >> devices.   
   > >   
   > >An ordinary file is considered to be a "device", is it?   
   > >   
   > >Regardless, would you expect a C library to have different paths   
   > >for dealing with block devices vs character devices?   
      
   > The entire point of Unix was to treat all files as simple streams   
   > of bytes. The C library didn't give a shit about the file type.   
   > The Operating System ensured that all files (disk, tape, terminal,   
   > card readers, line printers, et alia) appear to the application as   
   > a simple stream of bytes.   
      
   I thought the goal was for the application to get a simple   
   stream of bytes, not necessarily the C library.   
      
   For the C library, I think/guess that it should be aware of   
   whether it is dealing with a block device or a character   
   device. If it is dealing with a block device, then, for instance,   
   it shouldn't issue a write() syscall until it has a buffer of   
   suitable size for that device. Similarly, it should be conscious   
   when seeking that it is seeking to a block boundary, and   
   reading should be done of an entire block.   
      
   > >And does MVS deal exclusively with block devices?   
      
   > MVS, and the old mainframe paradigm of logical record   
   > sizes, record formats, blocking factors are very thankfully   
   > obsolete.   
      
   I'm with Joe on that, but regardless, I wish to support this   
   paradigm AND the Unix paradigm. It's just unclear to me   
   whether Unix should be compiled with both flavors of code,   
   one to deal with character devices and one to deal with   
   block devices. Currently Unix is exclusively character and   
   MVS is exclusively block.   
      
   BFN. Paul.   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca