Download BAB 8 SISTEM PENGOPERASIAN

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts
Transcript
The Using of Operating System
„ Past time : OS is provided by machine
manufacturer
„ 1960 IBSYS (IBM) – tape based operating system
supplied for IBM7090 and IBM7094 computers.
„ 1964 OS/360 (IBM) – batch processing operating
systems.
„ 1964 TOPS-10 (DEC)
„ 1967 DOS/360 (IBM)
„ End of 1960s: UNIX is produced
„
UNIX is non-computer manufacturing
company
„ In 1978 – MS-DOS produced by Microsoft for
IBM
„ 1981 – PC-DOS
„ Other example of OS: Suse Linux, UBuntu,
Palm OS, Debian, Novell
OS Components
„ Programmers do not work with the hardware directly but
virtual
„ Therefore, facilities provided by the OS is as follows:
„
„
„
„
„
Virtual processors
Virtual memory
Virtual I/O devices
Virtual set of instruction
Operator for file system
File System
„ File is a combination of disk blocks
„ Type of Files
Sequential File
„ Random Access File
„
„ System File Organization
„
Directory / Catalog
„ Security of File System
„
Use password for access guaranteed
Instruction Set in OS
„ Can be done in several ways such as interrupts
„ 2 types
„
„
Instruction in Machine Level language
Instruction provided by OS (system call)
„ Instructions provided by OS
„
„
„
„
„
Managing virtual processors
Managing virtual memory
Managing virtual devices
Managing file systems
Etc such as manage the time and date
Instruction on Process Control
„ Create process
„ Execute process
„ End the process execution
„ Communicated to the other processes.
Instruction on File Control
„ Create file
„ Open file for read / write
„ Close file after used
„ Copy file
„ Delete file
„ Rename file
„ Determined the security code for file
„ Create directory
„ Transfer the directory
„ Delete the Directory
Operating System Design
„ To manage its components
„ Manage virtual processor
„ Manage memory
„ Manage I/O
„ Manage System File
File System Management
„ Directory – keep files information
„ File name
„ Physical location of file in disk
„ Type of files
„ Information of File Management
„ Information of File Maintenance
„ File storage allocation
„ Files divided into blocks of same of file size
„ Blocks of the file does not necessarily adjacent
File System Management
„
Block Indexes
„
Using directory + block indexes + file information
Block indexes
Directory
Block indexes
File block
History of UNIX
„ 1969
The Beginning
„ The history of UNIX starts back in 1969, when Ken Thompson,
Dennis Ritchie and others started working on the "little-used
PDP-7 in a corner" at Bell Labs and what was to become UNIX.
„ 1971
„ First Edition
„ It had a assembler for a PDP-11/20, file system, fork(), roff and
ed. It was used for text processing of patent documents.
„ 1973
„ Fourth Edition
„ It was rewritten in C. This made it portable and changed the
history of OS's.
„ 1975
„ Sixth Edition
„ UNIX leaves home. Also widely known as Version 6, this is the
first to be widely available out side of Bell Labs. The first BSD
version (1.x) was derived from V6.
„
„ 1979
Seventh Edition
„ It was a "improvement over all preceding and following Unices"
[Bourne]. It had C, UUCP and the Bourne shell. It was ported to
the VAX and the kernel was more than 40 Kilobytes (K).
„ 1980
„ Xenix
„ Microsoft introduces Xenix. 32V and 4BSD introduced.
„ 1982
„ System III
„ AT&T's UNIX System Group (USG) release System III, the first
public release outside Bell Laboratories. SunOS 1.0 ships. HPUX introduced. Ultrix-11 Introduced.
„ 1983
„ System V
„ Computer Research Group (CRG), UNIX System Group (USG)
and a third group merge to become UNIX System Development
Lab. AT&T announces UNIX System V, the first supported
release. Installed base 45,000.
„
„
„
„
„
„
1984
„ 4.2BSD
„ University of California at Berkeley releases 4.2BSD, includes TCP/IP,
new signals and much more. X/Open formed.
1984
„ SVR2
„ System V Release 2 introduced. At this time there are 100,000 UNIX
installations around the world.
1986
„ 4.3BSD
„ 4.3BSD released, including internet name server. SVID introduced.
NFS shipped. AIX announced. Installed base 250,000.
1987
„ SVR3
„ System V Release 3 including STREAMS, TLI, RFS. At this time there
are 750,000 UNIX installations around the world. IRIX introduced.
1988
„ POSIX.1 published.
„ Open Software Foundation (OSF) and UNIX International (UI) formed.
Ultrix 4.2 ships.
„
„
„
„
„
„
„
„
1989 AT&T UNIX Software Operation formed in preparation for spinoff of
USL. Motif 1.0 ships.
1989 SVR4UNIX System V Release 4 ships, unifying System V, BSD and
Xenix. Installed base 1.2 million.
1990 XPG3X/Open launches XPG3 Brand. OSF/1 debuts. Plan 9 from Bell
Labs ships.
1991 UNIX System Laboratories (USL) becomes a company - majorityowned by AT&T. Linus Torvalds commences Linux development. Solaris
1.0 debuts.
1992 SVR4.2 USL releases UNIX System V Release 4.2 (Destiny). October
- XPG4 Brand launched by X/Open. December 22nd Novell announces
intent to acquire USL. Solaris 2.0 ships.
1993 4.4BSD 4.4BSD the final release from Berkeley. June 16 Novell
acquires USL
Late 1993 SVR4.2MPNovell transfers rights to the "UNIX" trademark and
the Single UNIX Specification to X/Open. COSE initiative delivers "Spec
1170" to X/Open for fasttrack. In December Novell ships SVR4.2MP , the
final USL OEM release of System V
1994 Single UNIX Specification BSD 4.4-Lite eliminated all code claimed
to infringe on USL/Novell. As the new owner of the UNIX trademark,
X/Open introduces the Single UNIX Specification (formerly Spec 1170),
separating the UNIX trademark from any actual code stream.
„ 1995 UNIX 95X/Open introduces the UNIX 95 branding programme for
implementations of the Single UNIX Specification. Novell sells
UnixWare business line to SCO. Digital UNIX introduced. UnixWare 2.0
ships. OpenServer 5.0 debuts.
„ 1996 The Open Group forms as a merger of OSF and X/Open.
„ 1997Single UNIX Specification, Version 2The Open Group
introduces Version 2 of the Single UNIX Specification, including support
for realtime, threads and 64-bit and larger processors. The specification
is made freely available on the web. IRIX 6.4, AIX 4.3 and HP-UX 11
ship.
„ 1998UNIX 98The Open Group introduces the UNIX 98 family of
brands, including Base, Workstation and Server. First UNIX 98
registered products shipped by Sun, IBM and NCR. The Open Source
movement starts to take off with announcements from Netscape and
IBM. UnixWare 7 and IRIX 6.5 ship.1999UNIX at 30The UNIX system
reaches its 30th anniversary. Linux 2.2 kernel released. The Open
Group and the IEEE commence joint development of a revision to
POSIX and the Single UNIX Specification. First LinuxWorld
conferences. Dot com fever on the stock markets. Tru64 UNIX ships.
„ 2001 Single UNIX Specification, Version 3Version 3 of the
„
„
„
„
Single UNIX Specification unites IEEE POSIX, The Open Group
and the industry efforts. Linux 2.4 kernel released. IT stocks
face a hard time at the markets. The value of procurements for
the UNIX brand exceeds $25 billion. AIX 5L ships.
2003 ISO/IEC 9945:2003The core volumes of Version 3 of the
Single UNIX Specification are approved as an international
standard. The "Westwood" test suite ship for the UNIX 03 brand.
Solaris 9.0 E ships. Linux 2.6 kernel released.
2007Apple Mac OS X certified to UNIX 03.
2008 ISO/IEC 9945:2008Latest revision of the UNIX API set
formally standardized at ISO/IEC, IEEE and The Open Group.
Adds further APIs
2009 UNIX at 40 IDC on UNIX market -- says UNIX $69 billion
in 2008, predicts UNIX $74 billion in 2013
Example of OS Level : Unix
„ 3 subsystems
„ Subsystem file management
„ Subsystem process management
„ Subsystem I/O
Example of OS Level : Unix
„ Subsystem file management
Manage File system – open, close, read etc
„ Provide disk space for files
„ Managing free space on disk
„ Controlling file access
„
Example of OS Level : Unix
„ Subsystem process management
„
„
„
„
Managing the creation of child process from
parent process
Communication between processes through pipes
Memory management
„ Each process provided in3 segments: code,
data, stack
Process scheduling
Example of OS Level : Unix
„ Subsystem I/O
„
„
„
„
„
„
Combination of device drivers
Connecting a CPU to the Outside World
Read-Only, Write-Only, Read/Write, and Dual I/O
Ports
I/O (Input/Output) Mechanisms
A typical program does three basic activities:
input, computation, and output.
How the CPU transfers bytes of data to and from
the outside world.
Example of OS Level : Unix
„ Memory management
„ Unix related systems use very sophisticated
memory management algorithms to make
efficient use of memory resources.
„ There are three different kinds of memory,
three different ways they can be used by the
operating system, and three different ways
they can be used by processes.
„
„
„
Main
File System
Swap Space
Example of OS Level : Unix
„ Kinds of Memory
„ Main - The physical Random Access Memory located
on the CPU motherboard that most people think of
when they talk about RAM.
„ File System - Disk memory accessible via
pathnames. This does not include raw devices, tape
drives, swap space, or other storage not addressable
via normal pathnames.
„ Swap Space - Disk memory used to hold data that is
not in Real or File System memory. Swap space is
most efficient when it is on a separate disk or partition,
but sometimes it is just a large file in the File System.
Example of OS Level : Unix
„ OS Memory Uses:
„
Kernel - The Operating System's own (semi-)private
memory space. This is always in Main memory.
„
Cache - Main memory that is used to hold elements of
the File System and other I/O operations. Not to be
confused with the CPU cache or or disk drive cache,
which are not part of main memory.
„
Virtual - The total addressable memory space of all
processes running on the given machine. The physical
location of such data may be spread among any of the
three kinds of memory.
Example of OS Level : Unix
„ Process Memory Uses:
„
Data - Memory allocated and used by the program
(usually via malloc, new, or similar runtime calls).
„
Stack - The program's execution stack (managed
by the OS).
„
Mapped - File contents addressable within the
process memory space.
History of MS DOS
„ In May 1982Microsoft released MS-DOS v1.1 to IBM, for the
IBM PC. It supported 320KB double-sided floppy disk drives.
Microsoft also released MS-DOS v1.25, similar to v1.1 but for
IBM-compatible computers.
„ In March 1983, MS-DOS v2.0 for PCs is announced. It was
written from scratch, supporting 10 MB hard drives, a treestructured file system, and 360 KB floppy disks. October saw
IBM introducing PC-DOS v2.1 with the IBM PCjr.
„ In March 1984, Microsoft released MS-DOS v2.1 for the IBM
PCjr. Microsoft released MS-DOS v2.11 a short time later. It
included enhancements to better allow conversion into different
languages and date formats. In August, Microsoft released MSDOS v3.0 for PCs. It added support for 1.2MB floppy disks, and
bigger (than 10 MB) hard disks. In November, Microsoft
released MS-DOS v3.1, adding support for Microsoft networks.
History of MS DOS
„ In January 1986, Microsoft released MS-DOS v3.2. It
added support for 3.5-inch 720 KB floppy disk drives.
Microsoft released MS-DOS v3.25 as well.
„ In April 1987, IBM announced DOS v3.3 for PCs, for
$120. In August Microsoft shipped MS-DOS v3.3. In
November Compaq shipped MS-DOS v3.31 with
support for over 32MB drives.
„ In 1988 Digital Research transformed CP/M into DR
DOS. In June Microsoft released MS-DOS v4.0,
including a graphical/mouse interface. In July IBM
shipped DOS v4.0, which included a shell menu
interface and support for hard disk partitions over 32
MB. In November Microsoft released MS-DOS
v4.01.
History of MS DOS
„ In April 1990, Microsoft introduced Russian MS-DOS v4.01 for
„
„
„
„
the Soviet market.
May saw Digital Research releasing DR DOS v5.0.
In June 1991, Microsoft released MS-DOS v5.0. It added a fullscreen editor, undelete and unformat utilities and task swapping.
GW-BASIC is replaced with Qbasic, based on Microsoft's
QuickBASIC. In September Digital Research Inc. releases DR
DOS v6.0, for $100.
In March 1993, Microsoft introduced the MS-DOS v6.0 upgrade,
including DoubleSpace disk compression. 1 million copies of the
new and upgraded versions were sold through retail channels
within the first 40 days.
In November, Microsoft released MS-DOS v6.2.
History of MS DOS
„ In February 1994, Microsoft released MS-DOS v6.21,
removing DoubleSpace disk compression. April IBM
releases PC-DOS v6.3.
„ In June Microsoft releases MS-DOS v6.22, bringing
back disk compression under the name DriveSpace.
„ In February 1995, IBM announced PC DOS v7, with
integrated data compression from Stac Electronics
(Stacker). In April, IBM released PC DOS v7.
„ In August of 1995 Microsoft introduced Windows 95,
it included MS DOS v7.0 but it's clear that DOS is
going to remain a constant for several years to come.
Example of OS Level : MS-DOS
„ Process management
„ One process at one time
„ Space is large – several processes in memory but only
one active
„ Memory management
„ Memory space is divided into 4 regions
„ Conventional memory
„
„
„
Upper memory area
High memory Area
Extended Memory
Memory Model for MS-DOS
16M
1M +
64K
Extended Memory
Buffer & RAM
High Memory Area
MS-DOS
1M
Upper Memory Area
ROM, I/O, MS-DOS
640K
Conventional Memory
MS-DOS, device driver,
user proprograms
Example of OS Level : MS-DOS
„ Conventional memory:
„ Memory part that can be used to store
„ MS-DOS
„ Device drivers
„ User programs
„ Upper memory area:
„ Reserved for Video ROM, Basic ROM, other functions
related to I/O
Example of OS Level : MS-DOS
„ High Memory Area (HMA)
„ Size 64K
„ In the 286 processor - 286 – MS-DOS is stored in this
space to give more space to the user programs
„ Extended Memory
„ 286 processor can be addressed up to 16M
„ 386 and 486 processors can be addressed up to 4G
„ Used for RAM & buffer
Example of OS Level : MS-DOS
„ Memory Management
„
„
„
„
The act of managing computer memory.
The management of main memory is critical to the
computer system.
Virtual memory systems separate the memory
addresses used by a process from actual physical
addresses, allowing separation of processes and
increasing the effectively available amount of RAM
using disk swapping.
Garbage collection is the automated allocation,
and deallocation of computer memory resources
for a program.
Example of OS Level : MS-DOS
„ Relocation
„
In systems with virtual memory, programs in memory must
be able to reside in different parts of the memory at different
times. Memory management in the operating system should
therefore be able to relocate programs in memory and
handle memory references.
„ Protection
„
Processes should not be able to reference the memory for
another process without permission. Prevents malicious or
malfunctioning code in one program from interfering with the
operation of other running programs.
„ Sharing
„
Even though the memory for different processes is normally
protected from each other, different processes sometimes
need to be able to share information.
Example of OS Level : MS-DOS
„ Logical organization
„
The memory management is responsible for
handling this logical organization that is different
from the physical linear address space.
„ Physical organization
„
Memory is usually divided into fast primary
storage and slow secondary storage. Memory
management in the operating system handles
moving information between these two levels of
memory.
Example of OS Level : MS-DOS
„ DOS memory managers
„ In addition to standard memory management, the 640 KB barrier
of MS-DOS and compatible systems led to the development of
programs known as memory managers when PC main
memories started to be routinely larger than 640 KB in the late
1980s.
„ These move portions of the operating system outside their
normal locations in order to increase the amount of conventional
or quasi-conventional memory available to other applications.
„ Examples are EMM386, which was part of the standard
installation in DOS's later versions, and QEMM. These allowed
use of memory above the 640 KB barrier, where memory was
normally reserved for RAMs, and high and upper memory.
Example of OS Level : MS-DOS
„ Management of File System
MS-DOS 1.0 : file system CP/M
„ MS-DOS 2.0 : file system Unix
„ File naming system
„
8 characters file name
„ 3 characters extension name
„
ƒ *.bat
ƒ *.exe
Example of OS Level : MS-DOS
„ Device Management
„ The extension such as *.sys e.g mouse.sys, config.sys
„ System call for:
„ Component management for OS Level
„ Same as UNIX
„ Perform by interrupts
Example of OS Level : MS-DOS
„ BIOS – Used to start a system
On the PC
Loads MSDOS to the
main
memory
Controller
point to
ROM
Jump to the
BIOS
setting of
the
originator
Read boot
sektor
Test
hardware
Example of Command : Unix
„
„
„
„
„
„
„
„
„
„
„
„
cat --- for creating and displaying short files
chmod --- change permissions
cd --- change directory
cp --- for copying files
date --- display date
echo --- echo argument
ftp --- connect to a remote machine to download or
upload files
grep --- search file
head --- display first part of file
ls --- see what files you have
lpr --- standard print command (see also print )
more --- use to read files
Example of Command : Unix
„ mkdir --- create directory
„ mv --- for moving and renaming files
„ ncftp --- especially good for downloading files via
„
„
„
„
„
„
„
„
„
„
„
anonymous ftp.
print --- custom print command (see also lpr )
pwd --- find out what directory you are in
rm --- remove a file
rmdir --- remove directory
rsh --- remote shell
setenv --- set an environment variable
sort --- sort file
tail --- display last part of file
tar --- create an archive, add or extract files
telnet --- log in to another machine
wc --- count characters, words, lines
Example of Command : Unix
„ cat
„
„
„
% cat >dict red rojo green verde blue azul <control-D>
% <control-D>
% cat dict red rojo green verde blue azul %
„ wc
% wc -l dict2 8 The command wc counts things --- the number
of characters, words, and line in a file.
„ chmod
„
„
„
This command is used to change the permissions of a file or
directory. For example to make a file essay.001 readable by
everyone, we do this:
% chmod a+r essay.001 To make a file, e.g., a shell
script mycommand executable, we do this
„ cd
„
„
Use cd to change directory. Use pwd to see what directory you are
in.
% cd english % pwd % /u/ma/jeremy/english %
Example of Command : Unix
„ cp
„
„
Use cp to copy files or directories. % cp foo foo.2
This makes a copy of the file foo. % cp
~/poems/jabber . This copies the file jabber in the
directory poems to the current directory. The symbol "."
stands for the current directory. The symbol "~" stands
for the home directory.
„ date
„ Use this command to check the date and time. % date
Fri Jan 6 08:52:42 MST 1995
Example of Command : Unix
„ echo
„
„
„
„
„
The echo command echoes its arguments. Here are some
examples:
% echo this this
% echo $EDITOR /usr/local/bin/emacs
% echo $PRINTER b129lab1
% echo PRINTER PRINTER
Example of Command : Unix
„ ftp
„
„
„
„
„
„
Use ftp to connect to a remote machine, then upload or
download files.
% ftp solitude
Connected to fubar.net. 220 fubar.net FTP server (Version
wu-2.4(11) Mon Apr 18 17:26:33 MDT 1994) ready.
Name (solitude:carlson): jeremy 331 Password required for
jeremy.
Password: 230 User jeremy logged in. ftp> cd mystuff 250
CWD command successful. ftp> get homework11 ftp> quit
Example 2: We'll connect to the machine fubar.net, then
change director to mystuff, then upload the file collectedletters:
ftp> binary ftp> put foo ftp> ascii ftp> get bar The
file foo was transferred in binary mode, the file bar was
transferred in ascii mode.
Example of Command : MS DOS
„ ansi.sys (File)
„ append (External)
„ arp (External)
„ assign (External)
„ assoc (Internal)
„ at (External)
„ atmadm (internal)
„ attrib (external)
„ batch (recovery)
Defines functions that change display
graphics, control cursor movement, and
reassign keys.
Causes MS-DOS to look in other directories
when editing a file or running a command.
Displays, adds, and removes arp information
from network devices.
Assign a drive letter to an alternate letter.
View the file associations.
Schedule a time to execute commands or
programs.
Lists connections and addresses seen by
Windows ATM call manager.
Display and change file attributes.
Recovery console command that executes a
series of commands in a file.
Example of Command : MS DOS
„ bootcfg (recovery)
„
„
„
„
„
break (internal)
cacls (external)
call (internal)
cd (internal)
sort (external)
„ start (internal)
„ subst (external)
„ switches (internal)
„ sys (external)
„ telnet (external)
Recovery console command that allows a
user to view, modify, and rebuild the
boot.ini
Enable / disable CTRL + C feature.
View and modify file ACL's.
Calls a batch file from another batch file.
Changes directories.
Sorts the input and displays the output to
the screen.
Start a separate window in Windows from
the MS-DOS prompt.
Substitute a folder on your computer for
another drive letter.
Remove add functions from MS-DOS.
Transfer system files to disk drive.
Telnet to another computer / device from
the prompt.
Example of Command : MS DOS
„ time (internal)
„ title (internal)
„ tracert (external)
„
„
„
„
„
„
„
„
„
View or modify the system time.
Change the title of their MS-DOS window.
Visually view a network packets route across a
network.
tree (external)
View a visual tree of the hard disk drive.
type (internal) Display the contents of a file.
undelete (external)
Undelete a file that has been deleted.
unformat (external)
Unformat a hard disk drive.
unlock (external)
Unlock a disk drive.
ver (internal)
Display the version information.
verify (internal)
Enables or disables the feature to determine if
files have been written properly.
vol (internal)
Displays the volume information about the
designated drive.
Xcopy (external)
Copy multiple files, directories, and/or drives
from one location to another.