Computer Science Fundamentals: From Assembly to Operating Systems
Second-Generation: Assembly Language
- A mnemonic system for representing machine instructions:
- Mnemonic names for op-codes
- Identifiers: Descriptive names for memory locations, chosen by the programmer
Assembly Language Characteristics
- One-to-one correspondence between machine instructions and assembly instructions:
- The programmer must think like the machine
- Inherently machine-dependent
- Converted to machine language by a program called an assembler
Third-Generation Languages
- Uses high-level primitives:
- Similar
Understanding Computers: Types, Elements, and Languages
What is a Mainframe Computer?
A mainframe computer is a high-capacity system designed for intensive computational tasks. Mainframes typically have multiple users connected through terminals. The most powerful mainframes, called supercomputers, perform very complex and time-consuming calculations.
What is a Microcomputer?
A microcomputer is a device, such as a laptop, that uses a microprocessor as its central processing unit (CPU). Common microcomputers include PCs, home computers, and computers for
Read MoreProcess and Memory Management in Operating Systems
Resource Management
Processes and Flows
- Def Process: Program in execution.
- Homepage More names:
- Control-Flow
- Tasks
- Threads (I will comment with a Java language example)
- Thread (of execution)
- The Operating System (OS) assigns a data structure (BCP) to all processes.
- What does the BCP contain?
- Current status
- Process Identifier
- Process priority
- Location in memory
- Resources used
Thread and States of Processes
- Def Thread: Point of execution of a process (a process can have one or more threads).
- Example: Word running
Concurrency and Memory Management in Operating Systems
Producer-Consumer Problem (Condition Variable)
pthread_cond_t not_empty_cv = PTHREAD_COND_INITIALIZER;
pthread_cond_t not_full_cv = PTHREAD_COND_INITIALIZER;
static int volatile count = 0;
void *producer(void* arg) {
for(;;) {
pthread_mutex_lock(&countmutex);
while(count == MAXCOUNT) {
pthread_cond_wait(¬_full_cv, &countmutex);
}
count = count + 1;
// Create Item
pthread_cond_signal(¬_empty_cv);
pthread_
Operating Systems and Network Fundamentals
Operating Systems
An Operating System (OS) is a set of software algorithms and routines intended to allocate resources to processes and provide a user-friendly environment that hides the hardware details.
Types of Operating Systems
For the Number of Users
- Monouser (e.g., DOS)
- Multiuser
By the Number of Concurrent Processes (Tasks)
- Single-tasking or Uniprocessor (e.g., DOS)
- Multitasking or Multiprocessing
- Multitasking Time-Shared (the larger the higher priority, the more runtime the process will have)
- Multiprocessing
Performance Analysis of Single-Cycle and Multi-Cycle Processors
1. Single-Cycle and Multi-Cycle Processor Implementations
Program A | Program B |
lw $6, 80($1) sw $3, 100($6) add $4, $3, $4 beq $3, $2, 50 add $5, $5, $5 lw $6, 400($5) | sub $3, $2, $1 beq $4, $3, 36 add $4, $3, $4 beq $3, $2, 20 add $5, $5, $5 beq $2, $3, 128 |
Two programs, A and B, shown in the above table, are going to be executed on two different machines. One of the machines is a single-cycle machine (Figure 1), and the other is a multi-cycle machine (Figure 2).
Assume that operational delay is 4ns for memory,
Read More