==================== Start Lecture 3 =========================== NOTE: Prob 2.1 what is called buffering is normally called double buffering Memory protection Base/limit is simple but not general (contiguous) CPU protection I.e. prevent user to maintain control E.g. timesharing time slice Timer interrupt Context switch How a syscall happens User has scanf() in C scanf invoked Bunch of stuff for formatting Buffering Call read in libc, which is OS and machine dependent Set up regs say r0 has syscall # Do poof Case stmt based on r0 if not in buffer cache (assumed below) schedule I/O mark user process not ready call scheduler (perhaps not if in buffer cache) mark user process ready call scheduler move results from regs (OS dep) to where they belong (lang dep) return to scanf in stdio return to the user's C program Chapter 3 System Components Process management creation and deletion of processes suspension and resumption of procs block/unblock procs Synchronization / coordination Communication (IPC) Deadlock HOMEWORK 3.1 Memory management (Main-memory management) knowing what mem is assigned to what process Memory allocation Suspending processes for insufficient mem and resuming HOMEWORK 3.2 Secondary storage management Free space management storage alloc disk scheduling HOMEWORK 3.3 I/O management buffer cache generic device driver interface device drivers File management create/delete files and directories manipulating files (e.g. permissions, ownership, quotas) storage of files backup (is this part of OS?) HOMEWORK 3.4 Protection Networking Command interp (shell) Part of OS? OS Services program execution I/O filesystem communication resource allocation acct protection "controlled sharing" System calls The OS interface HOMEWORK 3.7 Process management fork/exec/exit/wait shell loop send and catch signals Memory mgt alloc/free book calls part of process control Files and filesystems (in unix this includes devices /dev) open/close read/write/reposition(seek) get/set attr mount Information get/set day/date get/set attr (e.g., creation date) Communication establish/tear down connection send/receive System Programs Many are UNPRIVILEGED remove a file, editor, list directory compilers Utility programs Could be part of command interpreter ================== End of Lecture 3 ========================