Опубликован: 06.08.2012 | Доступ: свободный | Студентов: 1189 / 25 | Оценка: 5.00 / 5.00 | Длительность: 53:41:00
Дополнительный материал 2:

The evolution of FreeBSD

< Дополнительный материал 1 || Дополнительный материал 2: 12

FreeBSD Version 4

FreeBSD Release 4.0 appeared in March 2000. It included a number of significant changes from Release 3. At the time of writing, FreeBSD Release 4 is still a current release, in parallel with Release 5.

First, the good news: the differences between Release 3 and Release 4 aren't as far-reaching or as complicated as the differences between Release 2 and Release 3. Still, there are a couple of things that you need to know. There are also a few things that make installation easier. You can get a blow-by-blow description of the changes from the file /usr/src/UPDATING. This document discusses the following more important new features:

  • From Release 4, FreeBSD no longer has block devices.
  • The base operating system now includes OpenSSH. This may conflict with the ports/security/ssh port: the base OpenSSH is installed in /usr/bin and the port goes into /usr/local/bin. Most paths have /usr/bin in the path before /usr/local/bin, so problems may arise. If you don't want OpenSSH, add the following line to /etc/make.conf:
    NO_OPENSSH=yes
    

    You will also need to enable OpenSSH in /etc/rc.conf if you want to run the new servers. You may need to move your host key and other config files from /usr/local/etc to /etc/ssh.

    OpenSSH has different command line parsing, available options and default settings from ssh, so you should takesome care in its operation. Perform a full audit of all configuration settings.

  • sendmail.cf has moved from /etc/sendmail.cf to /etc/mail/sendmail.cf. In addition to moving this file, you may need to adjust /etc/rc.conf.
  • xntpd has been updated to Revision 4. The name of the daemon has changed from xntpd to ntpd, so you may need to update your /etc/rc.conf file. The ntp.conf files are compatible with the old release, unless you are using a local reference clock. You can find more details about ntp4 at http://www.ntp.org/.
  • There is a newdriverfor ATA. (IDE) drives. See page 643 for more details.
  • Release 3 supported both the old and the newnames for SCSI devices, for example /dev/sd0 and /dev/da0. The old names are no longer there in Release 4, so if you're upgrading you should check your /etc/fstab and /etc/rc.conf and change the names where necessary.
  • bad144 support for old WD and ESDI driveshas been removed.
  • The mfs driver has been replaced with the md driver. Accordingly the MFS_ROOT and MFS_ROOT_SIZE kernel configuration options have been replaced by MD_ROOT and MD_ROOT_SIZE. See the GENERIC or LINT configuration files for more details.
  • Some Ethernet drivers no longer supports hard wired addresses in the config file. This is part of an on-going process to remove static hardware information from the kernel and to enable learning it at boot time.
  • /var/cron/log has been moved to /var/log/cron to get all the log files in one place.
  • User-visible TCP timers are nowexpressed in units of 1ms, instead of 500ms, so if you've customized any timer values under net.inet.tcp, multiply them by 500 to preserveTCP'sbehavior.
  • The bpfilter device has been renamed to bpf.
  • Vinum now supports a simplified interface. See the man page vinum(8) for details.
  • A new driver, ida,was introduced for the Compaq Smart Raid array.
  • The lpt driver has been rewritten using ppbus. See ppbus(4) for details.
  • Linux threads options has gone away (they are now standard in the FreeBSD kernel).
  • From Release 4, FreeBSD supports PAM (Pluggable Authentication Modules'). This requires a newfile /etc/pam.conf. If you don't have this (for example, if you're upgrading from an older release of FreeBSD, and you don't install the file), you'll get relatively harmless error messages.
  • For improved security, FreeBSD Release 4 runs named as a new user and group, both called bind.
  • The floppy tape driver ft has been removed from the kernel. There is no replacement: this driver was always very non-standard, and the hardware that it supports is unreliable and obsolete.
  • There are new key board and video card drivers. We'll look at them in more detail on page 643.

No more block devices

From the beginnings of UNIX, users were confused by the fact that a disk drive could appear in two different ways, either a blockdevice or a character device, also called a raw disk. For example, your root partition might have been one of these:

$ ls -l /dev/wd0a /dev/rwd0a
crw-r  1  root   operator   3,   0 Oct 19   1997 /dev/rwd0a
brw-r  1  root   operator   0,   0 Oct 19   1997 /dev/wd0a

Araw device always accesses the drive directly. As a result, you're limited to the way the drive is organized: the transfer must start on a sector1Data on disk used to be stored in units called sectors.Modern disks store data in a number of different ways, butthis is not visible outside the drive.The externally visible unit of data is still a sector of 512 bytes boundary and must be an integral number of sectors long. By contrast, block devices are buffered: instead of accessing the disk directly, the system transfers data via an area of memory called buffer cache. You access the copyofthe data in buffer cache. This has the advantages that you can access it much more quickly if it is in cache, and you don't have to pay any attention to sector boundaries. Still, having two different kinds of device is confusing, and it's obvious why we should want to simplify things.

But why are block devices going away, and not the rawdisks? Until recently, for example, Linux didn'thave any raw disk access, only block devices. There are a number of reasons to prefer to keep the rawdisks:

If you want to access disks in an aligned fashion, it's faster: you don'thave to go via buffer cache. This also saves memory.

If you have an error on a write to a raw device, you get an error indication immediately.On a block device, the error may not occur until after the process has terminated, too late to try to recover.

The buffer cache isn't going away, only the device interface. It's very seldom that you'll find a need to access disk devices directly from user context. The most common access is via a file system or as swap. In the former case, the file system provides the buffering, and in the latter case it's counter productive, since swap always writes entire pages. The only other access to disk devices is from system programs like disklabel, newfs and mount, all of which have always accessed the raw device.

For most users, the biggest difference is that you will neveruse a name like /dev/rda0a again; instead, it will become /dev/da0a. If you are upgrading, you must run /dev/MAKEDEV to recreate the device nodes.

Note that in Release 5 of FreeBSD, /dev/MAKEDEV is no longer needed.

New ATA (IDE) disk driver

There is a new driver, ata, for ATA (AT attachment) drives, which were formerly called IDE. It supports not only disks but also ATAPI CD-ROM and DVD drives, ZIP drives and tape streamers.

In the process, the name of the devices has changed: disk drives are now called ad,CD-ROM drives are called acd, LS-120 floppies are called afd, and tapes are called ast.

For a transition period, the wd driver remains available, but you shouldn't use it unless you have very good reasons, for example if you have old or unusual hardware that has trouble with the ad driver.

New console driver

FreeBSD Release 4 includes a new console driver. The configuration file entries have changed. See the GENERIC configuration file for more details.

FreeBSD Release 5

FreeBSD Release 5 is the latest release of FreeBSD. It has a number of new features, most of which are transparent to the user. There's a complete list in the release notes, which you should certainly read if you're upgrading the system, but here are some highlights:

SMP (symmetric multiprocessor) support has been rewritten from scratch. This will ultimately give much better performance and scalability,though currently the performance potential has not been fully realized. We looked at some of the visible differences on page 148.

The kqueue event notification facility is a newinterface that is able to replace poll and select. It offers improved performance as well as the ability to report many different types of events. Support for monitoring changes in sockets, pipes, fifos, and files are present, as well as for signals and processes.

A large number of kernel configuration options have been turned into boot-time tunable variables, and the need to build specific kernels has become much more seldom.

The Kernel-Scheduled Entity (KSE) project offers multi-threading in the kernel.

Support for the 80386 processor has been removed from the GENERIC kernel, as this code seriously pessimizes performance on other IA32 processors.

The I386_CPU kernel option to support the 80386 processor is now mutually exclusive with support for other IA32 processors; this should slightly improve performance on the 80386 due to the elimination of run time processor type checks.

Custom kernels that will run on the 80386 can still be built by changing the cpu options in the kernel configuration file to only include I386_CPU.

Support has been added for 64 bit SPARC and IA 64 (Itanium) processors.

The system includes the device file system, or dev/s. In older releases of FreeBSD, as in other versions of UNIX, the directory /dev contained device nodes, entries that looked like files but which in fact described a possible device on the system. The problem was that there was no good way to keep the device nodes in sync with the kernel, and problems occurred where the hardware corresponding to a device node didn't exist (a "Device not configured" error), or where the device node corresponding to the hardware did not exist (a "no such file or directory" error). devfs solves this problem by creating at boot time the device nodes for the hardware the system finds.

The disk I/O access system has been rearranged and made more flexible with the GEOM framework.

A number of file system enhancements have been made. The standard UFS file system now supports snapshots and background file system checking after a crash, significantly reducing reboot time after a crash.

UFS has been significantly enhanced as UFS2. It supports files larger than 1 TB and extended file attributes.

The PCMCIA code has been rewritten and now supports CardBus devices.

The default kernel no longer supports a.out file format. You can still execute these files by loading the aout.ko KLD.

FreeBSD now supports the Advanced Configuration and Power Interface (ACPI), the replacement for APM.

It is now possible to increase the size of ufs file systems with the growfs command.

Vinum now supports the root file system. See "Chapter 12" for details.

< Дополнительный материал 1 || Дополнительный материал 2: 12
Сергей Битко
Сергей Битко
Украина
Berkut Molodoy
Berkut Molodoy
Россия