Download Chapter 14: The User View of Operating Systems 0

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

File locking wikipedia , lookup

Computer file wikipedia , lookup

Business intelligence wikipedia , lookup

Expense and cost recovery system (ECRS) wikipedia , lookup

Transcript
Chapter 14: The User View of Operating Systems
0. Introduction
• Services provided to the user
• Medium for delivery of services
• More interest in concepts than in specific commands
1. Purpose of the User Interface
• Not to interact with the O/S per se, but to help use the system productively
• (common look and feel) reduce user’s learning curve.
o Move is toward using web browsers as this look and feel.
• Provide a variety of services with these approaches:
o Command interface (either CLI or GUI)
o Groups of commands via a scripting language
o Requests from programs via the API
• Commonly provided services:
o Loading and execution of program files
o File access
o I/O services
o Security and data integrity protection
o Interuser communication and shared data and programs
o Status of system and its files
• Many systems provide utilities
o sort, grep, diff, etc.
o library routines for windows, mouse, graphics, etc
• Skills and interests of typical users affects O/S user interface
o What services are provided
o Design of actual interface (e.g. powerful but more difficult to use vs.
simple and easy)
o These differences can be met by using different shells
2. User Functions and Program Services
a) Program Execution
o Most obvious user command
ƒ Issue a typed command (provide data file on same line)
ƒ Double click a graphical icon of a program
ƒ Clicking a name or icon of a data file associated with a program
o Means of moving around the system
ƒ Issue commands such as cd
ƒ Navigate via folder icons, etc
o Means for batch execution
b) File commands
o Storage, retrieval, organization, and manipulation of files
o Treat data and programs by a logical file name
o Translate between logical and physical representations
o Store/manipulate/retrieve files or parts of files
o Organize files in a meaningful way (directories, folders, etc.)
c) Disk and Other I/O Device Commands
1
Chapter 14: The User View of Operating Systems
d)
e)
f)
g)
o Mounting and unmounting of devices
o Print spooling (because printers are slow relative to other devices)
Security and Data Integrity protection
o Logins (obviously)
o Various levels of protection for file access, deletion, etc.
o Owner of file controls who gets access (and what type)
o large systems provide access control lists (ACL’s) (ack’ulls)
Interuser Communication and Data Sharing Operations
o Share data files and programs
o Pass data between programs and communicate between users
o Simple: can place shared programs in a common memory area (editors,
compilers, etc.
o Data file sharing
ƒ Databases
ƒ When group is working on a project, some can read, others can
modify, etc.
ƒ Email, ftp, terminal support…
o Multiuser systems have internal communication between users (phone,
talk, etc.) – supplanted by chat programs (AIM, etc.)
o Pipe command
o Embedded data from differing applications and automatic access to the
underlying application.
System Status Information
o Usually for sysadmins, but also for programmers and users (ps, du, time,
who, etc.)
o Log file of many types
Program Services
o I/O and file services
o Additional memory or more time
o Direct I/O for screen output, but sometimes for disks, etc.
o DCOM (Distributed Component Object Model)
ƒ .NET
ƒ CORBA
o RPC (Remote Procedure Call)
o Windowing, drop down menus, dialog boxes, mouse events, etc
ƒ Requests through API (Application Programming Interface)
ƒ Library of service functions
ƒ “Software Interrupts” are used (much like syscall)
ƒ Win32 provides hundreds of service functions.
o No current machine allows a user program to bypass operating system
services.
3. Types of User Interface
a) Command Line Interface
• Simplest user-interactive interface
• Command line is interpreted by the command interpreter and executed
2
Chapter 14: The User View of Operating Systems
• Command is followed by operands
• Operands are either keyword or positional (or both)
• Keyword operands known as switches or modifiers in Unix
• Combine into shell scripts or batch programs
• Wild card provisions
• Ability to repeat/edit previous commands
b) Batch System Commands
• Keyword or positional
• Shell scripts (.bat in MSDOS), any executable with #! line to indicate
interpreter.
c) Menu-Driven Interfaces
• Easier for novices
• IBM AS-400
d) Windows Interfaces
• Now the prevalent user interface
• Desktop (screen) metaphor
• Widgets (gadgets) for resizing, etc.
• Title bar and menu bar
• Task bar
• Mouse focus vs. click to focus
• Drag and drop
• Folders = directory structure. Active window = current directory
e) Trade-offs in the User Interface
• GUI seems ideal: easy to learn, easy to use
• GUI makes multitasking easy
• GUI is harder to implement and more demanding of hardware and software
• Many experienced users consider the GUI slow and clumsy
• With GUI combining commands is more difficult
• X Window is system independent
• Web browsers can also fill this role
f) Software considerations
• With CLI, almost trivial (relatively speaking)
• GUI must
a. Maintain screen appearance
3
Chapter 14: The User View of Operating Systems
b. Translate user requests into available services and initiate the program
that provides that service.
c. Create pull-down menus and dialog boxes
d. React to clicks
e. Maintain positions of objects on the screen
• Mouse movements generate interrupts
• Mouse movement or dragging entails saving the image behind the object
being moved and then restoring it when it has moved on.
4. X Window and other Graphics Display Methodologies
• More difficult when computer and display are separated by distance (network)
• Much data required to generate the graphical display
• Program that produces the image is a display server
• With this architecture, display server and application can co-exist
• Display server provides gadgets, dialog boxes, menus, etc.
• Display server can display points, rectangles, circles, lines, icons, cursor, text
fonts, etc.
• Cursor is moved locally and only final position needs to be sent.
• Amount of data transmitted is much reduced (images must still be transmitted)
• Display can process requests from several client applications simultaneously
5. Command and Scripting Languages
• No compatibility between JCL languages
• Scripting languages are expanded forms of command languages
• Scripting languages include:
o Perl
o Javascript
o PHP
o Python
a) Elements of a command language
• Print messages to the screen
4
Chapter 14: The User View of Operating Systems
• Get input from the user
• Specify variables and assign and change values
• Branch and loop
• Specify arguments
• Detect errors and recover gracefully
b) The Command Language Start-up Sequence Files
• Used at system start-up and when a user logs in
6. Services to Programs
• Win32 API
• Provide standard look and feel
• Pass data between applications
• Launch one application from another
• Provide libraries of objects
• Boundary between O/S and application less clear (Windows/Browser)
5