Download presentation
Presentation is loading. Please wait.
Published byMadison Jefferson Modified over 9 years ago
1
User Interfaces Operating Systems Lecture 2, 20 March 2003 Mr. Greg Vogl Uganda Martyrs University
2
20 March 2003 Operating Systems: User Interfaces2 Overview System calls Required to interact with hardware Command language Enter commands through terminal or shell Can be used to create batch files or shell scripts Job Control Language (JCL) Submitting batches to mainframe Graphical User Interface (GUI) windows, menus, icons, pointing device
3
20 March 2003 Operating Systems: User Interfaces3 System Calls Similar to ordinary library function calls Target of function call is system code part of OS rather than part of calling program Higher level calls are APIs call lower level system functions used to develop programs for the target OS Windows NT has high security; only offers APIs
4
20 March 2003 Operating Systems: User Interfaces4 UNIX system calls: file I/O Creat: creates a file Open: opens a file for read/write etc. Read: reads bytes from file into buffer Write: writes bytes to file into buffer Close: frees file from use by the process Lseek: moves to file position Link: creates another name for the file
5
20 March 2003 Operating Systems: User Interfaces5 UNIX system calls: processes Fork: creates copy of current process Exec: replaces current process with new one Exit: terminates process, returns to parent Kill: sends software signal to terminate process Pause: suspends execution of a process Signal: control signals using specified function
6
20 March 2003 Operating Systems: User Interfaces6 DOS Software Interrupts Interrupt vector table in first 1K of memory Interrupts processor like hardware interrupts Each vector has some system functions Interrupt 21H has many functions for: Character I/O, file/directory, process and memory management, date/time, etc.
7
20 March 2003 Operating Systems: User Interfaces7 Command Languages Used for on-line but also batch processing Used to start programs Also used to modify user environment prompt, path, working directory, etc.
8
20 March 2003 Operating Systems: User Interfaces8 UNIX commands command- name options arguments #comment 0 or more options beginning with dashes (-) 0 or more arguments are often file names Comment is ignored, used for documenting scripts
9
20 March 2003 Operating Systems: User Interfaces9 UNIX shell scripting shell script commands saved in a file and run as a program programming-language features variables, functions, if, case, for/while loops, etc. different shell languages have differing features sh, csh, ksh, bash, etc.
10
20 March 2003 Operating Systems: User Interfaces10 UNIX file/folder commands pwdshow current directory lslists files in current directory cdchange to a different directory catdisplay file contents cpcopy file mvmove or rename file rmdelete file
11
20 March 2003 Operating Systems: User Interfaces11 Other UNIX commands wccount characters, words, lines sortsort lines of a file grepsearch for a pattern in file lines findsearch for files with a given name/pattern dateshow date and time echorepeat a line of text whodisplay users logged on the system mandisplay documentation about a command exitclose the shell (logout if the only shell)
12
20 March 2003 Operating Systems: User Interfaces12 Perl Text processing language Combines features of C, UNIX shells, etc. Often used to make programmed Web pages Can be used for system administration tasks
13
20 March 2003 Operating Systems: User Interfaces13 MS-DOS Similar to UNIX but simpler (e.g. only one user) UNIX-like directory structure Batch files (.bat extension) command-name options arguments Options begin with forward slashes (/) Command.com Interprets “internal” DOS commands like UNIX shell External DOS commands are separate programs stored in folder c:\windows\command in Windows 98
14
20 March 2003 Operating Systems: User Interfaces14 Internal DOS commands CDchange or display the working folder DIRdisplay contents of folder TYPEdisplay contents of file DELdelete file COPYcopy file TIMEdisplay and change time DATEdisplay and change date CLSclear the screen SETset or display environment variables
15
20 March 2003 Operating Systems: User Interfaces15 External DOS commands FDISKpartition a disk FORMATadd a file system to a disk CHKDSKexamine and repair a disk XCOPYpowerful version of COPY MEMdisplay DOS memory usage MOREdisplay file one screen at a time HELPdisplay command documentation
16
20 March 2003 Operating Systems: User Interfaces16 DOS Options dirdisplays contents of current folder filename, ext, size, date, time, windows filename dir/ppauses after each screen dir/wuses wide list format (brief) dir/sdisplays all subdirectories
17
20 March 2003 Operating Systems: User Interfaces17 More DOS Options dir/oddisplays files in order of date dir/o-dsame but most recent date first dir/adisplays file attributes directories, hidden, system, read-only, archive dir/ahdisplays hidden files only dir/?displays help with the dir command
18
20 March 2003 Operating Systems: User Interfaces18 DOS Path Fully specifies the location of a file disk, folder(s), filename, extension e.g. c:\windows\command\fdisk.exe shared computer, shared folder, filename, ext. e.g. \\xpacer\SharedDocs\OS\index.htm OS uses search path to look for commands type PATH at DOS prompt put SET PATH command in autoexec.bat file
19
20 March 2003 Operating Systems: User Interfaces19 DOS Batch Files text file,.bat extension, contains commands useful for multiple file move/copy/delete can also run other programs and batch files useful for repeating tasks on many computers can keep networked client PCs identical
20
20 March 2003 Operating Systems: User Interfaces20 Using DOS Batch Files To create, edit or view a batch file use text editor (DOS Edit, Notepad or WordPad) To run a batch file double-click in Explorer, or type its name at the DOS prompt or Run dialog To get information on any DOS command type the command followed by /?
21
20 March 2003 Operating Systems: User Interfaces21 Useful DOS batch file commands xcopypowerful version of copy deltreedelete directory and all subdirectories callcalls another batch program gotogo to labelled line in a batch file forruns command on each file in a set ifconditional netWindows networking functions echodisplays messages or command echoing remremark (documentation line)
22
20 March 2003 Operating Systems: User Interfaces22 Job Control Languages Used on large computers for batch jobs: No human interaction/delays/interruptions Routine jobs e.g. payroll, financial reports Used resources are predictable, scheduled Must manage errors without intervention Jobs are given rank/priority Jobs are allocated memory, processor time
23
20 March 2003 Operating Systems: User Interfaces23 Graphical User Interfaces Usually an addition to command interfaces e.g. Windows (DOS), X Windows (UNIX) Features include: overlapping windows screen cursor moved by pointing device desktop, icons, taskbar, menus, dialog boxes buttons, scroll bars, lists
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.