Objectives
We would like to :
Discuss the services provided by an operating system from several different perspectives.
Describe different forms of user interface.
Notes
Last chapter we discussed how an os can be viewed many different ways.
This chapter focuses in on what the authors intend us to study.
This is section 2.1, read it.
Figure 2.1 on page 56 is worth a quick glance.
What does the OS do for the user
The user interface.
Program execution
File System (manipulation)
Communications
Between processes on the same machine
To other machines
Two ideas
Shared memory, multiple processes can read/write to the same memory
Message Passing
But this implies synchronization and some locking mechanism.
Error Detection
Which again implies some form of communications.
What about from a system operation view?
Resource allocation
CPU, memory, file space, device, ...
Logging
Keeping track of what is happening
For security, billing, or even error detection/correction
Protection and security
The next section discusses user interfaces.
This is section 2.2. Read it as well
They break user interfaces into three big categories
Command line interfaces
Graphical User Interface
Touch Screen Interface
I would propose voice command interface as well.
All have the commonality of making the computer system usable.
Command line interfaces
Usually through a command interpreter
They say a
shell
is a command interpreter on a system with choices
On linux/unix
you probably use the Bourne Again shell (bash)
This came from the Bourne Shell (sh),
Written in the 70s by Stephen Bourne at Bell Labs.
Others include
csh - c shell (c like control structures)
ksh (Korn shell, written by David Korn, like sh)
busybox, aimed at embedded boxes, but some people love it.
Many others, some semesters we write a partial shell in systems programming.
Shells allow/support
Shell scripts, or programs that are executed by the shell.
This includes
Control structures
Variables
for f in ../ch1/* do wc $f done
I/O redirection
Define a working environment (envp)
Customization of user experience.
Process control: starting, stopping, suspending, ...
Two approaches
The shell has many built in commands, the shell provides all interaction with the os.
The system provides all commands, the shell finds these and executes them.
Linux/Unix can do either of these.
Bash supports
pushd, popd
: to change directories, but store the old one on the stack.
But most commands are in /bin or /usr/bin
whereis command
which command
, for me which is a highly customzed alias.
Shells are highly complex tools, I totally underuse bash.
GUI
First developed in the 1970s at Xerox Parc (Xerox's research lab)
Windows
X in the Unix world.
Like the shell, this is not part of the kernel
Does the touch screen deserve a separate classification?
I enjoyed the justification for using cli.