


Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
These HOMEWOR NOTES are very easy to understand and very helpful to built a concept about the foundation of computers ORGANIZATION and Database Design.The key points in these slide are:High-Level Language Programmer’s View, Calculate Powers, Run-Time Stack, Calculates Values, Recursive Function, Number of Call Frames, Caller-Save Register Convention, Procedure Call Standard, Program Counter
Typology: Exercises
1 / 4
This page cannot be seen from the preview
Don't miss anything!



A program that operates as the interface between the user and the hardware
Web Browser
Accting package
etc.
Compiler Editors Command Window Interpreter system
Operating System - file system, memory manager, etc.
Hardware - CPU, memory, I/O devices
Runs in User Mode
Runs in Kernel or Supervisor Mode
system calls
CPU
data
addr.
control
data reg
status/ctrl
I/O logic
I/O Controller
data
status
control
Disk
e.g., writing/reading to file on disk
OS provides high-level system calls so programmer does not need to know details of disk
Resources are competed for by all running programs
Examples:
A process is the term for a running program. A process’s state consists of the CPU register values, its run-time stack in memory, and it’s other memory content. Many processes maybe executing concurrently, but only one can be executing on a CPU at a time. When the CPU switches to another process, a context switch occurs which involves saving the complete state of the previously executing process before loading the state of the next process to execute into the CPU. Depending on the hardware, this can take up to 100 microseconds (i.e., very slow in computer terms).
Process State Diagram
new
waiting
I/O request or event wait
I/O completion event signaled
Scheduler Dispatched
Interrupt (CPU timer)
Admitted (short-term) Exit ready running terminated
Queues are used to hold process control blocks (PCB) that represent processes internally to the OS.
Process Control Block
Next PCB in queue pointer
Process State
Program Counter Registers
Memory Mgt. Info CPU Scheduling Info.
Accounting Info.
I/O Status Info
CPU Timer - the operating system sets a count-down timer before turning control over to a user program. If the timer expires, it generates an interrupt a user pgm before the user pgm is started. Remember that only one program (in a single CPU system) can be executing at a time so when the OS turns control over to a user program it has “lost control.” Modifications to the CPU timer are privileged
Memory-Mgt Unit
StartMemory
EndMemory
Block of Memory Allocated the Current Process
If instruction-based I/O instructions array being used. I/O has a separate address space from memory, but we can make these I/O instructions privileged so they can only be executed in system mode. Thus, a process could not execute them directly.