首页
学习
活动
专区
工具
TVP
发布

Reck Zhang

专栏作者
579
文章
157660
阅读量
36
订阅数
Operating System 09 - 进程状态的切换
进程状态的切换 📷 就绪状态(ready): 等待被调度 运行状态(running): 正在被调度 阻塞状态(waiting): 等待资源 注意 只有就绪态和运行态可以相互转换, 其他都是单向转换. 就绪状态的进程通过调度算法从而获得CPU时间, 转化为运行状态. 而运行状态的进程, 在分配给他的CPU时间片用完之后就会转为就绪状态, 等待下一次调度. 阻塞状态是缺少需要的资源从而由运行状态转换而来, 但是该资源不包括CPU时间, 缺少CPU时间就会从运行状态转换为就绪态.
Reck Zhang
2021-12-23
4550
Operating System 08 - 进程与线程
进程控制块(Process Control Block, PCB)描述进程的基本信息和运行状态, 所谓的创建进程和撤销进程, 都是对于PCB的操作.
Reck Zhang
2021-12-23
2290
SQL 07 - ACID
ACID 原子性(Atomicity) 事务被分割为不可分割的最小单元, 事务的所有操作要么全部提交成功, 要么全部回滚失败. 一致性(Consistency) 数据库在事务执行前后都保持一致性状态. 在一致性状态下, 所有事务对一个数据的读取结果都是相同的. 隔离性(Isolation) 一个事务所做的修改在最终提交之前, 对其他事务不可见. 持久性(Durability) 一旦事务提交, 则其所做的修改将会永远修改到数据库中. 即使系统发生崩溃, 事务执行的结果也不能丢失.
Reck Zhang
2021-12-23
1670
C++ 01 - 内存模型
内存模型 堆(heap) 由new分配出来的内存块, 其释放编译器不去管, 由程序去控制, 一个new对应一个delete. 如果没有释放掉, 在程序结束时OS会自动回收. 栈(stack) 栈是那些编译器在需要时分配, 在不需要时自动清除的存储区, 存放局部变量, 函数参数. 存放的栈中的数据只在当前函数及下一层函数中有效, 一旦函数返回了, 这些数据也就自动释放. 全局/静态存储区(.bss段和.data段) 全局和静态变量被分配到同一内存中. 在C语言中, 未初始化的放在.ba
Reck Zhang
2021-12-23
3660
ACMSGURU 149 - Computer Network
A school bought the first computer some time ago. During the recent years the school bought N-1 new computers. Each new computer was connected to one of settled earlier. Managers of school are anxious about slow functioning of the net and want to know for each computer number Si - maximum distance, for which i-th computer needs to send signal (i.e. length of cable to the most distant computer). You need to provide this information.
Reck Zhang
2021-12-18
3050
ACMSGURU 397 - Text Editor
The simplest text editor “Open Word” allows to create and edit only one word. The editor processes keys ‘a’ – ‘z’, and also ‘L’ (to the left) and ‘R’ (to the right). After starting his work the editor immediately creates an empty word and sets its cursor to the left-most position. When one of keys ‘a’ – ‘z’ is pressed, the text editor inserts corresponding symbol just after the cursor. After that a cursor moves one position to the right in such a way that it is placed just after new symbol. When key ‘L’ or ‘R’ is pressed, the cursor moves one position to the left or to the right respectively. If the cursor can’t be moved because it is placed at the left-most or right-most position the command is ignored. Developers of “Open Word” didn’t think about the effectiveness so the editor is working slowly if a lot of keys have been pressed.
Reck Zhang
2021-12-05
5120
ACMSGURU 114 - Telecasting station
Every city in Berland is situated on Ox axis. The government of the country decided to build new telecasting station. After many experiments Berland scientists came to a conclusion that in any city citizens displeasure is equal to product of citizens amount in it by distance between city and TV-station. Find such point on Ox axis for station so that sum of displeasures of all cities is minimal.
Reck Zhang
2021-09-01
4960
LeetCode 0198 - House Robber
You are a professional robber planning to rob houses along a street. Each house has a certain amount of money stashed, the only constraint stopping you from robbing each of them is that adjacent houses have security system connected and it will automatically contact the police if two adjacent houses were broken into on the same night.
Reck Zhang
2021-08-11
2330
LeetCode 0199 - Binary Tree Right Side View
Given a binary tree, imagine yourself standing on the right side of it, return the values of the nodes you can see ordered from top to bottom.
Reck Zhang
2021-08-11
2380
LeetCode 0231 - Power of Two
Given an integer, write a function to determine if it is a power of two.
Reck Zhang
2021-08-11
1330
Java 15 - 类加载过程
确保Class文件的字节流中包含的信息符合虚拟机的要求, 并且不会危害虚拟机的安全.
Reck Zhang
2021-08-11
3480
Java 16 - 序列化与反序列化
需要进行序列化的类需要实现Serializable接口, 但是不需要实现任何方法.
Reck Zhang
2021-08-11
2550
LeetCode 0200 - Number of Islands
Given a 2d grid map of '1's (land) and '0's (water), count the number of islands. An island is surrounded by water and is formed by connecting adjacent lands horizontally or vertically. You may assume all four edges of the grid are all surrounded by water.
Reck Zhang
2021-08-11
3250
LeetCode 0201 - Bitwise AND of Numbers Range
Given a range [m, n] where 0 <= m <= n <= 2147483647, return the bitwise AND of all numbers in this range, inclusive.
Reck Zhang
2021-08-11
1950
LeetCode 0202 - Happy Number
Write an algorithm to determine if a number is “happy”.
Reck Zhang
2021-08-11
2440
LeetCode 0203 - Remove Linked List Elements
Remove all elements from a linked list of integers that have value val.
Reck Zhang
2021-08-11
2130
LeetCode 0183 - Customers Who Never Order
Suppose that a website contains two tables, the Customers table and the Orders table. Write a SQL query to find all customers who never order anything.
Reck Zhang
2021-08-11
3050
LeetCode 0184 - Department Highest Salary
The Employee table holds all employees. Every employee has an Id, a salary, and there is also a column for the department Id.
Reck Zhang
2021-08-11
3320
LeetCode 0185 - Department Top Three Salaries
The Employee table holds all employees. Every employee has an Id, and there is also a column for the department Id.
Reck Zhang
2021-08-11
2230
LeetCode 0187 - Repeated DNA Sequences
All DNA is composed of a series of nucleotides abbreviated as A, C, G, and T, for example: “ACGAATTCCG”. When studying DNA, it is sometimes useful to identify repeated sequences within the DNA.
Reck Zhang
2021-08-11
2920
点击加载更多
社区活动
腾讯技术创作狂欢月
“码”上创作 21 天,分 10000 元奖品池!
Python精品学习库
代码在线跑,知识轻松学
博客搬家 | 分享价值百万资源包
自行/邀约他人一键搬运博客,速成社区影响力并领取好礼
技术创作特训营·精选知识专栏
往期视频·千货材料·成员作品 最新动态
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档